Attachment | Size |
---|---|

matrix.dat [6] | 62.18 KB |

Hi Mike,

I am currently trying to fit a multivariate metaSEM model. I am getting a non-positive definite matrix when fitting a random effects model, and this is likely expected due to a lot missing data in the attached datafile. Would you agree that this is the reason behind the non-positive definite error? Please also note that I tried running the model with fewer studies that provided more data (the number of studies went from 108 to 44) but the errors were the same.

Additionally, I can’t seem to fit the fixed effects model. Given that I am new to R, I was hoping you could look at my code below and let me know how you have handled “NA” or missing values in metaSEM. Below is all the code I have used, as well as the errors.

Thanks in advance,

Yusra

#importing the dataset with a matrix for each sample

my.full

#creating an object with the sample sizes

n

#random effects model

> random.full
Error in function (x, n, cor.analysis = TRUE, dropNA = FALSE, as.matrix = TRUE, :

x is not positive definite!

#fixed effects model

> fixed1
Error in !all.equal(my.range[1], my.range[2]) : invalid argument type

In addition: Warning messages:

1: In min(x, na.rm = na.rm) :

no non-missing arguments to min; returning Inf

2: In max(x, na.rm = na.rm) :

no non-missing arguments to max; returning -Inf