You are here

Errors while including covariates to metaSEM

3 posts / 0 new
Last post
MaxScott's picture
Offline
Joined: 01/01/2018 - 17:54
Errors while including covariates to metaSEM

I'm attempting to add covariates to network meta-analytic model that I`m fitting in metasem. As i know, the network meta-analytic model is designed to model comparisons betwixt a reference group and a set of alternative groups. Each comparison between the reference and other groups is modeled as a independent outcome. The S matrix in those models is often quite sparse because it is generally the case that only ~50% the studies contain multi-group designs, so one often needs to place constraints on the between-studies covariance matrix for the model to be detectable.

I am able to fit the model with a covariate applying the mvmeta package in R, and I have seen that there is variance in my covariate for each of the outcomes (i.e., comparisons between reference and other groups) in the meta-analysis. But, when I attempt to fit the model with the single covariate in metasem, I receive this error:

Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
0 (non-NA) cases

Does anyone have any idea what's happening here? I also have tried fitting the covariate model on subsets of the data (i.e., using only one of the 11 outcomes from the meta-analysis) without generating these errors. My data and a script are attached bellow.

Code_for_metaSEM_forum.R
Data_for_metaSEM_forum.csv

Mike Cheung's picture
Offline
Joined: 10/08/2009 - 22:37
Hi Max,

Hi Max,

lm.fit() is used to get the starting values of the fixed-effects coefficients. The error message seems to suggest that there is no valid case.

However, I cannot replicate the error. Your code works fine on my computer. I am using the latest versions of CRAN and Linux. Could you try again with the latest versions and see if they work?

Mike

File attachments: 
MaxScott's picture
Offline
Joined: 01/01/2018 - 17:54
Hi Mike,

Hi Mike,

I updated CRAN to the latest version and now all works fine.
Thank you!

Log in or register to post comments