[R-meta] Meta-analysis in R when there is no sampling variances

James Pustejovsky jepusto at gmail.com
Fri Jun 30 20:22:20 CEST 2017

An alternative approach to analyzing these data might be to use a
multi-level model with unknown variances at the lowest level, which are
assumed to be proportional to the inverse of the weights you've described.
Models like this could be fit using the nlme or lme4 packages. Since the
assumption that the sampling variances are proportional to the weights
might not be entirely reasonable, you might also consider using robust
standard errors (clustering on site_id) for the regression coefficient
estimates, as Wolfgang suggested. Cluster-robust variance estimation is
available in the clubSandwich package, so long as the model is fit using
nlme. Unfortunately clubSandwich doesn't yet worrk for models fit in lme4.

Or---even quicker and dirtier---you could fit a simple regression model
with lm() and weights as you've described, then cluster the standard errors
by side_id (again using clubSandwich).


On Fri, Jun 30, 2017 at 1:13 PM, Viechtbauer Wolfgang (SP) <
wolfgang.viechtbauer at maastrichtuniversity.nl> wrote:

> You cannot just replace 'vi' with 'wi'. Sampling variances and weights are
> different things.
> As I suggested, calculate approximate sampling variances if that's the
> best thing that can be done. Use those for the 'V' argument (the second
> argument -- the one that you are currently misusing for specifying weights).
> Since you have a multilevel structure, the bootstrapping needs to account
> for this. It would require considerable thought to implement this correctly.
> An alternative is (still) to use robust(), using 'site_id' as the
> clustering variable.
> Best,
> Wolfgang
> -----Original Message-----
> From: Resham Thapa [mailto:reshambt1 at gmail.com]
> Sent: Friday, June 30, 2017 19:39
> To: Viechtbauer Wolfgang (SP)
> Cc: r-sig-meta-analysis at r-project.org
> Subject: Re: [R-meta] Meta-analysis in R when there is no sampling
> variances
> ATTACHMENT(S) REMOVED: data_eg.csv
> Dear Dr. Wolfgang,
> Thank you for your quick response.
> In my dataset, I have sample size (replications) and means for both
> treatment and control groups. With that, I am calculating the log response
> ratio (lrr) as an effect size. Yes, most of the articles in my search have
> not reported SD or CV. I found that many researchers in my field prefer to
> weight effect sizes using Wi=(Nt*Nc)/(Nt+Nc); where Nt and Nc are
> replicates for treatment and control groups. Here is one link of a paper:
> https://www.researchgate.net/publication/315379724_Increased
> _plant_uptake_of_native_soil_nitrogen_following_fertilizer_
> addition_-_not_a_priming_effect ( Increased plant uptake of native soil
> nitrogen following fertilizer addition – not a priming effect?).
> My understanding is:
> 1. We can replace 'vi' with 'wi' and conduct the meta-analysis. Also, I
> think multiple effect sizes from the study and multiple studies from the
> same site will be more correlated with each other. To account for this, I
> need to perform multi-level meta-analysis using random statement as
> outlined in your website. So, my code looks like:
> library(metafor)
> dat <- read.csv('C:/Users/resham.thapa/Desktop/data_eg.csv') dat
> # Calculating weighted effect size with multiple, nested
> location/study/year as random effects.
> res <- rma.mv(lrr, wi, random = ~ 1|site_id/study_id/site_year/com_control,
> data=dat, method="REML")
> res
> Is this correct?
> 2.  Then, I need to perform non-parametric bootstrapping by slightly
> modifying the codes from your website. However, I always get error while
> running it. Any suggestions.
> library(boot)
> boot.func <- function(dat, indices) {
>   res <- try(rma.mv(lrr, wi, random = ~ 1|site_id/study_id/site_year/com_control,
> data=dat, method="REML", subset=indices), silent=TRUE)
>   if (is.element("try-error", class(res))) {
>      NA
>   } else {
>      c(coef(res), vcov(res), res$sigma)
>   }
> }
> res.boot <- boot(dat, boot.func, R=4999)
> ## There were 50 or more warnings (use warnings() to see the first 50)
> warnings()
> # 'V' appears to be not positive definite.
> boot.ci(res.boot, index=1:2)
> I have attached a subset of my data to illustrate about the nature of my
> data-set more clearly. Thank you in advance.
> Regards'
> Resham
> _______________________________________________
> R-sig-meta-analysis mailing list
> R-sig-meta-analysis at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-meta-analysis

	[[alternative HTML version deleted]]

More information about the R-sig-meta-analysis mailing list