library(lavaan)
#> This is lavaan 0.6-15
#> lavaan is FREE software! Please report any bugs.
set.seed(870431)
n <- 50000
trait <- rnorm(n)
error1 <- rnorm(n)
error2 <- rnorm(n)
error3 <- rnorm(n)
error4 <- rnorm(n)
X1 <- 1.1*trait + error1
X2 <- 1.3*trait + error2
X3 <- 1.5*trait + error3
X4 <- 1.7*trait + error4
X1 <- as.numeric(X1 > -1.3)
X2 <- as.numeric(X2 > -0.6)
X3 <- as.numeric(X3 > 1.4)
X4 <- as.numeric(X4 > 2.1)
model <- '
X =~ X1 + X2 + X3 + X4
X ~~ X
'
data <- cbind(X1, X2, X3, X4)
fit <- cfa(model, data, std.lv = T, ordered = c("X1", "X2", "X3", "X4"))
# Verify that the loadings are equal to the standardized loadings
est <- subset(parameterEstimates(fit, standardized = TRUE), op == "=~")
est
#> lhs op rhs est se z pvalue ci.lower ci.upper std.lv std.all
#> 1 X =~ X1 0.746 0.006 116.278 0 0.733 0.758 0.746 0.746
#> 2 X =~ X2 0.790 0.005 148.368 0 0.780 0.801 0.790 0.790
#> 3 X =~ X3 0.829 0.005 152.552 0 0.819 0.840 0.829 0.829
#> 4 X =~ X4 0.858 0.006 143.289 0 0.846 0.870 0.858 0.858
#> std.nox
#> 1 0.746
#> 2 0.790
#> 3 0.829
#> 4 0.858
# Population standardized loadings before dichotomization
loading_original <- c(1.1, 1.3, 1.5, 1.7)
std_loading_original <- loading_original / sqrt(loading_original^2 + 1)
round(std_loading_original, 3)
#> [1] 0.740 0.793 0.832 0.862
--
You received this message because you are subscribed to the Google Groups "lavaan" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lavaan+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lavaan/c60c5c0e-dd95-40a9-94f2-62d0296ef033n%40googlegroups.com.
# Check threshold
est_t <- subset(parameterEstimates(fit, standardized = TRUE), op == "|")
est_t
#> lhs op rhs est se z pvalue ci.lower ci.upper std.lv std.all
#> 6 X1 | t1 -0.874 0.006 -135.318 0 -0.886 -0.861 -0.874 -0.874
#> 7 X2 | t1 -0.357 0.006 -62.206 0 -0.368 -0.346 -0.357 -0.357
#> 8 X3 | t1 0.774 0.006 123.703 0 0.762 0.787 0.774 0.774
#> 9 X4 | t1 1.066 0.007 153.786 0 1.052 1.079 1.066 1.066
#> std.nox
#> 6 -0.874
#> 7 -0.357
#> 8 0.774
#> 9 1.066
# Population thresholds with Xs standardized
threshold_original <- c(-1.3, -0.6, 1.4, 2.1)
sd_x <- sqrt(loading_original^2 + 1)
round(threshold_original / sd_x, 3)
#> [1] -0.874 -0.366 0.777 1.065
round(est_t$est, 3)
#> [1] -0.874 -0.357 0.774 1.066
To view this discussion on the web visit https://groups.google.com/d/msgid/lavaan/fd225bac-3675-41a6-b83a-8703852fe253n%40googlegroups.com.
still confused by the term sqrt(loading_original^2 + 1) Would someone be so kind to write out how this term is created by simplifying from some more general term?
Terrence D. Jorgensen (he, him, his)
Assistant Professor, Methods and Statistics
Research Institute for Child Development and Education, the University of Amsterdam
http://www.uva.nl/profile/t.d.jorgensen