Hey! This was SUPER helpful and I really appreciate your help. I think I got most of the code figured out finally except for the covariates part. I want to include Wave as the time interval period over time and Sex as the covariate. The code works but I can't see how Sex plays a part in the output (cant see it anywhere). Do you have any recommendations? Here is my code below.
ST <- depmix(
response = list(Physical ~ 1, Counseling ~ 1, NeedCare ~ 1, SuicideThink ~ 1),
data = HMM,
nstates = 4,
transition = ~ Wave,
ntimes = as.numeric(table(HMM$AID)),
family = list(
multinomial("identity"),
multinomial("identity"),
multinomial("identity"),
multinomial("identity"),
multinomial("identity"),
multinomial("identity"),
multinomial("identity"),
multinomial("identity")
),
covariates = ~ Sex
)
Thanks so much!
Kyle