Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • SEM for Repeated Measurements Analysis: Adding a covariate to the model

    Hello,

    STATA 14.1 in Windows 10 here.
    I am trying to define a Structural Equation Model for a longitudinal study with 8 timewaves. The unconditional model with random intercept and slope runs ok, but when I try to add a binary covariate as a predictor, that does not work. Here it is the model:

    Code:
     * Adding covariates (Conditional Latent Growth Model) 
     sem ///
     (ao_asc0  <- _cons@0 Intercept@1 Slope@0) ///
     (ao_asc1  <- _cons@0 Intercept@1 Slope@1) ///
     (ao_asc2 <- _cons@0 Intercept@1 Slope@2) ///
     (ao_asc3 <- _cons@0 Intercept@1 Slope@3) ///
     (ao_asc4 <- _cons@0 Intercept@1 Slope@4) ///
     (ao_asc5 <- _cons@0 Intercept@1 Slope@5) ///
     (ao_asc6 <- _cons@0 Intercept@1 Slope@6) ///
     (ao_asc7 <- _cons@0 Intercept@1 Slope@7) ///
     (ao_asc8 <- _cons@0 Intercept@1 Slope@8) ///
     (Intercept <- asa0 bblockers0  _cons) ///
     (Slope <- asa0 bblockers0 _cons), ///
     latent(Intercept Slope) ///
     var(e.ao_asc0@fix e.ao_asc1@fix e.ao_asc2@fix e.ao_asc3@fix e.ao_asc4@fix e.ao_asc5@fix e.ao_asc6@fix e.ao_asc7@fix e.ao_asc8@fix) ///
     var(e.Intercept e.Slope) ///
     cov(e.Intercept*e.Slope)
    where ao_asc is the continouous outcome measured at each wave, asa0 and bblockers0 are 2 binary predictors measured at time 0 (i.e. study enrollment).The dataset is in WIDE format. Apparently the model runs but keeps saying that both asa0 and bblockers0 are constrained. SEM command syntax in STATA is still not completely clear to me so it is likely my mistake, but any hint in helping me to understand would be greatly appreciated.

    Thank you in advance,
Working...
X