[R-meta] metafor::matreg() and its workflow

Stefanou Revesz @te|@noureve@z @end|ng |rom gm@||@com
Thu Dec 9 18:39:44 CET 2021


Thanks Wolfgang,

But is what I have done a methodologically reasonable way to do this,
or a more reasonable way exists.

It's great that vcov() or random effects var-covariance matrix can be
obtained from an rma.mv() fit and then used in a secondary SEM
framework.

But it seems to me that moderators used in rma.mv() get in the way,
and I often have several of them.

So, is there any literature on this or a strategy to get around the
problem of moderators in the rma.mv() fit?

Thank you for your guidance,
Stefanou


On Thu, Dec 9, 2021 at 11:17 AM Viechtbauer, Wolfgang (SP)
<wolfgang.viechtbauer using maastrichtuniversity.nl> wrote:
>
> >-----Original Message-----
> >From: Stefanou Revesz [mailto:stefanourevesz using gmail.com]
> >Sent: Tuesday, 07 December, 2021 23:41
> >To: Viechtbauer, Wolfgang (SP)
> >Cc: R meta
> >Subject: Re: metafor::matreg() and its workflow
> >
> >Hi Wolfgang,
> >
> >Once again, thank you for the chapter and the two useful resources.
> >For concreteness, are the last two lines OK to use or other solutions
> >exist?
> >
> >Many thanks,
> >Stefanou
> >
> >set.seed(0)
> >dat <- dat.craft2003
> >dat$Xwb <- rnorm(nrow(dat),rnorm(nrow(dat),9,4),2)
> >
> >tmp <- rcalc(ri ~ var1 + var2| study, ni=ni, data=dat)
> >V <- tmp$V
> >dat$var1.var2 <- tmp$dat$var1.var2
> >
> >dat$var1.var2 <- factor(dat$var1.var2,
> >                        levels=c("acog.perf", "asom.perf",
> >"conf.perf", "acog.asom", "acog.conf", "asom.conf"))
> >
> >res <- rma.mv(ri~ 0+var1.var2+sport+Xwb, V, random = ~ var1.var2 |
> >study, struct="UN", data=dat)
> >
> >R <- vec2mat(coef(res)[1:6]) # Is this OK?
>
> The first 6 coefficients are the estimated pooled correlations when 'sport' is I and when Xwb is 0. If this is what you want, then this is ok.
>
> >matreg(1, 2:4, R=R, V=vcov(res)[1:6,1:6]) # Is this OK?
>
> If the above is ok, then this is ok.
>
> Best,
> Wolfgang



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