Function to return the textual model for lavaan fit
Value
Character vector of factor model to input to lavaan::lavaan()
.
Examples
txt_mod(1)
#> [1] "eta1 =~ NA*y1 + y2 + y3 + y4 + y5"
txt_mod(2)
#> [1] "eta1 =~ NA*y1 + y2 + y3 + y4 + y5 + y6 + y7 + y8"
txt_mod(3)
#> [1] "eta1 =~ NA*y1 + y2 + y3 + y4 + y5 +\n y6 + y7 + y8 + y9 + y10 +\n y11 + y12 + y13 + y14 + y15"
txt_mod(4)
#> [1] "eta1 =~ NA*y1 + y2 + y3 + y4 + y5\n eta2 =~ NA*y6 + y7 + y8 + y9 + y10"
txt_mod(5)
#> [1] "eta1 =~ NA*y1 + y2 + y3 + y4 + y5\n eta2 =~ NA*y6 + y7 + y8 + y9 + y10\n eta3 =~ NA*y11 + y12 + y13 + y14 + y15"