@@ -414,7 +414,7 @@ ggplot(
414414lbgcm1_syntax <- '
415415 # Intercept and slope
416416 intercept =~ 1*t1 + 1*t2 + 1*t3 + 1*t4
417- slope =~ 0*t1 + a*t2 + b*t3 + 3 *t4 # freely estimate the loadings for t2 and t3
417+ slope =~ 0*t1 + a*t2 + b*t3 + 1 *t4 # freely estimate the loadings for t2 and t3
418418
419419 # Regression paths
420420 intercept ~ x1 + x2
@@ -434,7 +434,7 @@ lbgcm1_syntax <- '
434434lbgcm2_syntax <- '
435435 # Intercept and slope
436436 intercept =~ 1*t1 + 1*t2 + 1*t3 + 1*t4
437- slope =~ 0*t1 + a*t2 + b*t3 + 3 *t4 # freely estimate the loadings for t2 and t3
437+ slope =~ 0*t1 + a*t2 + b*t3 + 1 *t4 # freely estimate the loadings for t2 and t3
438438
439439 # Regression paths
440440 intercept ~ x1 + x2
@@ -589,7 +589,7 @@ timepoints <- 4
589589
590590newData <- data.frame(
591591 time = 1:4,
592- slopeloading = c(0, lbgcm1_slopeloadingt2, lbgcm1_slopeloadingt3, 3 )
592+ slopeloading = c(0, lbgcm1_slopeloadingt2, lbgcm1_slopeloadingt3, 1 )
593593)
594594
595595newData$predictedValue <- NA
@@ -611,7 +611,7 @@ ggplot(
611611person_factors <- as.data.frame(predict(lbgcm1_fit))
612612person_factors$id <- rownames(person_factors)
613613
614- slope_loadings <- c(0, lbgcm1_slopeloadingt2, lbgcm1_slopeloadingt3, 3 )
614+ slope_loadings <- c(0, lbgcm1_slopeloadingt2, lbgcm1_slopeloadingt3, 1 )
615615
616616# Compute model-implied values for each person at each time point
617617individual_trajectories <- person_factors %>%
0 commit comments