should the lavaan() function respond to the orthogonal=FALSE argument? · Issue #423 · yrosseel/lavaan · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using auto.var = TRUE will only 'free' the variances, it will not add covariances. For this example, you also need to add auto.cov.lv.x = TRUE to add the latent covariances.
See the Details: section of the man page for the sem() function to get an overview of auto.* options that are set to TRUE per default if the sem() function is used. But they are set to FALSE when the lavaan() function is called. This is by design: the lavaan() function does not do anything automagically. See the lavaan paper for more information.
So, auto.cov.lv.x in essentially the same as orthogonal.x in meaning (from the help file), but the former works with any function (or at least I have verified it works with cfa() as well as lavaan()), whereas the latter only works with cfa() (or at least I have verified it does not work with lavaan()).
This is backwards from the help file for lavOptions, which includes all the orthogonal options under "Model features (always available)", but includes the auto.cov options under "Model features (only available for the lavaan() function)".
The distinction between 'always available' and 'only for lavaan' is outdated. I need to update the man page ... done. For the longest time, the auto.* arguments were only available for lavaan(). But that was changed (silently) a few years back.
In any case, the auto.* arguments determine which parameters (not mentioned in the lavaan syntax) will be included and set free (if TRUE). The orthogonal (or orthogonal.x) argument was mainly used for cfa()/sem() where the latent covariances would always be included. It 'undid' the effect of auto.cov.lv.x = TRUE.
It does not appear to, right now.
`
HS.model <- '
visual =~ 1x1 + x2 + x3
textual =~ 1x4 + x5 + x6
speed =~ 1*x7 + x8 + x9
'
fit1 <- cfa(HS.model, data = HolzingerSwineford1939)
#npar=21, df=24, T=85.306
fit0 <- cfa(HS.model, data = HolzingerSwineford1939,orthogonal = TRUE)
#npar=18, df=27, T=157.527
fit0_lav <- lavaan(HS.model, data = HolzingerSwineford1939, auto.var=TRUE)
#npar=18, df=27, T=157.527
fit1_lav <- lavaan(HS.model, data = HolzingerSwineford1939, auto.var=TRUE, orthogonal = FALSE)
#npar=18, df=27, T=157.527
`
The text was updated successfully, but these errors were encountered: