Attachment | Size |
---|---|
model.png [6] | 29.76 KB |
dataset158.txt [7] | 7.33 KB |
scriptdataset158.R [8] | 2.81 KB |
dataset38.txt [9] | 1.63 KB |
scriptdataset38.R [10] | 2.21 KB |
Dear Mike,
I'm a beginner in R and metaSEM. I'm performing a meta-analytic path model with 3 predictor variables, 1 mediator and 1 dependent variable (5 variables in total and 158 primary studies) as you can see in the figure.
I run the fix effects in the full dataset (158) but it is not possible because the missing values, but neither is possible to run the random effects (1stage).
I've notice the missing values problem due to the function is.pd, so I reduced the full dataset to 38 studies that cotains at least 1 value in the variable mediator, but it doesn't work. Curiously with a random set of 43 studies it was not a problem to run the random effects (1stage) (unfortunely I lost the dataset to probe it).
The problem is "x is not positive definite!". I don't understand why it happened in one case but in the other not.
1) Is there a way to solve this problem from the full dataset (158) without removing correlation matrices?
2) Taking in account the reduced dataset (38) is it possible to fix the "x is not positive definite!"?
3) By the way, following the rest of the code, is right specified?
I thank you in advance for your kind attention to this message and all the help you can provide me.