Hi all,
I am attempting to run a cross-lagged panel model. I have two continuous variables (depression & body image dissatisfaction) at two time points. I also want to add a cluster variable for school. I am able to successfully run the basic model using the following code:
gsem (DS_1 -> ds_t1, ) (DS_1 -> DS_2, ) (DS_1 -> ED_2, ) (DS_2 -> ds_t3, ) ///
(ED_2 -> diss_t3, ) (ED_1 -> diss_t1, ) (ED_1 -> DS_2, ) (ED_1 -> ED_2, ), ///
covstruct(_lexogenous, diagonal) latent(DS_1 DS_2 ED_2 ED_1 ) reliab(ds_t3 .8 ds_t1 .8 diss_t3 .8 diss_t1 .8 ) nocapslatent
However, when I attempt to add the cluster variable for school using the following code:
gsem (DS_2 -> ds_t3, ) (DS_1 -> ds_t1, ) (DS_1 -> DS_2, ) (DS_1 -> ED_2, ) ///
(ED_2 -> diss_t3, ) (ED_1 -> diss_t1, ) (ED_1 -> DS_2, ) (ED_1 -> ED_2, ) (M1[school_id] -> ds_t3, ),
> covstruct(_lexogenous, diagonal) latent(DS_2 DS_1 ED_2 ED_1 M1 ) ///
reliab(ds_t3 .8 ds_t1 .8 diss_t3 .8 diss_t1 .8 ) nocapslatent from (b)
I get the following error message
Iteration 0: log likelihood = -5990.2821 (not concave)
cannot compute an improvement -- discontinuous region encountered
r(430);
Is anybody any to advise on how I may address this error?
Thank you!
Related Posts with Gsem
"rangestat" with "excludeself" and "interval(t -1 0)"Dear Statalisters, I have a question about the results after the rangestat command. Suppose I inpu…
Create a new variable with random probability and with probabilityI have to create 2 variables the first one is a random variable (e1) between 1-17 the second is a v…
Interpreting a 3-category dummy variables and interaction termsDear All, I run the following model: Suppose I have a dummy variable: small, medium, large; and the…
help with krlsHello, I'm using the krls command to predict a binary outcome (whether the patient starts dialysis …
Repeated time values - Panel DataHi, I have election data for a country. I am trying to set a panel but as each place has multiple c…
Subscribe to:
Post Comments (Atom)
0 Response to Gsem
Post a Comment