Skip to content

[R-meta] Q-Statistic for Between-Subgroup Heterogeneity

5 messages · Ty Beal, Wolfgang Viechtbauer, Guido Schwarzer

#
I am conducting a meta-analysis of proportions using the metafor package and want to compare heterogeneity between subgroups. I don?t see an option to generate a Q-statistic for between-subgroup heterogeneity. Is there any way to accomplish this with the metafor package?

I can do this with the meta package using metaprop() and the byvar option?however, it does not let me specify separate weightings as rma() from the metafor package does.

Thanks,

Ty Beal, PhD
Technical Specialist
Knowledge Leadership

GAIN ? Global Alliance for Improved Nutrition
1509 16th Street NW, 7th Floor | Washington, DC 20036
tbeal at gainhealth.org<mailto:atumilowicz at gainhealth.org>
C: +1 (602) 481-5211
Skype: tyroniousbeal
[GAINbanner]<http://www.gainhealth.org>

Disclaimer

The information contained in this communication from the sender is confidential. It is intended solely for use by the recipient and others authorized to receive it. If you are not the recipient, you are hereby notified that any disclosure, copying, distribution or taking action in relation of the contents of this information is strictly prohibited and may be unlawful.

This email has been scanned for viruses and malware, and may have been automatically archived by Mimecast Ltd, an innovator in Software as a Service (SaaS) for business. Providing a safer and more useful place for your human generated data. Specializing in; Security, archiving and compliance. To find out more visit the Mimecast website.
#
Dear Ty,

The test for 'between-group' differences/heterogeneity is provided if you include the subgroup variable as a categorial moderator (i.e., as a factor) in the model. For example:

library(metafor)

dat <- get(data(dat.bcg))
dat <- escalc(measure="RR", ai=tpos, bi=tneg, ci=cpos, di=cneg, data=dat.bcg)

res <- rma(yi, vi, mods = ~ factor(alloc), data=dat)
res

In the output, you will find:

Test of Moderators (coefficients 2:3):
QM(df = 2) = 1.7675, p-val = 0.4132

This is the test for between-subgroup heterogeneity.

Best,
Wolfgang

-----Original Message-----
From: R-sig-meta-analysis [mailto:r-sig-meta-analysis-bounces at r-project.org] On Behalf Of Ty Beal
Sent: Friday, 13 July, 2018 15:46
To: r-sig-meta-analysis at r-project.org
Subject: [R-meta] Q-Statistic for Between-Subgroup Heterogeneity

I am conducting a meta-analysis of proportions using the metafor package and want to compare heterogeneity between subgroups. I don?t see an option to generate a Q-statistic for between-subgroup heterogeneity. Is there any way to accomplish this with the metafor package?

I can do this with the meta package using metaprop() and the byvar option?however, it does not let me specify separate weightings as rma() from the metafor package does.

Thanks,

Ty Beal, PhD
Technical Specialist
Knowledge Leadership

GAIN ? Global Alliance for Improved Nutrition
1509 16th Street NW, 7th Floor | Washington, DC 20036
tbeal at gainhealth.org<mailto:atumilowicz at gainhealth.org>
C: +1 (602) 481-5211
Skype: tyroniousbeal
[GAINbanner]<http://www.gainhealth.org>
#
Dear Wolfgang,

Thank you very much. That worked perfectly.

Cheers,
Ty
?On 7/13/18, 12:31 PM, "Viechtbauer, Wolfgang (SP)" <wolfgang.viechtbauer at maastrichtuniversity.nl> wrote:
Dear Ty,

    The test for 'between-group' differences/heterogeneity is provided if you include the subgroup variable as a categorial moderator (i.e., as a factor) in the model. For example:

    library(metafor)

    dat <- get(data(dat.bcg))
    dat <- escalc(measure="RR", ai=tpos, bi=tneg, ci=cpos, di=cneg, data=dat.bcg)

    res <- rma(yi, vi, mods = ~ factor(alloc), data=dat)
    res

    In the output, you will find:

    Test of Moderators (coefficients 2:3):
    QM(df = 2) = 1.7675, p-val = 0.4132

    This is the test for between-subgroup heterogeneity.

    Best,
    Wolfgang

    -----Original Message-----
    From: R-sig-meta-analysis [mailto:r-sig-meta-analysis-bounces at r-project.org] On Behalf Of Ty Beal
    Sent: Friday, 13 July, 2018 15:46
    To: r-sig-meta-analysis at r-project.org
    Subject: [R-meta] Q-Statistic for Between-Subgroup Heterogeneity

    I am conducting a meta-analysis of proportions using the metafor package and want to compare heterogeneity between subgroups. I don?t see an option to generate a Q-statistic for between-subgroup heterogeneity. Is there any way to accomplish this with the metafor package?

    I can do this with the meta package using metaprop() and the byvar option?however, it does not let me specify separate weightings as rma() from the metafor package does.

    Thanks,

    Ty Beal, PhD
    Technical Specialist
    Knowledge Leadership

    GAIN ? Global Alliance for Improved Nutrition
    1509 16th Street NW, 7th Floor | Washington, DC 20036
    tbeal at gainhealth.org<mailto:atumilowicz at gainhealth.org>
    C: +1 (602) 481-5211
    Skype: tyroniousbeal
    [GAINbanner]<http://www.gainhealth.org>


[GAINbanner]<http://www.gainhealth.org>

Disclaimer

The information contained in this communication from the sender is confidential. It is intended solely for use by the recipient and others authorized to receive it. If you are not the recipient, you are hereby notified that any disclosure, copying, distribution or taking action in relation of the contents of this information is strictly prohibited and may be unlawful.

This email has been scanned for viruses and malware, and may have been automatically archived by Mimecast Ltd, an innovator in Software as a Service (SaaS) for business. Providing a safer and more useful place for your human generated data. Specializing in; Security, archiving and compliance. To find out more visit the Mimecast website.
2 days later
#
Am 13.07.18 um 18:31 schrieb Viechtbauer, Wolfgang (SP):
... assuming a common between-study variance tau2 across subgroups. The 
default in metaprop() of meta is to allow different between-study 
variances (analogous to RevMan 5, the software for Cochrane Reviews). 
However, this can be changed using argument 'tau.common = TRUE' in 
metaprop().

As stated by Ty, metaprop() does not allow to specify the weights at the 
moment. I put this on my TODO list.

Best wishes,
Guido
#
Good point. This was discussed before (for metagen(), but it's the same issue):

https://stat.ethz.ch/pipermail/r-sig-meta-analysis/2017-December/000430.html

Best,
Wolfgang

-----Original Message-----
From: R-sig-meta-analysis [mailto:r-sig-meta-analysis-bounces at r-project.org] On Behalf Of Guido Schwarzer
Sent: Monday, 16 July, 2018 13:13
To: r-sig-meta-analysis at r-project.org
Subject: Re: [R-meta] Q-Statistic for Between-Subgroup Heterogeneity

Am 13.07.18 um 18:31 schrieb Viechtbauer, Wolfgang (SP):
... assuming a common between-study variance tau2 across subgroups. The 
default in metaprop() of meta is to allow different between-study 
variances (analogous to RevMan 5, the software for Cochrane Reviews). 
However, this can be changed using argument 'tau.common = TRUE' in 
metaprop().

As stated by Ty, metaprop() does not allow to specify the weights at the 
moment. I put this on my TODO list.

Best wishes,
Guido