[R-meta] Comparing Models Using Anova () Error

Viechtbauer, Wolfgang (SP) wo||g@ng@v|echtb@uer @end|ng |rom m@@@tr|chtun|ver@|ty@n|
Wed Mar 24 21:33:04 CET 2021


Dear Jake,

As the error says, the datasets used to fit the two models are not identical. This is very likely a result of missing values in those moderators. Hence, the dataset used for fitting the model without the moderator is not the same as with. For a meaningful comparison, fit the model without the moderator selecting only those rows where the moderator variable is not missing (use something like subset=!is.na(...)) when fitting the model).

Best,
Wolfgang

>-----Original Message-----
>From: R-sig-meta-analysis [mailto:r-sig-meta-analysis-bounces using r-project.org] On
>Behalf Of Jake Downs
>Sent: Wednesday, 24 March, 2021 2:08
>To: r-sig-meta-analysis using r-project.org
>Subject: [R-meta] Comparing Models Using Anova () Error
>
>Apparently I have two questions tonight.
>
>I keep receiving an error on two sets of models I'm trying to compare using
>LRT via Anova command. I am confused why these models won't compare when my
>others are.
>
>I'm conducting a 3 level analysis, and as part of my moderator analysis I
>am adding a single fixed variable to the original fit, and then comparing
>the two models with anova. The original models were fit using REML, but for
>comparison purposes I have refit with ML.
>
>There are two sets of models where I get the following error:
>
>Error in anova.rma(rq1.fit2.ml, rq2.age.ml) : Observed outcomes and/or
>sampling variances/covariances not equal in the full and reduced model.
>
>Error in anova.rma(rq1.fit2.ml, rq2.dose.h.ml) : Observed outcomes and/or
>sampling variances/covariances not equal in the full and reduced model.
>
>Why might this be the case? And how can I fix it?
>
>Best (again),
>
>Jake Downs



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