specify_bi_lcsm: Specify lavaan model for bivariate latent change score models

View source: R/specify_lcsm_lavaan_syntax.R

specify_bi_lcsmR Documentation

Specify lavaan model for bivariate latent change score models

Description

Specify lavaan model for bivariate latent change score models

Usage

specify_bi_lcsm(
  timepoints,
  var_x,
  model_x,
  var_y,
  model_y,
  coupling,
  add = NULL,
  change_letter_x = "g",
  change_letter_y = "j"
)

Arguments

timepoints

Number of timepoints.

var_x

Vector, specifying variables measuring one construct of the model.

model_x

List, specifying model specifications (logical) for variables specified in var_x.

  • alpha_constant (Constant change factor),

  • alpha_piecewise (Piecewise constant change factors),

  • alpha_piecewise_num (Changepoint of piecewise constant change factors),

  • alpha_linear (Linear change factor),

  • beta (Proportional change factor),

  • phi (Autoregression of change scores).

var_y

Vector, specifying variables measuring another construct of the model.

model_y

List, specifying model specifications (logical) for variables specified in var_y.

  • alpha_constant (Constant change factor),

  • alpha_piecewise (Piecewise constant change factors),

  • alpha_piecewise_num (Changepoint of piecewise constant change factors),

  • alpha_linear (Linear change factor),

  • beta (Proportional change factor),

  • phi (Autoregression of change scores).

coupling

List, specifying coupling parameters.

  • coupling_piecewise (Piecewise coupling parameters),

  • coupling_piecewise_num (Changepoint of piecewise coupling parameters),

  • delta_con_xy (True score y predicting concurrent change score x),

  • delta_lag_xy (True score y predicting subsequent change score x),

  • delta_con_yx (True score x predicting concurrent change score y),

  • delta_lag_yx (True score x predicting subsequent change score y),

  • xi_con_xy (Change score y predicting concurrent change score x),

  • xi_lag_xy (Change score y predicting subsequent change score x),

  • xi_con_yx (Change score x predicting concurrent change score y),

  • xi_lag_yx (Change score x predicting subsequent change score y).

add

String, lavaan syntax to be added to the model

change_letter_x

String, specifying letter to be used as change factor for construct x in lavaan syntax.

change_letter_y

String, specifying letter to be used as change factor for construct y in lavaan syntax.

Value

Lavaan model syntax including comments.

References

Ghisletta, P., & McArdle, J. J. (2012). Latent Curve Models and Latent Change Score Models Estimated in R. Structural Equation Modeling: A Multidisciplinary Journal, 19(4), 651–682. doi: doi.org/10.1080/10705511.2012.713275.

Grimm, K. J., Ram, N., & Estabrook, R. (2017). Growth Modeling—Structural Equation and Multilevel Modeling Approaches. New York: The Guilford Press.

McArdle, J. J. (2009). Latent variable modeling of differences and changes with longitudinal data. Annual Review of Psychology, 60(1), 577–605. doi: 10.1146/annurev.psych.60.110707.163612.

Yves Rosseel (2012). lavaan: An R Package for Structural Equation Modeling. Journal of Statistical Software, 48(2), 1-36. doi: 10.18637/jss.v048.i02.

Examples

# Specify bivariate LCSM
lavaan_bi_lcsm_01 <- specify_bi_lcsm(timepoints = 10, 
                                     var_x = "x",
                                     model_x = list(alpha_constant = TRUE, 
                                                    beta = TRUE, 
                                                    phi = TRUE),
                                     var_y = "y",  
                                     model_y = list(alpha_constant = TRUE, 
                                                    beta = TRUE, 
                                                    phi = TRUE),  
                                     coupling = list(delta_lag_xy = TRUE, 
                                                     delta_lag_yx = TRUE),
                                     change_letter_x = "g",
                                     change_letter_y = "j")

# To look at string simply return the object                                    
lavaan_bi_lcsm_01

# To get a readable output use cat() function
cat(lavaan_bi_lcsm_01)


lcsm documentation built on March 7, 2023, 6:45 p.m.