[R-meta] lmer, SAS and rma.mv

Viechtbauer, Wolfgang (SP) wolfgang.viechtbauer at maastrichtuniversity.nl
Wed Apr 11 23:44:08 CEST 2018


See below.

Best,
Wolfgang

>-----Original Message-----
>From: R-sig-meta-analysis [mailto:r-sig-meta-analysis-bounces at r-
>project.org] On Behalf Of Martineau, Roger
>Sent: Friday, 06 April, 2018 17:48
>To: r-sig-meta-analysis at r-project.org
>Subject: [R-meta] lmer, SAS and rma.mv
>
>Dear list members,
>
>There are some discrepancies between summary estimates obtained from lmer
>(or SAS) and rma.mv as explained in http://www.metafor-
>project.org/doku.php/tips:rma_vs_lm_lme_lmer.
>
>My dataset includes treatment means (and corresponding SE) from several
>publications (PubID).
>
>I conducted a simple meta-analysis using the rma.mv function (res1):
>
>Dataset <- within(Dataset, {
>               INV         <- 1/SE^2
>               ID            <- 1:nrow(Dataset)
>})
>
>(res1 <- rma.mv(y ~ x1, SE^2, data= Dataset,
>                        random = ~1|PubID/ID))
>
>Can someone correct the following lmer and SAS scripts in order to get
>the results as in res1?
>
>lmer(y ~ x1 + (1|PubID), data=Dataset, weights = INV, na.action =
>"na.omit")

You cannot fit 'res1' with lmer().

>proc mixed data=Dataset covtest;;
>  class PubID;
> weight INV;
>  model y=x1 / s ddfm=sattehwaite;
>  random PubID;
>  ods output;
>proc print;
>run;

This should be the same as 'res1' above.

data Dataset;
 set Dataset;
 intcpt = 1;
run;

proc mixed method=reml data=Dataset scoring=1000 covtest;
 class PubID ID;
 model y = intcpt x1 / solution cl noint ddf=10000;
 random intercept / subject=PubID;
 random intercept / subject=ID(PubID);
 weight INV;
 parms (0) (0) (1) / hold=3;
run;

>Thanks in advance,
>
>Roger ☺
>
>
>Roger Martineau, mv Ph.D.
>Centre de recherche et de développement
>sur le bovin laitier et le porc
>Agriculture et agroalimentaire Canada/Agriculture and Agri-Food Canada
>Téléphone/Telephone: 819-780-7319
>Télécopieur/Facsimile: 819-564-5507
>2000, Rue Collège / 2000, College Street
>Sherbrooke (Québec)  J1M 0C8
>Canada
>roger.martineau at agr.gc.ca<mailto:roger.martineau at agr.gc.ca>


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