Skip to content

Commit 216e11c

Browse files
20251106 - latent change score model
1 parent e3d6515 commit 216e11c

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

lda.Rmd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,4 @@ There are a variety of ways to estimate nonlinear growth in a growth curve model
3737
- Gompertz growth model
3838
- Richards growth model
3939
- Taylor series approximation model
40+
- [latent change score model](sem.html#lcsm)

sem.Rmd

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1238,6 +1238,8 @@ https://tdjorgensen.github.io/SEM-in-Ed-compendium/ch27.html#saturated-growth-mo
12381238

12391239
# Latent Change Score Model {#lcsm}
12401240

1241+
To generate the syntax for a latent change score model, we use the [lcsm](https://doi.org/10.32614/CRAN.package.lcsm) package.
1242+
12411243
## Model Syntax
12421244

12431245
```{r}
@@ -1336,7 +1338,9 @@ semPaths(
13361338
plot_lcsm(
13371339
lavaan_object = bivariateLCSM_fit,
13381340
lcsm = "bivariate",
1339-
lavaan_syntax = bivariateLCSM_syntax)
1341+
lavaan_syntax = bivariateLCSM_syntax,
1342+
edge.label.cex = .9,
1343+
lcsm_colours = TRUE)
13401344
13411345
#lavaanPlot::lavaanPlot( # throws error
13421346
# bivariateLCSM_fit,
@@ -1362,8 +1366,19 @@ lavaangui::plot_lavaan(bivariateLCSM_fit)
13621366
plot_trajectories(
13631367
data_bi_lcsm,
13641368
id_var = "id",
1365-
var_list = c("y1", "y2", "y3", "y4", "y5",
1366-
"y6", "y7", "y8", "y9", "y10"),
1369+
var_list = c(
1370+
"x1", "x2", "x3", "x4", "x5",
1371+
"x6", "x7", "x8", "x9", "x10"),
1372+
xlab = "Time",
1373+
ylab = "X Score",
1374+
connect_missing = FALSE)
1375+
1376+
plot_trajectories(
1377+
data_bi_lcsm,
1378+
id_var = "id",
1379+
var_list = c(
1380+
"y1", "y2", "y3", "y4", "y5",
1381+
"y6", "y7", "y8", "y9", "y10"),
13671382
xlab = "Time",
13681383
ylab = "Y Score",
13691384
connect_missing = FALSE)

0 commit comments

Comments
 (0)