metareg: Meta-regression

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/metareg.R

Description

Meta-regression for objects of class meta. This is a wrapper function for the R function rma.uni in the R package metafor (Viechtbauer 2010).

Usage

1
2
metareg(x, formula, method.tau = x$method.tau, hakn = x$hakn,
        level.comb = x$level.comb, intercept = TRUE,...)

Arguments

x

An object of class meta.

formula

Either a character string or a formula object.

method.tau

A character string indicating which method is used to estimate the between-study variance tau-squared. Either "FE", "DL", "REML", "ML", "HS", "SJ", "HE", or "EB", can be abbreviated.

hakn

A logical indicating whether the method by Hartung and Knapp should be used to adjust test statistics and confidence intervals.

level.comb

The level used to calculate confidence intervals for parameter estimates in the meta-regression model.

intercept

A logical indicating whether an intercept should be included in the meta-regression model.

...

Additional arguments passed to R function rma.uni.

Details

This R function is a wrapper function for R function rma.uni in the R package metafor (Viechtbauer 2010), i.e., function metareg can only be used if R package metafor is installed.

Argument '...' can be used to pass additional arguments to R function rma.uni. For example, argument control to provide a list of control values for the iterative estimation algorithm. See help page of R function rma.uni for more details.

Value

An object of class c("metareg", "rma.uni","rma"). Please look at the help page of R function rma.uni for more details on the output from this function.

In addition, a list .meta is added to the output containing the following components:

x, formula, method.tau, hakn, level.comb, intercept

As definied above.

dots

Information provided in argument '...'.

call

Function call.

version

Version of R package meta used to create object.

version.metafor

Version of R package metafor used to create object.

Author(s)

Guido Schwarzer sc@imbi.uni-freiburg.de

References

Viechtbauer W (2010), Conducting Meta-Analyses in R with the Metafor Package. Journal of Statistical Software, 36, 1–48.

See Also

bubble, summary.meta, metagen

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
data(Fleiss93cont)

# Add some (fictious) grouping variables:
Fleiss93cont$age <- c(55, 65, 55, 65, 55)
Fleiss93cont$region <- c("Europe", "Europe", "Asia", "Asia", "Europe")

meta1 <- metacont(n.e, mean.e, sd.e,
                  n.c, mean.c, sd.c,
                  data = Fleiss93cont, sm = "MD")


mu1 <- update(meta1, byvar = region)

mu2 <- update(meta1, byvar = region,
              tau.common = TRUE, comb.fixed = FALSE)

## Not run: 
# Warnings due to wrong ordering of arguments (order has changed with
# version 3.0-0 of R package meta)
#
metareg(~ region, meta1)
metareg(~ region, data = meta1)

# Warning as no information on covariate is available
#
metareg(meta1)

## End(Not run)

# Do meta-regression for covariate region
# (see R code to create object mu2)
#
metareg(mu2)

# Same result for
# - tau-squared
# - test of heterogeneity
# - test for subgroup differences
# (as argument 'tau.common' was used to create mu2)
#
mu2
metareg(mu2, intercept = FALSE)
metareg(meta1, region)
#
# Different result for
# - tau-squared
# - test of heterogeneity
# - test for subgroup differences
# (as argument 'tau.common' is - by default - FALSE)
#
mu1

# Generate bubble plot
#
bubble(metareg(mu2))

# Do meta-regression with two covariates
#
metareg(mu1, region + age)

# Do same meta-regressions using 'official' formula notation
#
metareg(meta1, ~ region)
metareg(mu1, ~ region + age)

# Do meta-regression using REML method and print intermediate results
# for iterative estimation algorithm; furthermore print results with
# three digits.
#
metareg(mu1, region, method.tau = "REML",
        control = list(verbose = TRUE), digits = 3)

# Use Hartung-Knapp method
#
mu3 <- update(mu2, hakn = TRUE)
mu3
metareg(mu3, intercept = FALSE)

Example output

Loading 'meta' package (version 4.8-2).
Type 'help(meta)' for a brief overview.
Warning message:
In metareg(~region, meta1) :
  Please note, first two arguments of R function metareg have been interchanged in version 3.0-0 of R package meta. No meta-regression conducted.
Warning message:
In metareg(~region, data = meta1) :
  Please note, argument 'data' has been renamed to 'x' in version 3.0-0 of R package meta (see help page of R function metareg). No meta-regression conducted.
Warning message:
In metareg(meta1) :
  No meta-regression conducted as argument 'formula' is missing and no information is provided on subgroup variable, i.e. list element 'byvar' in meta-analysis object 'x' (see help page of R function metareg).

Mixed-Effects Model (k = 5; tau^2 estimator: DL)

tau^2 (estimated amount of residual heterogeneity):     0 (SE = 0.5041)
tau (square root of estimated tau^2 value):             0
I^2 (residual heterogeneity / unaccounted variability): 0.00%
H^2 (unaccounted variability / sampling variability):   1.00
R^2 (amount of heterogeneity accounted for):            100.00%

Test for Residual Heterogeneity: 
QE(df = 3) = 2.0242, p-val = 0.5674

Test of Moderators (coefficient(s) 2): 
QM(df = 1) = 3.6359, p-val = 0.0565

Model Results:

              estimate      se     zval    pval    ci.lb   ci.ub   
intrcpt         0.0329  0.4796   0.0686  0.9453  -0.9071  0.9729   
.byvarEurope   -1.1267  0.5909  -1.9068  0.0565  -2.2849  0.0314  .

---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 

       MD             95%-CI %W(random) region
1 -1.5000 [-4.7855;  1.7855]        4.5 Europe
2 -1.2000 [-2.0837; -0.3163]       34.4 Europe
3 -2.4000 [-6.1078;  1.3078]        3.6   Asia
4  0.2000 [-0.7718;  1.1718]       31.0   Asia
5 -0.8800 [-1.9900;  0.2300]       26.5 Europe

Number of studies combined: k = 5

                          MD             95%-CI     z  p-value
Random effects model -0.7373 [-1.4577; -0.0170] -2.01   0.0448

Quantifying heterogeneity:
 tau^2 = 0.1894; H = 1.19 [1.00; 1.91]; I^2 = 29.3% [0.0%; 72.6%]

Test of heterogeneity:
    Q d.f.  p-value
 5.66    4   0.2260

Results for subgroups (random effects model):
                  k      MD             95%-CI    Q tau^2   I^2
region = Europe   3 -1.0938 [-1.7704; -0.4173] 0.26     0  0.0%
region = Asia     2  0.0329 [-0.9071;  0.9729] 1.77     0 43.4%

Test for subgroup differences (random effects model):
                  Q d.f.  p-value
Between groups 3.64    1   0.0565
Within groups  2.02    3   0.5674

Details on meta-analytical method:
- Inverse variance method
- DerSimonian-Laird estimator for tau^2 (assuming common tau^2 in subgroups)

Mixed-Effects Model (k = 5; tau^2 estimator: DL)

tau^2 (estimated amount of residual heterogeneity):     0 (SE = 0.5041)
tau (square root of estimated tau^2 value):             0
I^2 (residual heterogeneity / unaccounted variability): 0.00%
H^2 (unaccounted variability / sampling variability):   1.00

Test for Residual Heterogeneity: 
QE(df = 3) = 2.0242, p-val = 0.5674

Test of Moderators (coefficient(s) 1,2): 
QM(df = 2) = 10.0475, p-val = 0.0066

Model Results:

              estimate      se     zval    pval    ci.lb    ci.ub    
.byvarAsia      0.0329  0.4796   0.0686  0.9453  -0.9071   0.9729    
.byvarEurope   -1.0938  0.3452  -3.1690  0.0015  -1.7704  -0.4173  **

---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 


Mixed-Effects Model (k = 5; tau^2 estimator: DL)

tau^2 (estimated amount of residual heterogeneity):     0 (SE = 0.5041)
tau (square root of estimated tau^2 value):             0
I^2 (residual heterogeneity / unaccounted variability): 0.00%
H^2 (unaccounted variability / sampling variability):   1.00
R^2 (amount of heterogeneity accounted for):            100.00%

Test for Residual Heterogeneity: 
QE(df = 3) = 2.0242, p-val = 0.5674

Test of Moderators (coefficient(s) 2): 
QM(df = 1) = 3.6359, p-val = 0.0565

Model Results:

              estimate      se     zval    pval    ci.lb   ci.ub   
intrcpt         0.0329  0.4796   0.0686  0.9453  -0.9071  0.9729   
regionEurope   -1.1267  0.5909  -1.9068  0.0565  -2.2849  0.0314  .

---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 

       MD             95%-CI %W(fixed) %W(random) region
1 -1.5000 [-4.7855;  1.7855]       2.8        4.5 Europe
2 -1.2000 [-2.0837; -0.3163]      38.6       34.4 Europe
3 -2.4000 [-6.1078;  1.3078]       2.2        3.6   Asia
4  0.2000 [-0.7718;  1.1718]      31.9       31.0   Asia
5 -0.8800 [-1.9900;  0.2300]      24.5       26.5 Europe

Number of studies combined: k = 5

                          MD             95%-CI     z  p-value
Fixed effect model   -0.7094 [-1.2585; -0.1603] -2.53   0.0113
Random effects model -0.7373 [-1.4577; -0.0170] -2.01   0.0448

Quantifying heterogeneity:
 tau^2 = 0.1894; H = 1.19 [1.00; 1.91]; I^2 = 29.3% [0.0%; 72.6%]

Test of heterogeneity:
    Q d.f.  p-value
 5.66    4   0.2260

Results for subgroups (fixed effect model):
                  k      MD             95%-CI    Q   tau^2   I^2
region = Europe   3 -1.0938 [-1.7704; -0.4173] 0.26   0      0.0%
region = Asia     2  0.0329 [-0.9071;  0.9729] 1.77   1.468 43.4%

Test for subgroup differences (fixed effect model):
                  Q d.f.  p-value
Between groups 3.64    1   0.0565
Within groups  2.02    3   0.5674

Results for subgroups (random effects model):
                  k      MD             95%-CI    Q   tau^2   I^2
region = Europe   3 -1.0938 [-1.7704; -0.4173] 0.26   0      0.0%
region = Asia     2 -0.4591 [-2.6758;  1.7577] 1.77   1.468 43.4%

Test for subgroup differences (random effects model):
                    Q d.f.  p-value
Between groups   0.29    1   0.5914

Details on meta-analytical method:
- Inverse variance method
- DerSimonian-Laird estimator for tau^2

Mixed-Effects Model (k = 5; tau^2 estimator: DL)

tau^2 (estimated amount of residual heterogeneity):     0.0088 (SE = 1.3220)
tau (square root of estimated tau^2 value):             0.0939
I^2 (residual heterogeneity / unaccounted variability): 0.67%
H^2 (unaccounted variability / sampling variability):   1.01
R^2 (amount of heterogeneity accounted for):            95.34%

Test for Residual Heterogeneity: 
QE(df = 2) = 2.0134, p-val = 0.3654

Test of Moderators (coefficient(s) 2,3): 
QM(df = 2) = 3.4928, p-val = 0.1744

Model Results:

              estimate      se     zval    pval    ci.lb   ci.ub   
intrcpt        -0.4729  4.3338  -0.1091  0.9131  -8.9670  8.0213   
regionEurope   -1.0936  0.6455  -1.6942  0.0902  -2.3587  0.1715  .
age             0.0078  0.0669   0.1162  0.9075  -0.1234  0.1390   

---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 


Mixed-Effects Model (k = 5; tau^2 estimator: DL)

tau^2 (estimated amount of residual heterogeneity):     0 (SE = 0.5041)
tau (square root of estimated tau^2 value):             0
I^2 (residual heterogeneity / unaccounted variability): 0.00%
H^2 (unaccounted variability / sampling variability):   1.00
R^2 (amount of heterogeneity accounted for):            100.00%

Test for Residual Heterogeneity: 
QE(df = 3) = 2.0242, p-val = 0.5674

Test of Moderators (coefficient(s) 2): 
QM(df = 1) = 3.6359, p-val = 0.0565

Model Results:

              estimate      se     zval    pval    ci.lb   ci.ub   
intrcpt         0.0329  0.4796   0.0686  0.9453  -0.9071  0.9729   
regionEurope   -1.1267  0.5909  -1.9068  0.0565  -2.2849  0.0314  .

---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 


Mixed-Effects Model (k = 5; tau^2 estimator: DL)

tau^2 (estimated amount of residual heterogeneity):     0.0088 (SE = 1.3220)
tau (square root of estimated tau^2 value):             0.0939
I^2 (residual heterogeneity / unaccounted variability): 0.67%
H^2 (unaccounted variability / sampling variability):   1.01
R^2 (amount of heterogeneity accounted for):            95.34%

Test for Residual Heterogeneity: 
QE(df = 2) = 2.0134, p-val = 0.3654

Test of Moderators (coefficient(s) 2,3): 
QM(df = 2) = 3.4928, p-val = 0.1744

Model Results:

              estimate      se     zval    pval    ci.lb   ci.ub   
intrcpt        -0.4729  4.3338  -0.1091  0.9131  -8.9670  8.0213   
regionEurope   -1.0936  0.6455  -1.6942  0.0902  -2.3587  0.1715  .
age             0.0078  0.0669   0.1162  0.9075  -0.1234  0.1390   

---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 

Iteration 0 	tau^2 = 0.000 
Iteration 1 	tau^2 = 0.000 
Fisher scoring algorithm converged after 1 iterations.
Iteration 0 	tau^2 = 0.000 
Iteration 1 	tau^2 = 0.349 
Iteration 2 	tau^2 = 0.259 
Iteration 3 	tau^2 = 0.277 
Iteration 4 	tau^2 = 0.273 
Iteration 5 	tau^2 = 0.274 
Iteration 6 	tau^2 = 0.274 
Iteration 7 	tau^2 = 0.274 
Iteration 8 	tau^2 = 0.274 
Fisher scoring algorithm converged after 8 iterations.

Mixed-Effects Model (k = 5; tau^2 estimator: REML)

tau^2 (estimated amount of residual heterogeneity):     0 (SE = 0.363)
tau (square root of estimated tau^2 value):             0
I^2 (residual heterogeneity / unaccounted variability): 0.00%
H^2 (unaccounted variability / sampling variability):   1.00
R^2 (amount of heterogeneity accounted for):            100.00%

Test for Residual Heterogeneity: 
QE(df = 3) = 2.024, p-val = 0.567

Test of Moderators (coefficient(s) 2): 
QM(df = 1) = 3.636, p-val = 0.057

Model Results:

              estimate     se    zval   pval   ci.lb  ci.ub   
intrcpt          0.033  0.480   0.069  0.945  -0.907  0.973   
regionEurope    -1.127  0.591  -1.907  0.057  -2.285  0.031  .

---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 

       MD             95%-CI %W(random) region
1 -1.5000 [-4.7855;  1.7855]        4.5 Europe
2 -1.2000 [-2.0837; -0.3163]       34.4 Europe
3 -2.4000 [-6.1078;  1.3078]        3.6   Asia
4  0.2000 [-0.7718;  1.1718]       31.0   Asia
5 -0.8800 [-1.9900;  0.2300]       26.5 Europe

Number of studies combined: k = 5

                          MD            95%-CI     t  p-value
Random effects model -0.7373 [-1.6961; 0.2215] -2.14   0.0996

Quantifying heterogeneity:
 tau^2 = 0.1894; H = 1.19 [1.00; 1.91]; I^2 = 29.3% [0.0%; 72.6%]

Test of heterogeneity:
    Q d.f.  p-value
 5.66    4   0.2260

Results for subgroups (random effects model):
                  k      MD             95%-CI    Q tau^2   I^2
region = Europe   3 -1.0938 [-1.6259; -0.5617] 0.26     0  0.0%
region = Asia     2  0.0329 [-8.0690;  8.1347] 1.77     0 43.4%

Test for subgroup differences (random effects model):
                  Q d.f.  p-value
Between groups 3.01    1   0.0828
Within groups  2.02    3   0.5674

Details on meta-analytical method:
- Inverse variance method
- DerSimonian-Laird estimator for tau^2 (assuming common tau^2 in subgroups)
- Hartung-Knapp adjustment for random effects model

Mixed-Effects Model (k = 5; tau^2 estimator: DL)

tau^2 (estimated amount of residual heterogeneity):     0 (SE = 0.5041)
tau (square root of estimated tau^2 value):             0
I^2 (residual heterogeneity / unaccounted variability): 0.00%
H^2 (unaccounted variability / sampling variability):   1.00

Test for Residual Heterogeneity: 
QE(df = 3) = 2.0242, p-val = 0.5674

Test of Moderators (coefficient(s) 1,2): 
F(df1 = 2, df2 = 3) = 7.4453, p-val = 0.0687

Model Results:

              estimate      se     tval    pval    ci.lb    ci.ub   
.byvarAsia      0.0329  0.3940   0.0835  0.9387  -1.2209   1.2867   
.byvarEurope   -1.0938  0.2835  -3.8579  0.0308  -1.9962  -0.1915  *

---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 

meta documentation built on May 30, 2017, 8:24 a.m.

Search within the meta package
Search all R packages, documentation and source code