Learn R Programming

RAMpath (version 0.5.1)

ramLCS: Univariate latent change score model

Description

Univariate latent change score model

Usage

ramLCS(data, y, timey, ram.out = FALSE, betay, my0, mys, 
varey, vary0, varys, vary0ys, ...)

Value

model

The lavaan model specification of the bivariate latent change score model

lavaan

The lavaan output

ram

Output in terms of RAM matrices

Arguments

data

data

y

y data

timey

time of y

ram.out

Whether print ram matrices

betay

Starting value

my0

Starting value

mys

Starting value

varey

Starting value

vary0

Starting value

varys

Starting value

vary0ys

Starting value

...

Options can be used for lavaan

References

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

Examples

Run this code
data(ex3)
test.lcs<-ramLCS(ex3, 7:12)
summary(test.lcs$lavaan, fit=TRUE)

bridge<-ramPathBridge(test.lcs$ram, allbridge=FALSE, indirect=FALSE)
## uncomment to plot
## plot(bridge, 'lcs')

Run the code above in your browser using DataLab