8000 should the lavaan() function respond to the orthogonal=FALSE argument? · Issue #423 · yrosseel/lavaan · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

should the lavaan() function respond to the orthogonal=FALSE argument? #423

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
vsavalei opened this issue Apr 24, 2025 · 3 comments
Open

Comments

@vsavalei
Copy link

It does not appear to, right now.

`
HS.model <- '
visual =~ 1x1 + x2 + x3
textual =~ 1
x4 + 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
`

@yrosseel
Copy link
Owner

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.

@vsavalei
Copy link
Author

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)".

@yrosseel
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0