| Literature DB >> 36226160 |
Milan Wiedemann1,2, Graham Thew1,2,3, Urška Košir1, Anke Ehlers1,2.
Abstract
Latent change score models (LCSMs) are used across disciplines in behavioural sciences to study how constructs change over time. LCSMs can be used to estimate the trajectory of one construct (univariate) and allow the investigation of how changes between two constructs (bivariate) are associated with each other over time. This paper introduces the R package lcsm, a tool that aims to help users understand, analyse, and visualise different latent change score models. The lcsm package provides functions to generate model syntax for basic univariate and bivariate latent change score models with different model specifications. It is also possible to visualise different model specifications in simplified path diagrams. An interactive application illustrates the main functions of the package and demonstrates how the model syntax and path diagrams change based on different model specifications. This R package aims to increase the transparency of reporting analyses and to provide an additional resource to learn latent change score modelling. Copyright:Entities:
Keywords: R; latent change score modelling; lavaan; longitudinal data analysis; structural equation modelling
Year: 2022 PMID: 36226160 PMCID: PMC9547120 DOI: 10.12688/wellcomeopenres.17536.1
Source DB: PubMed Journal: Wellcome Open Res ISSN: 2398-502X
Figure 1. Simplified path diagram of univariate LCSM.
White squares = Observed scores on variable ’x’ across timepoints 1 to 5; Green circles = Latent true scores (prefix ‘l’); Blue circles = Latent change scores (prefix ‘d’); Yellow circle = Constant latent change factor. Single-headed arrows = Regressions; Double-headed arrows = Covariance. beta_x = Proportional change factor; phi_x = Autoregression of change scores; sigma_g2lx1 = Covariance of change factor ( g2) with initial true score ( lx1). Unique scores ( ux ) and unique variances ( ) are not shown in this figure for simplicity.
Figure 2. Simplified path diagram of bivariate LCSM with lagged change to change coupling parameters (e.g., dx2 to dy3).
White squares = Observed variables; Green circles = Latent true scores (prefix ‘l’); Blue circles = Latent change scores (prefix ‘d’); Yellow circles = Constant latent change factors. Single-headed arrows = Regressions; Double-headed arrows = Covariance. Unique scores ( ux and uy ) and unique variances ( and ) are not shown in this figure for simplicity.
Main functions of the lcsm R package and their dependencies.
| Function | Description | Main dependency
|
|---|---|---|
|
| ||
|
| Specify
|
|
|
| Specify
|
|
|
| ||
|
| Fit univariate LCSM |
|
|
| Fit bivariate LCSM |
|
|
| ||
|
| Extract fit statistics from
|
|
|
| Extract parameter estimates from
|
|
|
| ||
|
| Simulate data from univariate LCSM parameters |
|
|
| Simulate data from bivariate LCSM parameters |
|
|
| ||
|
| Plot individual trajectories of cases |
|
|
| Plot simplified LCSM path diagram |
|
Note. More details about each function can be found in the package documentation or using the help() function in R. ‡ This column lists additional R packages that are required by the functions of the lcsm package.
Available specifications for univariate LCSMs and bivariate coupling options.
| Option | Description |
|---|---|
| Univariate model options | |
|
| Constant change factor |
|
| Piecewise constant change factor |
|
| Change point of piecewise constant change factor |
|
| Linear change factor |
|
| Proportional change factor: change score x (t)
|
|
| Autoregression of change scores: change score x (t)
|
|
| |
|
| Piecewise coupling parameters |
|
| Change point of piecewise coupling parameters |
|
| Change score x (t) determined by true score y (t) |
|
| Change score y (t) determined by true score x (t) |
|
| Change score x (t) determined by true score y (t-1) |
|
| Change score y (t) determined by true score x (t-1) |
|
| Change score x (t) determined by change score y (t) |
|
| Change score y (t) determined by change score x (t) |
|
| Change score x (t) determined by change score y (t-1) |
|
| Change score y (t) determined by change score x (t-1) |
Note. Covar =Covariance. More details about each model option as well as further customisations can be found in the package documentation using help(specify_uni_lcsm) or help(specify_bi_lcsm). Bivariate model options allow for concurrent ( con) and lagged ( lag) coupling between two constructs.
Complete list of parameters available in the lcsm package.
| Parameter | Symbol | Description |
|---|---|---|
|
| ||
|
|
| Mean of latent true scores x (Intercept) |
|
|
| Variance of latent true scores x |
|
|
| Variance of observed scores x |
|
|
| Mean of change factor (g2) |
|
|
| Mean of change factor (g3) |
|
|
| Variance of change factor (g2) |
|
|
| Variance of change factor (g3) |
|
|
| Covar: Change factor (g2) with initial true score x (lx1) |
|
|
| Covar: Change factor (g3) with initial true score x (lx1) |
|
|
| Covar: Change factors within construct x |
|
|
| Proportional change factor of construct x |
|
|
| Autoregression of change scores x |
|
| ||
|
|
| Mean of latent true scores y (Intercept) |
|
|
| Variance of latent true scores y |
|
|
| Variance of observed scores y |
|
|
| Mean of change factor (j2) |
|
|
| Mean of change factor (j3) |
|
|
| Variance of change factor (j2) |
|
|
| Variance of change factor (j3) |
|
|
| Covar: Change factor (j2) with initial true score y (ly1) |
|
|
| Covar: Change factor (j3) with initial true score y (ly1) |
|
|
| Covar: Change factors within construct y |
|
|
| Proportional change factor of construct y |
|
|
| Autoregression of change scores y |
|
| ||
|
|
| Covar: Residuals x with y |
|
|
| Covar: Intercepts x with y |
|
|
| Covar: Change factor x (g2) with initial true score y (ly1) |
|
|
| Covar: Change factor x (g3) with initial true score y (ly1) |
|
|
| Covar: Change factor y (j2) with initial true score x (lx1) |
|
|
| Covar: Change factor y (j3) with initial true score x (lx1) |
|
|
| Covar: Change factors y (j2) with x (g2) |
|
|
| Covar: Change factors y (j2) with x (g3) |
|
|
| Covar: Change factors y (j3) with x (g2) |
|
|
| Change score x (t) determined by true score y (t) |
|
|
| Change score y (t) determined by true score x (t) |
|
|
| Change score x (t) determined by true score y (t-1) |
|
|
| Change score y (t) determined by true score x (t-1) |
|
|
| Change score x (t) determined by change score y (t) |
|
|
| Change score y (t) determined by change score x (t) |
|
|
| Change score x (t) determined by change score y (t-1) |
|
|
| Change score y (t) determined by change score x (t-1) |
Note. Covar = Covariance. More details for each parameter can be found in the package documentation using help(sim_uni_lcsm) or help(sim_bi_lcsm).
Figure 3. Longitudinal plots of five repeated measurements of example variables X and Y.
Figure 4. An example of generating lavaan syntax of a univariate LCSM using shinychange.