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

new model | 27.62 KB |

original model | 29.57 KB |

Hello there!

I'm having trouble with a model investigating change in anxiety over time. In the future, I will be building out a more complex model with other factors predicting change in anxiety over time, but I'm now just at a step before that looking into a model with only change in anxiety over time--only for two time points.

Even before I did this step, I looked into invariance over time for the items that make up the latent factor of anxiety at both time points. This was a brief four item measure of anxiety. That initial test looked good with positive variances and a good fit.

I used the method to form a latent change factor using the McArdle method from his 2009 paper "Latent Variable Modeling of Differences and Changes with Longitudinal Data." However, I was getting negative variance when I did this. This is the code for this model (I have attached the visual for this original model):

Finalmodelanxietystep2<-mxModel(model="finalmodelanxietystep2", type="RAM", manifestVars=manifests, latentVars=latents, mxPath(from="Time2anxiety", to="Time2anxiety_1a", arrows=1, free=TRUE, values=0.8476268, labels=c("anxanx1a")), mxPath(from="Time2anxiety", to="Time2anxiety_1b", arrows=1, free=TRUE, values=0.8577030, labels=c("anxanx1b")), mxPath(from="Time2anxiety", to="Time2anxiety_1f", arrows=1, free=TRUE, values=0.8541549, labels=c("anxanx1f")), mxPath(from="Time2anxiety", to="Time2anxiety_1h", arrows=1, free=TRUE, values=0.8378001, labels=c("anxanx1h")), mxPath(from="Time4anxiety", to="Time4anxiety_1a", arrows=1, free=TRUE, values=0.8476268, labels=c("anxanx1a")), mxPath(from="Time4anxiety", to="Time4anxiety_1b", arrows=1, free=TRUE, values=0.8577030, labels=c("anxanx1b")), mxPath(from="Time4anxiety", to="Time4anxiety_1f", arrows=1, free=TRUE, values=0.8541549, labels=c("anxanx1f")), mxPath(from="Time4anxiety", to="Time4anxiety_1h", arrows=1, free=TRUE, values=0.8378001, labels=c("anxanx1h")), mxPath(from = "L1", to = "Time2anxiety", arrows=1, free=FALSE , values=1, labels=c("L1T2anx")), mxPath(from = "L2", to = "Time4anxiety", arrows=1, free=FALSE , values=1, labels=c("L2T4anx")), mxPath(from = "L1", to = "L2", arrows=1, free=FALSE , values=1, labels=c("L1L2")), mxPath(from = "changeanxiety", to = "L2", arrows=1, free=FALSE , values=1, labels=c("changeanxT4L2")), mxPath(from ="L1", to = "changeanxiety", arrows = 2, free=TRUE, values = -.9, labels=c("L1changeanx")), mxPath(from = "L1", to = "L1", arrows = 2, free=FALSE, values = 1, labels=c("L1var")), mxPath(from = "Time2anxiety", to = "Time2anxiety", arrows = 2, free=FALSE, values = 1, labels=c("T2anxvar")), mxPath(from = "Time4anxiety", to = "Time4anxiety", arrows = 2, free=FALSE, values = 1, labels=c("T4anxvar")), mxPath(from = "changeanxiety", to = "changeanxiety", arrows = 2, free=TRUE, values = 100, labels=c("changeanxvar")), mxPath(from = "Time2anxiety_1a", to = "Time2anxiety_1a", arrows = 2, free=TRUE, values = 0.5647315, labels=c("anx1avar")), mxPath(from = "Time2anxiety_1b", to = "Time2anxiety_1b", arrows = 2, free=TRUE, values = 0.3528205, labels=c("T2anx1bvar")), mxPath(from = "Time2anxiety_1f", to = "Time2anxiety_1f", arrows = 2, free=TRUE, values = 0.5079372, labels=c("anx1fvar")), mxPath(from = "Time2anxiety_1h", to = "Time2anxiety_1h", arrows = 2, free=TRUE, values = 0.5221816, labels=c("anx1hvar")), mxPath(from = "Time4anxiety_1a", to = "Time4anxiety_1a", arrows = 2, free=TRUE, values = 0.5647315, labels=c("anx1avar")), mxPath(from = "Time4anxiety_1b", to = "Time4anxiety_1b", arrows = 2, free=TRUE, values = 0.2175539, labels=c("T4anx1bvar")), mxPath(from = "Time4anxiety_1f", to = "Time4anxiety_1f", arrows = 2, free=TRUE, values = 0.5079372, labels=c("anx1fvar")), mxPath(from = "Time4anxiety_1h", to = "Time4anxiety_1h", arrows = 2, free=TRUE, values = 0.5221816, labels=c("anx1hvar")), mxPath(from = "one", to = "changeanxiety", arrows=1, free=TRUE, values = -1.5, labels=c("mchangeanx")), mxPath(from = "one", to = "Time4anxiety", arrows=1, free=FALSE, values = 0, labels=c("mT4anx")), mxPath(from = "one", to = "Time2anxiety", arrows=1, free=FALSE, values = 0, labels=c("mT2anx")), mxPath(from = "one", to = "L1", arrows=1, free=FALSE, values = 0, labels=c("mL1")), mxPath(from = "one", to = "Time2anxiety_1a", arrows=1, free=TRUE, values = 2.29, labels=c("mT2anx1a")), mxPath(from = "one", to = "Time2anxiety_1b", arrows=1, free=TRUE, values = 1.68, labels=c("mT2anx1b")), mxPath(from = "one", to = "Time2anxiety_1f", arrows=1, free=TRUE, values = 1.85, labels=c("mT2anx1f")), mxPath(from = "one", to = "Time2anxiety_1h", arrows=1, free=TRUE, values = 1.68, labels=c("mT2anx1h")), mxPath(from = "one", to = "Time4anxiety_1a", arrows=1, free=TRUE, values = 2.22, labels=c("mT4anx1a")), mxPath(from = "one", to = "Time4anxiety_1b", arrows=1, free=TRUE, values = 1.60, labels=c("mT4anx1b")), mxPath(from = "one", to = "Time4anxiety_1f", arrows=1, free=TRUE, values = 1.81, labels=c("mT4anx1f")), mxPath(from = "one", to = "Time4anxiety_1h", arrows=1, free=TRUE, values = 1.65, labels=c("mT4anx1h")), mxData(observed=mydata8, type="raw")) Finalmodelanxietystep2Run <-mxTryHard(Finalmodelanxietystep2) refMods<-mxRefModels(Finalmodelanxietystep2Run, run = T) summary(Finalmodelanxietystep2Run, refModels=refMods)

No matter what I used as starting points for the variance in change in anxiety and the covariance of L1 and change in anxiety, it always came up as the same negative number, -.69.

Then, I thought that maybe I should also add in the covariance between T2 anxiety and T4 anxiety, like this (only added piece is the T2anxT4anx parameter):

Finalmodelanxietystep2<-mxModel(model="finalmodelanxietystep2", type="RAM", manifestVars=manifests, latentVars=latents, mxPath(from="Time2anxiety", to="Time2anxiety_1a", arrows=1, free=TRUE, values=0.8476268, labels=c("anxanx1a")), mxPath(from="Time2anxiety", to="Time2anxiety_1b", arrows=1, free=TRUE, values=0.8577030, labels=c("anxanx1b")), mxPath(from="Time2anxiety", to="Time2anxiety_1f", arrows=1, free=TRUE, values=0.8541549, labels=c("anxanx1f")), mxPath(from="Time2anxiety", to="Time2anxiety_1h", arrows=1, free=TRUE, values=0.8378001, labels=c("anxanx1h")), mxPath(from="Time4anxiety", to="Time4anxiety_1a", arrows=1, free=TRUE, values=0.8476268, labels=c("anxanx1a")), mxPath(from="Time4anxiety", to="Time4anxiety_1b", arrows=1, free=TRUE, values=0.8577030, labels=c("anxanx1b")), mxPath(from="Time4anxiety", to="Time4anxiety_1f", arrows=1, free=TRUE, values=0.8541549, labels=c("anxanx1f")), mxPath(from="Time4anxiety", to="Time4anxiety_1h", arrows=1, free=TRUE, values=0.8378001, labels=c("anxanx1h")), mxPath(from = "L1", to = "Time2anxiety", arrows=1, free=FALSE , values=1, labels=c("L1T2anx")), mxPath(from = "L2", to = "Time4anxiety", arrows=1, free=FALSE , values=1, labels=c("L2T4anx")), mxPath(from = "L1", to = "L2", arrows=1, free=FALSE , values=1, labels=c("L1L2")), mxPath(from = "changeanxiety", to = "L2", arrows=1, free=FALSE , values=1, labels=c("changeanxT4L2")), mxPath(from ="L1", to = "changeanxiety", arrows = 2, free=TRUE, values = -.9, labels=c("L1changeanx")), mxPath(from ="Time2anxiety", to = "Time4anxiety", arrows = 2, free=TRUE, values = .67, labels=c("T2anxT4anx")), mxPath(from = "L1", to = "L1", arrows = 2, free=FALSE, values = 1, labels=c("L1var")), mxPath(from = "Time2anxiety", to = "Time2anxiety", arrows = 2, free=FALSE, values = 1, labels=c("T2anxvar")), mxPath(from = "Time4anxiety", to = "Time4anxiety", arrows = 2, free=FALSE, values = 1, labels=c("T4anxvar")), mxPath(from = "changeanxiety", to = "changeanxiety", arrows = 2, free=TRUE, values = 100, labels=c("changeanxvar")), mxPath(from = "Time2anxiety_1a", to = "Time2anxiety_1a", arrows = 2, free=TRUE, values = 0.5647315, labels=c("anx1avar")), mxPath(from = "Time2anxiety_1b", to = "Time2anxiety_1b", arrows = 2, free=TRUE, values = 0.3528205, labels=c("T2anx1bvar")), mxPath(from = "Time2anxiety_1f", to = "Time2anxiety_1f", arrows = 2, free=TRUE, values = 0.5079372, labels=c("anx1fvar")), mxPath(from = "Time2anxiety_1h", to = "Time2anxiety_1h", arrows = 2, free=TRUE, values = 0.5221816, labels=c("anx1hvar")), mxPath(from = "Time4anxiety_1a", to = "Time4anxiety_1a", arrows = 2, free=TRUE, values = 0.5647315, labels=c("anx1avar")), mxPath(from = "Time4anxiety_1b", to = "Time4anxiety_1b", arrows = 2, free=TRUE, values = 0.2175539, labels=c("T4anx1bvar")), mxPath(from = "Time4anxiety_1f", to = "Time4anxiety_1f", arrows = 2, free=TRUE, values = 0.5079372, labels=c("anx1fvar")), mxPath(from = "Time4anxiety_1h", to = "Time4anxiety_1h", arrows = 2, free=TRUE, values = 0.5221816, labels=c("anx1hvar")), mxPath(from = "one", to = "changeanxiety", arrows=1, free=TRUE, values = -1.5, labels=c("mchangeanx")), mxPath(from = "one", to = "Time4anxiety", arrows=1, free=FALSE, values = 0, labels=c("mT4anx")), mxPath(from = "one", to = "Time2anxiety", arrows=1, free=FALSE, values = 0, labels=c("mT2anx")), mxPath(from = "one", to = "L1", arrows=1, free=FALSE, values = 0, labels=c("mL1")), mxPath(from = "one", to = "Time2anxiety_1a", arrows=1, free=TRUE, values = 2.29, labels=c("mT2anx1a")), mxPath(from = "one", to = "Time2anxiety_1b", arrows=1, free=TRUE, values = 1.68, labels=c("mT2anx1b")), mxPath(from = "one", to = "Time2anxiety_1f", arrows=1, free=TRUE, values = 1.85, labels=c("mT2anx1f")), mxPath(from = "one", to = "Time2anxiety_1h", arrows=1, free=TRUE, values = 1.68, labels=c("mT2anx1h")), mxPath(from = "one", to = "Time4anxiety_1a", arrows=1, free=TRUE, values = 2.22, labels=c("mT4anx1a")), mxPath(from = "one", to = "Time4anxiety_1b", arrows=1, free=TRUE, values = 1.60, labels=c("mT4anx1b")), mxPath(from = "one", to = "Time4anxiety_1f", arrows=1, free=TRUE, values = 1.81, labels=c("mT4anx1f")), mxPath(from = "one", to = "Time4anxiety_1h", arrows=1, free=TRUE, values = 1.65, labels=c("mT4anx1h")), mxData(observed=mydata8, type="raw")) Finalmodelanxietystep2Run <-mxTryHard(Finalmodelanxietystep2) refMods<-mxRefModels(Finalmodelanxietystep2Run, run = T) summary(Finalmodelanxietystep2Run, refModels=refMods)

This ran without negative variances, but the variance of change in anxiety is huge, like 66, and the covariance of L1 and change in anxiety is super negative, -33. This seems maybe a bit off?

Any help would be greatly appreciated! Thank you!

Are you sure 'L2' and 'Time4anxiety' are supposed to have double-headed paths going to themselves? That is, should 'L2' and 'Time4anxiety' have nonzero "residual" variance? I would have thought that the idea behind this model is that all variance in 'L2' (and thus, all variance in 'Time4anxiety') is entirely due to the regression of 'L2' onto 'L1' and 'changeanxiety'. What happens if you fix those double-headed paths to zero?

That screams model unidentification to me, especially if you're not using NPSOL. What does

`mxCheckIdentification()`

tell you?McArdle's latent change score model will, I think, inevitably predict increasing variance over time UNLESS the change variance is negative. This is a good feature of the model - it can deliver parameter estimates that are not easily interpreted, and which suggest that it is wrong for data where variances decrease over time. A structured latent growth curve may not - the exponential, or logistic for example can have coherent variance components yet predict increase and decrease of variance over time.

See, e.g., Neale, M.C., McArdle, J.J. (2000) Structured latent growth curves for twin data. Twin Res 3: 165-177.