Is there a way to turn off variable name abbreviations when summarizing model output with lavaan
?
In the below reprex, you can see that the long variables get automatically shortened. In my real life data, some of my datasets have long variable names that only differ by a single letter or number, so having the full variable name presented would benefit me. Unfortunately, I can't find an argument to specify this in the documentation.
library(lavaan)
# rename variables
names(mtcars)[names(mtcars) == "mpg"] <- "An_Incredibly_Long_Variable_Name"
names(mtcars)[names(mtcars) == "hp"] <- "An_Even_Longer_Longer_Longer_Name"
names(mtcars)[names(mtcars) == "gear"] <- "VeryVeryVeryLong"
names(mtcars)[names(mtcars) == "cyl"] <- "LongLongLongLong"
# model
model <- 'An_Incredibly_Long_Variable_Name ~ An_Even_Longer_Longer_Longer_Name + VeryVeryVeryLong + LongLongLongLong'
fit <- sem(model, "std", data = mtcars)
summary(fit)
#> lavaan 0.6.14 ended normally after 18 iterations
#>
#> Estimator DWLS
#> Optimization method NLMINB
#> Number of model parameters 5
#>
#> Number of observations 32
#>
#> Model Test User Model:
#> Standard Scaled
#> Test Statistic 0.000 0.000
#> Degrees of freedom 0 0
#>
#> Parameter Estimates:
#>
#> Standard errors Robust.sem
#> Information Expected
#> Information saturated (h1) model Unstructured
#>
#> Regressions:
#> Estimate Std.Err z-value P(>|z|)
#> An_Incredibly_Long_Variable_Name ~
#> An_Evn_L_L_L_N -0.039 0.012 -3.264 0.001
#> VeryVeryVryLng 2.023 0.693 2.920 0.003
#> LongLongLngLng -1.208 0.563 -2.146 0.032
#>
#> Intercepts:
#> Estimate Std.Err z-value P(>|z|)
#> .An_Incrd_L_V_N 25.869 4.310 6.001 0.000
#>
#> Variances:
#> Estimate Std.Err z-value P(>|z|)
#> .An_Incrd_L_V_N 8.318 1.929 4.312 0.000