ramLCM | R Documentation |
Conduct growth curve analysis
ramLCM(data, outcome, model = c("all", "no", "linear", "quadratic", "latent"),
basis = 0:(length(outcome) - 1), predictor, equal.var = TRUE, digits = 3,
ram.out = FALSE, ...)
data |
Data |
outcome |
Outcome variable indices |
model |
Models to fit |
basis |
Basis coefficients |
predictor |
Covariates as predictors |
equal.var |
Set residual variances to be equal |
digits |
Print digits |
ram.out |
Print ram matrices |
... |
Options can be used for lavaan |
model |
The lavaan model specification of the bivariate latent change score model |
lavaan |
The lavaan output |
ram |
Output in terms of RAM matrices |
fit |
Model fit |
Zhang, Z., Hamagami, F., Grimm, K. J., & McArdle, J. J. (2015). Using R package RAMpath for tracing SEM path diagrams and conducting complex longitudinal data analysis. Structural Equation Modeling, 22(1), 132-147. https://doi.org/10.1080/10705511.2014.935257
data(ex3)
## Example 3. Growth curve models
gcm.all<-ramLCM(ex3, 1:6, ram.out=TRUE)
## plot the path diagram
bridge<-ramPathBridge(gcm.all$ram$latent, FALSE, FALSE)
## uncomment to plot
## plot(bridge, 'latent')
##unequal variance
gcm.all<-ramLCM(ex3, 1:6, ram.out=TRUE, equal.var=FALSE)
## missing data
gcm.all<-ramLCM(ex3, c(1,2,4,6), basis=c(1,2,4,6), ram.out=TRUE)
gcm.l<-ramLCM(ex3, 1:6, model='linear', ram.out=TRUE)
## with a predictor
gcm.pred<-ramLCM(ex3, c(1,2,4,6), model='linear', basis=c(1,2,4,6),
predictor=c(3,5), ram.out=TRUE)
bridge3<-ramPathBridge(gcm.pred$ram$linear)
## uncomment to plot
## plot(bridge3, 'gcmlinear')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.