[R-meta] equivalence of weighted regression and MA in the context of complex models
ye|eng@y@ng1 @end|ng |rom un@w@edu@@u
Tue Apr 4 05:30:02 CEST 2023
Thanks for providing insights and this blog, which is very comprehensive and useful (actually, I am a big fan of your blog website). Additive heterogeneity and multiplicative heterogeneity is an interesting topic in the context of meta-analysis. I know many people are against multiplicative heterogeneity, but it is useful in some (important) circumstances - this is what I want to illustrate in my paper. Regarding the matrix notation, I know matrix notation is more elegant. The word "best" I used in my previous email is restricted to question because I want to know how to represent model coefficients estimated from the multilevel model using summation notation - it is not meant that matrix notation is not good. Sorry for the confusion.
Actually, I am going to write to you to consult with you about how to properly calculate robust cluster errors for weighted regression (or weighted lease square), which is fitted by lm() with the weight argument. I saw one of your illustrations using the target argument in coef_test() to account for weights when calculating robust SE and doing corresponding hypothesis testing (I did not find the description of this argument in the package documentation). I am curious about your general recommendation of how to use the combination of weighted regression and robust variance estimation (which is implemented in clubsandwhich package).
From: James Pustejovsky <jepusto using gmail.com>
Sent: Tuesday, 4 April 2023 12:09
To: R Special Interest Group for Meta-Analysis <r-sig-meta-analysis using r-project.org>
Cc: Yefeng Yang <yefeng.yang1 using unsw.edu.au>
Subject: Re: [R-meta] equivalence of weighted regression and MA in the context of complex models
On my first point, I explore the case of meta-regression where the predictors vary only at the top level of the model in this post:
On Mon, Apr 3, 2023 at 9:06 PM James Pustejovsky <jepusto using gmail.com<mailto:jepusto using gmail.com>> wrote:
Comments inline below.
On Mon, Apr 3, 2023 at 8:27 PM Yefeng Yang via R-sig-meta-analysis <r-sig-meta-analysis using r-project.org<mailto:r-sig-meta-analysis using r-project.org>> wrote:
I am working on one paper, in which I want to show the equivalence of weighted regression and random-effects meta-analysis in the context of the multilevel model. Basically, it is an extension of Wolfgang's bloghttp://www.metafor-project.org/doku.php/tips:rma_vs_lm_lme_lmer<http://www.metafor-project.org/doku.php/tips:rma_vs_lm_lme_lmer>
The intercept-only model works very well. We can get the same model coefficients (estimated fixed effect or intercept beta0) from the two models:
dat <- dat.konstantopoulos2011
res.ml<http://res.ml> <- rma.mv<http://rma.mv>(yi, vi, random = list(~1|district, ~1|study), test = "t", data=dat)
res.ml.lm <- lm(yi ~ 1, weights = rowSums(solve(vcov(res.ml<http://res.ml>, type="obs"))), dat = dat)
If I do a post-hoc adjustment to the SE(beta0) of res.ml<http://res.ml>, we can get the same SE from res.ml.lm:
However, when I was working on meta-regression, it did not work. see the below syntax:
# regression with vi as a predictor
res.mr<http://res.mr> <- rma.mv<http://rma.mv>(yi, vi, random = list(~1|district, ~1|study), mods = ~ vi, test = "t", data=dat)
res.ml.lm <- lm(yi ~ vi, weights = rowSums(solve(vcov(res.ml<http://res.ml>, type="obs"))), dat = dat)
This is a key illustration of my working paper. Hopefully, I can get some help from here, especially from Wolfgang.
It is not possible to represent this model as a weighted linear regression within the scope of lm(). The rma.mv<http://rma.mv>() estimator uses generalized least squares with block-diagonal weight matrices and it is not generally possible to translate those block-diagonal weights into diagonal weights except under some pretty specific, restrictive circumstances (such as when the mods vary only at the highest level of the model).
Also, I would be grateful if someone would like to provide the formula to estimate model slopes for meta-regression in non-matrix notation. Summation notation is the best one - matrix notation is elsewhere.
Why? The matrix notation is extremely useful for this sort of thing, whereas summation notation is cumbersome and awkward once you are working with regression/meta-regression models (especially when estimated by generalized least squares).
Yefeng Yang PhD
[[alternative HTML version deleted]]
R-sig-meta-analysis mailing list @ R-sig-meta-analysis using r-project.org<mailto:R-sig-meta-analysis using r-project.org>
To manage your subscription to this mailing list, go to:
[[alternative HTML version deleted]]
More information about the R-sig-meta-analysis