Hi,
I would like to run a multi group growth curve model with free and constrained parameter estimates. My data has three groups. Data were collected at four time points for each group.
This is how my current model with no constraints:
library(lavaan)
model_multigroup <- ' i =~ 1T4 + 1T3 + 1T2 + 1T1
s =~ 0* T4 + 1* T3 + 2* T2 + 3* T1 '
fit_multgroup <- growth (model_multigroup,
data = df,
group = "condition")
summary(fit_multgroup)
When I run this model, the intercepts (i and s) for each of the three groups are 0. I am not sure why this is the case considering there are no constraints in the model.
My model with constraints is:
fit_multgroup_c <- growth (model_multigroup,
data = df,
group = "condition", group.equal = c("intercepts"))
summary(fit_multgroup_c)
My constrained model output is exactly the same as the free estimate model.
Can someone please tell me what I'm doing wrong. How can I specify the model to freely estimate intercept and slope for each group? Also, how can I specify constraint on the intercept for each of the three groups?
Thanks!