Peter
In lavaan you can use the predict function, predict will give you a matrix of nrow equal to the nrow of the data used for the analysis, so in your case would be the embedded matrix. The ncol would be the number of factors you have, in your case I imagine you have the zeroth, first, and second derivatives. Also, this will only you you the factor scores for rows with complete data
library(lavaan)
?growth
model.syntax <- '
# intercept and slope with fixed coefficients
i =~ 1*t1 + 1*t2 + 1*t3 + 1*t4
s =~ 0*t1 + 1*t2 + 2*t3 + 3*t4
# regressions
i ~ x1 + x2
s ~ x1 + x2
# time-varying covariates
t1 ~ c1
t2 ~ c2
t3 ~ c3
t4 ~ c4
'
fit <- growth(model.syntax, data=Demo.growth)
summary(fit, standardized=T)
dim(Demo.growth)
predict(fit) ## Factor scores