[R-meta] metafor package in R - Risk ratios using rma.mv()
Gerta Ruecker
Ruecker @end|ng |rom |mb|@un|-|re|burg@de
Fri Jul 26 22:32:46 CEST 2019
Dear Olivia,
Do you mean risk ratios or incidence rate ratios?
Incidence rate ratios (IRR) can also be meta-analyzed using the R package meta, function metainc(). For an example, look into the help file of metainc() or try the code
install.packages("meta")
library(meta)
data(smoking)
m1
Best,
Gerta
----------------ursprüngliche Nachricht-----------------
Von: Olivia Cords [ocords using alumni.stanford.edu ]
An: r-sig-meta-analysis using r-project.org
Datum: Fri, 26 Jul 2019 12:27:09 -0700
----------------------------------------------------------
>
>
>Hello!
>My name is Olivia and I'm a researcher at Stanford University. Our group is trying to
>calculate relative risk ratios for the a meta-analysis extracting incidence rates of
>tuberculosis disease using the metafor package.
>
>Study Design:
>Incidence rates were extracted for each study identified by a systematic review, with
>some studies reporting multiple rates for different years or locations. In this case,
>multiple rates were treated as different study cohorts, meaning that the data is clustered
>('cohort_id' nested within 'study_id').
>
>Model:
>We used the [ http://rma.mv/ -> rma.mv ]() function, inputting the calculated
>incidence rate as the outcome variable ('pdc$yi), the variance ('pdc$vi'), WHO region
>('who_region') and whether the study was conducted through passive or active screening
>(passive_active') as moderators, and a random effects argument for the study level ('study_id'). We are
>unclear how to go from the output to Risk Ratios.
>
>Data:
>
> study_id - cohort_id - n_diagnosed - person_years - who_region -
>passive_active
> 131 - 34 - 77 - 14298 - 1Americas - 1Passive
> 93 - 120 - 5 - 27750 - 1Americas - 1Passive
> 93 - 121 - 14 - 277150 - 1Americas - 1Passive
> 93 - 122 - 15 - 2000 - 1Americas - 1Passive
> 136 - 383 - 2 - 2000 - Africa - 2Active
> 136 - 383 - 7 - 100000 - Africa - 2Active
> 187 - 16 - 16 - 100000 - Africa - 3Not Specified
> 187 - 517 - 2 - 100000 - S.E. Asia - 3Not Specified
>
>Code:
>
>library(xlsx)
>library(metafor)
>
>data
>#calculating the incidence rate and the variance
>pd_ec
>#first level cohort incidence rate and variation
>#second level study_id
>#who_region and passive_active as moderators
>m0 rma.mv ](pd_ec$yi, pd_ec$vi, method='REML', mods = ~ who_region +
>passive_active,
> random= ~ 1 | study_id,
> tdist=TRUE,
> data=pd_ec)
>
>summary(m0)
>
>Output:
>Multivariate Meta-Analysis Model (k = 8; method: REML)
logLik Deviance AIC BIC AICc
>
15.4961 -30.9922 -20.9922 -24.0607 39.0078
Variance Components:
estim sqrt
>nlvls fixed factor
sigma^2 0.0000 0.0037 4 no study_id
Test for Residual
>Heterogeneity:
QE(df = 4) = 94.4465, p-val ci.lb ] ci.ub
intrcpt 0.0027 0.0027 1.0073 0.3708 -0.0047 0.0101
>
who_regionAfrica -0.0025 0.0046 -0.5493 0.6120 -0.0153 0.0102
who_regionS.E. Asia -0.0027 0.0046
>-0.5797 0.5932 -0.0154 0.0101
passive_active2Active -0.0001 0.0053 -0.0167 0.9874
>-0.0148 0.0146
>
>Any advice/insight in much appreciated!
>
>Best wishes,
>Olivia
>
>
__________________________________________________
Gerta Ruecker
Institute of Medical Biometry and Statistics,
Faculty of Medicine and Medical Center - University of Freiburg
Postal Address: Stefan-Meier-Str. 26, 79104 Freiburg
Phone: +49/761/ 203-6673
Mail: Ruecker using imbi.uni-freiburg.de
Homepage: http://www.imbi.uni-freiburg.de
[[alternative HTML version deleted]]
More information about the R-sig-meta-analysis
mailing list