ramBLCS: Conduct bivariate latent change score analysis

View source: R/blcs.R

ramBLCSR Documentation

Conduct bivariate latent change score analysis

Description

Conduct bivariate latent change score analysis

Usage

ramBLCS(data, y, x, timey, timex, ram.out = FALSE, betax, 
betay, gammax, gammay, mx0, mxs, my0, mys, varex, varey, 
varx0, vary0, varxs, varys, varx0y0, varx0xs, vary0ys, 
varx0ys, vary0xs, varxsys, ...)

Arguments

data

Data

y

Indices for y variables

x

Indices for x variables

timey

Time for y variables

timex

Time for x variables

ram.out

whether print ram matrices

betax

Starting value

betay

Starting value

gammax

Starting value

gammay

Starting value

mx0

Starting value

mxs

Starting value

my0

Starting value

mys

Starting value

varex

Starting value

varey

Starting value

varx0

Starting value

vary0

Starting value

varxs

Starting value

varys

Starting value

varx0y0

Starting value

varx0xs

Starting value

vary0ys

Starting value

varx0ys

Starting value

vary0xs

Starting value

varxsys

Starting value

...

Options can be used for lavaan

Value

model

The lavaan model specification of the bivariate latent change score model

lavaan

The lavaan output

ram

Output in terms of RAM matrices

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

data(ex3)
## Test the bivariate latent change score model ramBLCS

test.blcs<-ramBLCS(ex3, 7:12, 1:6, ram.out=TRUE)
summary(test.blcs$lavaan, fit=TRUE)

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


## Test the vector field plot
## test.blcs is the output of the ramBLCS function.
ramVF(test.blcs, c(0,80),c(0,80), length=.05, xlab='X', ylab='Y',scale=.5, ninterval=9)

RAMpath documentation built on Aug. 27, 2023, 5:06 p.m.