Dr. Mike,

I am running multiple structural models and appear to have the same issue with all the models. In each of the outputs the certain paths appear to be fixed to 1.0 and another value.

For instance in the structural model, EU -> BI -> U (files EUBIU.dat & EUBIU.R), the paths from EU -> BI = 1 and the path from BI -> U = 1.

Another model (files PUEUBI.data & PUEUBI.R), the paths EU -> PU = 1.0, while the paths from EU -> BI and PU -> BI are both equal to 1.0.

I think I may be constraining these paths to be either equal to 1.0 or equal to each other.

I have attached the syntax and data sets I used for your convenience . The syntax is modified from Cheung (2013) metaSEM: An R Package for Meta-Analysis using Structural Equation Modeling. Any assistance is greatly appreciated.

Thanks,

Nicola

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

EUBIUdata.dat | 244 bytes |

EUBIU.R | 2.95 KB |

PUEUBIdata.dat | 424 bytes |

PUEUBI.R | 4.18 KB |

Hi Nicola,

I think that you have incorrectly introduced the latent variables in the model. In the example of EUBIU, the A matrix is:

x1 x2 x3 Alpha Beta

x1 "0" "0" "0" "1*Alpha_x1" "0"

x2 "0" "0" "0" "0" "1*Alpha_x2"

x3 "0" "0" "0" "0" "0"

Alpha "0" "0" "0" "0" "0"

Beta "0" "0" "0" "0" "0"

and the S matrix is:

x1 x2 x3 Alpha Beta

x1 ".3*e1" "0" "0" "0" "0"

x2 "0" ".3*e2" "0" "0" "0"

x3 "0" "0" ".3*e3" "0" "0"

Alpha "0" "0" "0" "1" "0"

Beta "0" "0" "0" "0" "1"

The model is not identified as there is only one indicator per factor and x3 is not loaded in any factor.

If your model is x1 -> x2 -> x3 (without the direct effect from x1 to x3), the following syntax works for me:

A2 <- matrix(c(0,0,0,

"0*x1tox2",0,0,

0,"0*x2tox3",0),

nrow=3, ncol=3, byrow=TRUE)

dimnames(A2) <- list(c("x1", "x2", "x3"), c("x1", "x2", "x3"))

A2

A2 <- as.mxMatrix(A2)

S2 <- Diag(c(1,"0.2*Varx2","0.2*Varx3"))

dimnames(S2) <- list(c("x1", "x2", "x3"), c("x1", "x2", "x3"))

S2

S2 <- as.mxMatrix(S2)

# diag.constraint=TRUE is required since there is a mediator (x2)

random2 <- tssem2(random1, Amatrix = A2, Smatrix = S2, diag.constraint=TRUE, intervals.type="LB")

summary(random2)

Hope it helps.

Mike

Dr. Mike,

Thank you for responding. Your feedback was most helpful. I see how I introduced the latent variables inappropriately. The model I intended to run is x1 -> x2 -> x3 (without the direct effect from x1 to x3), as you stated. I ran the model using the syntax your provided and it worked for me as well. Thank you again for your feedback.

In the case of PUEUBIdata, the model is x1 -> x3, x2 -> x3, and x2 -> x1 (I've attached a figure for your convenience.) Would the syntax then be the following:

A2 <- matrix(c(0,"0*x2tox1",0,0,0,0,"0*x1tox3","0*x2tox3",0),nrow=3, ncol=3, byrow=TRUE)

dimnames(A2) <- list(c("x1", "x2", "x3"), c("x1", "x2", "x3"))

A2

A2 <- as.mxMatrix(A2)

S2 <- Diag(c("0.2*Varx1",1,"0.2*Varx3"))

dimnames(S2) <- list(c("x1", "x2", "x3"), c("x1", "x2", "x3"))

S2

S2 <- as.mxMatrix(S2)

Thanks again for your consideration and feedback,

Nicola

Hi, Nicola.

It seems correct. When you are fitting the model, please make sure to include the diag.constraints=TRUE in tssem2().

Cheers,

Mike

Hi Nicola

I'm not sure I'm the Dr. Mike you were looking for, but perhaps I can help anyway. I took a look at this and note that a) MetaSEM is pretty cool, and b) there seems to be something a bit odd about the model.

MetaSEM puts the model, both fitted and not, into its output, from which we can explore the objects in the model, particularly the A, S and F matrices, and what they generate in the way of expected covariances. It seems that the variance of the third variable ends up at zero. So I don't think the problem is that the parameters are fixed, but that there is a model specification issue such that the parameters don't have any effect on the fit of the model. Note also the IFAIL code of 6 which indicates an issue with identification. Nothing in the A matrix affects variable 3 (3rd row all zero). The S matrix for element 3,3 is also zero. So you end up with zero variance for variable 3, and zero covariance with anything else. Using mxEval() to compute the expected covariance matrix, and then back tracing the individual matrices, we get:

Hi Neale,

Thank you for your response. I agree MetaSEM is cool! Thank you for pointing out the model specification issue and showing me how to compute the expected covariance matrix. Your feedback is helpful.

Best regards,

Nicola