Closed milanwiedemann closed 4 years ago
at the moment the matrix needs to be specified manually, see the following for a univariate an bivariate lcsm with seven time points.
# Create layout matrix for univariate LCSM without intercepts layout_uni_lcsm <- matrix( c(NA, "g2", NA, NA, NA, NA, NA, NA, "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "lx1", "lx2", "lx3", "lx4", "lx5", "lx6", "lx7", "x1", "x2", "x3", "x4", "x5", "x6", "x7"), 4, byrow = TRUE) # Create layout matrix for bivariate LCSM without intercepts layout_bi_lcsm <- matrix( c(NA, NA, "y1", "y2", "y3", "y4", "y5", "y6", "y7", NA, NA, "ly1", "ly2", "ly3", "ly4", "ly5", "ly6", "ly7", NA, NA, NA, "dy2", "dy3", "dy4", "dy5", "dy6", "dy7", NA, "j2",NA,NA, NA, NA, NA, NA, NA, NA, "g2", NA,NA, NA, NA, NA, NA, NA, NA, NA, NA, "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", NA, NA, "lx1", "lx2", "lx3", "lx4", "lx5", "lx6", "lx7", NA, NA, "x1", "x2", "x3", "x4", "x5", "x6", "x7"), 8, byrow = TRUE)
working on it, idea to create matrix from lavaan syntax, using lavaanify to get all info about manifest and latent vars and change factors
done a long time ago
at the moment the matrix needs to be specified manually, see the following for a univariate an bivariate lcsm with seven time points.