# Many missing correlations

13 posts / 0 new
Offline
Joined: 10/24/2019 - 14:02
Many missing correlations

Dear Mike,
I am currently working on a metaSEM study. I've got some error, even I tried to use different methods (see below!). I also asked for a pattern of NA. I would like to ask if, in your opinion, the error messages are related to missing correlations? I have 379 lines, but only 1 or 2 correlations for some variables. Is there a way to continue this study? Maybe dropping some variables?
All the best,
Robert

sstage1fixed <- tssem1(Cov=cordat, n=data$N, method="FEM") Error in if (!all(isPD)) warning(paste("Group ", (1:no.groups)[!isPD], : missing value where TRUE/FALSE needed stage1fixed <- tssem1(Cov=cordat, n=data$N, method="REM")
Error in solve.default(t(X) %% V_inv %% X) :
Lapack routine dgesv: system is exactly singular: U[1,1] = 0

> pattern.na(cordat,show.na=FALSE)
v1 v2 v3 v4 v5 v6
v1 1 10 2 8 19 7
v2 10 0 25 30 210 16
v3 2 25 3 7 68 7
v4 8 30 7 4 40 18
v5 19 210 68 40 3 17
v6 7 16 7 18 17 341

Offline
Joined: 10/08/2009 - 22:37
Hi Robert,

Hi Robert,

Could you please post the code and data? Thanks.

Mike

Offline
Joined: 10/24/2019 - 14:02
Hi Mike,

Hi Mike,
I've attached the R code and the data file. I am eager to find out your opinion regarding my data. Is it possible to extract and use a summary matrix?
Robert

File attachments:
Offline
Joined: 10/08/2009 - 22:37
Hi Robert,

Hi Robert,

You may try the following approaches:

## Fixed-effects model
stage1fixed  <- tssem1(Cov=cordat, n=data$N, method="REM", RE.type="Zero") summary(stage1fixed) ## Random-effects model stage1random <- tssem1(Cov=cordat, n=data$N, method="REM")
## Rerun it by automatically fixing the negative variances to zero
stage1random <- rerun(stage1random, autofixtau2 = TRUE)
summary(stage1random)

Mike

Offline
Joined: 10/24/2019 - 14:02
Dear Mike,

Dear Mike,
This is a great help. Thank you so much!
Best wishes
Robert

Offline
Joined: 10/24/2019 - 14:02
An other TSSEM error

Dear Mike,
With your help, I managed to aggregate the correlations in the first stage of a random effect TSSEM metaSEM analysis. While trying to estimate the fit the model-data consistency, I encountered two error messages:

1: In .solve(x = object$mx.fit@output$calculatedHessian, parameters = my.name) :
Error in solving the Hessian matrix. Generalized inverse is used. The standard errors may not be trustworthy.
2: In checkRAM(Amatrix = Amatrix, Smatrix = Smatrix, cor.analysis = cor.analysis) :
The variances of the independent variables in 'Smatrix' must be fixed at 1.

1. I solved the Smatrix problem by fixing the variance of exogenous variables to 1, the only estimated variances are those of the endogenous variables. I think it is solved (see the attached Rcode).
2. After consulting other threads on this forum I understood that the first type of error is frequently due to the reduced (close to zero) heterogeneities of some correlations (given to a low number of studies). I have seen that these parameters should be set to zero but it is not clear in the current model how to do this?
I have attached the entire Rcode, the obtained output and data files. I would appreciate your help, time and consideration!
Regards,
Robert
File attachments:
Offline
Joined: 10/08/2009 - 22:37
Hi Robert,

Hi Robert,

It seems that you are using an old version of metaSEM. Could you please update it and rerun it again?

When you post the R code, could you also remove the ">" and "+" symbols so that we can run the code? Thanks.

Best,
Mike

Offline
Joined: 10/24/2019 - 14:02
Hi Mike,

Hi Mike,
Thank you for your suggestion, I have updated my metaSEM and now I have an output. I encountered some difficulties in running stage1random <- rerun(stage1random, autofixtau2 = TRUE) code, several times appeared a warning message " Not all eigenvalues of Hessian are greater than 0:" (see the attached output). Finally, after specifying the model I managed to estimate the parameters of the model, but I have some concerns about the last warning message I got regarding OpenMx status1 (see below). Sorry for the inconvenient format of the sent code, now I have removed all the mentioned elements and it can be run.
You already helped me a lot, many thanks!
Best,
Robert

"OpenMx status1: 6 ("0" or "1": The optimization is considered fine.
Other values indicate problems.)

File attachments:
Offline
Joined: 10/08/2009 - 22:37
Hi Robert,

Hi Robert,

The stage 2 analysis seems to work better without the diagonal constraints, i.e., diag.constraints=FALSE.
It works fine for me.

Best,
Mike

File attachments:
Offline
Joined: 10/24/2019 - 14:02
Dear Mike,

Dear Mike,
I have to thank you once again for your time and priceless help. However, I would like to ask two more questions that would help me to complete this project.
The first question concerns the possibility of using metaSEM for exploratory purposes, more precisely, is there a possibility to calculate modification indices in metaSEM?
The second question is about non-independent correlations. I read a lot about how to handle such dependencies in MASEM, but I am not sure how should I handle them in metaSEM? Can you help me with some advice in this regard? Perhaps, should we use the same strategy when we have multiple, correlated dependent variables or multiple, correlated independent variables?
Best,
Robert

Offline
Joined: 10/08/2009 - 22:37
Dear Robert,

Dear Robert,

For the first question, you may try the mxMI() in OpenMx. As I haven't tried it before, I don't know how good it is. Using the Digman97 example in the metaSEM package, you may try:

MI.fit <- mxMI(fixed2$mx.fit, matrices="Amatrix", full=FALSE) MI.fit$MI

Regarding the second question, I don't have a good answer yet. There are different types of dependence. For example, repeated measures and nested samples.

Best,
Mike

Offline
Joined: 10/24/2019 - 14:02