Hi Professors,
I have several questions related to the output of latent growth model with covariates.
For example, I fit a linear latent growth model with 4 time points' panel data, and here is the code I used in lavaan:
# i means latent intercept and s means the latent slope
i=~ 1*x1 + 1*x2 + 1*x3 + 1*x4
s=~ 0*x1 + 1*x2 + 2*x3+ 3*x4
# latent growth model with covariates
i~cov1+cov2
s~cov1+cov2
From this latent growth model, I could get the mean of i and s, and the estimates of i and s regressing on cov1 and cov2 from the summary of the fit model. My questions are:
(1) If I would like to get the estimated mean of i and s for the whole population with covariates, is it calculated like this?
Estimated Intercept Mean =
Estimated Intercept +
Estimated Slope (cov1)*
Sample Mean (cov1) +
Estimated Slope (cov2)*
Sample Mean (cov2)
If this formula is correct, it must be calculated by hand? or I could use some functions in lavaan? I have used Lavpredict before, but I think it could give i and s for each observation, but could not give the estimated mean of whole population.
(2) When I calculated the Estimated intercept mean for the whole population from the question (1), how can I determine whether it deviates from some values, for example, mean slope deviating from 0?
(3) If I could use the formula in question (1), how to set the mean value for cov1 and cov2 if they are categorical variables?
Thank you very much.
Regards
Xueying