[R-meta] rma.mv to lme possible?

Timothy MacKenzie |@w|@wt @end|ng |rom gm@||@com
Fri Nov 26 16:40:03 CET 2021


Sure, but is it possible to get only the fixed effect estimates and
their SEs and replace them for their corresponding slots in a new
lme() or lmer() object?

For example, for my small data, the new lmer() call (disregarding the
warnings) is below. Once replaced (new "aa2" object below), it should
work as in:     effects::allEffects(aa2)

Thanks,
Tim M

aa <- lmer(yi ~ 0 + study_type + (study_type | study) +
         (interaction(study_type,reporting) | obs),
         data = dat1,
         control =
         lmerControl(check.nobs.vs.nRE="ignore",check.nobs.vs.nlev="ignore"))

aa2 <- "aa" object with fixed fixed effect estimates and their SEs
replaced with those from "g"

On Fri, Nov 26, 2021 at 4:05 AM Viechtbauer, Wolfgang (SP)
<wolfgang.viechtbauer using maastrichtuniversity.nl> wrote:
>
> Hi Tim,
>
> The internal structures of rma.mv and lme objects are so inherently different that it would take a lot of effort to write a converter function.
>
> Best,
> Wolfgang
>
> >-----Original Message-----
> >From: R-sig-meta-analysis [mailto:r-sig-meta-analysis-bounces using r-project.org] On
> >Behalf Of Timothy MacKenzie
> >Sent: Friday, 26 November, 2021 6:27
> >To: R meta
> >Subject: Re: [R-meta] rma.mv to lme possible?
> >
> >More generally, is there a way to convert/switch an rma.mv() fitted
> >object to a corresponding lme() fitted object such that then I can use
> >the resulting object in R packages like "library(effects)"
> >(https://cran.r-project.org/web/packages/effects/index.html) for
> >plotting purposes?
> >
> >Thanks,
> >Tim M
> >
> >On Thu, Nov 25, 2021 at 7:57 PM Timothy MacKenzie <fswfswt using gmail.com> wrote:
> >>
> >> Dear All,
> >>
> >> I've specified the following rma.mv() model for my meta-analysis.
> >> However, I'm wondering how to replicate this model using lme() from
> >> the nlme package (sample data is provided below)?
> >>
> >> V <- with(dat1, clubSandwich::impute_covariance_matrix(vi,study,r=.6))
> >>
> >> g<-rma.mv(yi ~ 0 + study_type, V, random = list(~study_type | study,
> >> ~interaction(study_type,reporting) | obs), struct = c("DIAG","DIAG"),
> >> data = dat1)
> >>
> >> I'm open to either ML or REML methods of estimation. I have tried the
> >> following with no success:
> >>
> >>  lme(yi ~ 0 + study_type,
> >>     random = list(~study_type | study,
> >>                           ~interaction(study_type,reporting) | obs),
> >>     weights = varComb(varFixed(~vi),
> >>                       varIdent(form = ~study | study_type),
> >>                       varIdent(form = ~obs    |
> >> interaction(study_type,reporting))),
> >>       correlation = corCompSymm(.6, ~1|study, fixed = TRUE),
> >>       data = dat1,
> >>       control=lmeControl(sigma = 1,returnObject=TRUE))
> >>
> >> Thanks,
> >> Tim M
> >> d="
> >> study subscale  reporting  obs include yi   vi         study_type
> >> 1        A      subscale   1   yes     1.94 0.33503768 standard
> >> 1        A      subscale   2   yes     1.06 0.01076604 standard
> >> 2        A      subscale   3   yes     2.41 0.23767389 standard
> >> 2        A      subscale   4   yes     2.34 0.37539841 standard
> >> 3        A&C    composite  5   yes     3.09 0.31349510 standard
> >> 3        A&C    composite  6   yes     3.99 0.01349510 standard
> >> 4        A&B    composite  7   yes     2.90 0.31349510 standard
> >> 4        A&B    composite  8   yes     3.01 0.91349510 standard
> >> 5        G&H    composite  9   yes     2.01 0.97910095 alternative
> >> 5        G&H    composite  10  yes     2.11 0.37910095 alternative
> >> 6        E&G    composite  11  yes     2.01 0.67910095 alternative
> >> 6        E&G    composite  12  yes     2.11 0.87910095 alternative
> >> 7        E      subscale   13  yes     0.08 0.21670360 alternative
> >> 7        G      subscale   14  yes     0.77 0.91297170 alternative
> >> 8        F      subscale   15  yes     1.08 0.81670360 alternative
> >> 8        E      subscale   16  yes     1.07 0.91297170 alternative"
> >>
> >> dat1 <- read.table(text=d,h=T)



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