The metafor Package

A Meta-Analysis Package for R

User Tools

Site Tools


analyses:vanhouwelingen2002

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
analyses:vanhouwelingen2002 [2021/05/09 15:37] Wolfgang Viechtbaueranalyses:vanhouwelingen2002 [2021/10/22 14:46] Wolfgang Viechtbauer
Line 3: Line 3:
 ==== The Methods and Data ==== ==== The Methods and Data ====
  
-The article by van Houwelingen et al. (2002) is a sequel to the introductory article by [[analyses:normand1999|Normand (1999)]] on methods for meta-analysis and focuses on more advanced techniques, such as meta-regression and multivariate models. The authors mostly use SAS throughout the article for fitting the various models. The analyses are replicated here using R..+The article by van Houwelingen et al. (2002) is a sequel to the introductory article by [[analyses:normand1999|Normand (1999)]] on methods for meta-analysis and focuses on more advanced techniques, such as meta-regression and multivariate models. The authors mostly use SAS throughout the article for fitting the various models. The analyses are replicated here using R.
  
 In the first part of the article, the models and methods are illustrated with data from 13 studies examining the effectiveness of the Bacillus Calmette-Guerin (BCG) vaccine for preventing tuberculosis (Colditz et al., 1994). The data are provided in Table I (p. 594) and can be loaded with: In the first part of the article, the models and methods are illustrated with data from 13 studies examining the effectiveness of the Bacillus Calmette-Guerin (BCG) vaccine for preventing tuberculosis (Colditz et al., 1994). The data are provided in Table I (p. 594) and can be loaded with:
Line 11: Line 11:
 dat dat
 </code> </code>
-(I copy the dataset into 'dat', which is a bit shorter and therefore easier to type further below). Variables ''tpos'' and ''tneg'' in this dataset indicate the number of individuals that were TB positive and negative in the vaccinated (treatment) group, while ''cpos'' and ''cneg'' indicate the number of individuals that were TB positive and negative in the non-vaccinated (control) group.+(I copy the dataset into ''dat'', which is a bit shorter and therefore easier to type further below). Variables ''tpos'' and ''tneg'' in this dataset indicate the number of individuals that were TB positive and negative in the vaccinated (treatment) group, while ''cpos'' and ''cneg'' indicate the number of individuals that were TB positive and negative in the non-vaccinated (control) group.
  
 We can calculate the individual log odds ratios and corresponding sampling variances with: We can calculate the individual log odds ratios and corresponding sampling variances with:
Line 279: Line 279:
 <code rsplus> <code rsplus>
 res <- rma.mv(yi, vi, mods = ~ group - 1, random = ~ group | trial, struct="UN", data=dat.long, method="ML") res <- rma.mv(yi, vi, mods = ~ group - 1, random = ~ group | trial, struct="UN", data=dat.long, method="ML")
-reg <- matreg(y=2, x=1, R=res$G, cov=TRUE, means=coef(res), n=res$g.levels.comb.k)+reg <- matreg(y=2, x=1, R=res$G, cov=TRUE, means=coef(res), n=res$g.levels.comb.k) 
 reg reg
 </code> </code>
analyses/vanhouwelingen2002.txt · Last modified: 2022/08/03 17:52 by Wolfgang Viechtbauer