Why independence model handle covariances as free parameters when fixed.x = FALSE ?

113 views
Skip to first unread message

mi nigi

unread,
Dec 23, 2023, 10:39:16 AM12/23/23
to lavaan

Hello. I'm a beginner of SEM.

The definition of the independence model that I learned from some introductory-level textbooks is a model that assumes that there is no covariance between variables (therefore it estimates only variances).

However, when a model is fitted with fixed.x = FALSE (i.e. model estimates variances and covariances) the independence model seems to estimate covariances, and those covariances are counted as free parameters.

Here is an example:

> library(lavaan)
> model <- 'Volume ~ Height + Girth'
> fit <- sem(model, data = trees, fixed.x=FALSE)
> lav <- lav_partable_independence(fit)
> data.frame(lav) |> dplyr::filter(free > 0L)
 id    lhs op    rhs user block group free     ustart exo
1  1 Volume ~~ Volume    1     1     1    1 261.486576   0
2  2 Height ~~ Height    1     1     1    2  39.290323   0
3  3  Girth ~~  Girth    1     1     1    3   9.530239   0
4  4 Height ~~  Girth    1     1     1    4         NA   0

Height ~~ Girth is a covariance and it is counted as a free parameter.

Could you teach me a reason and/or related literatures about why lavaan uses such a independence model?

I would be grateful for any assistance.

Terrence Jorgensen

unread,
Jan 11, 2024, 7:52:47 AM1/11/24
to lavaan

The definition of the independence model that I learned from some introductory-level textbooks is a model that assumes that there is no covariance between variables (therefore it estimates only variances).

Yes, among endogenous variables.  It was proposed in the context of "full SEM" (really, the first incremental fit index was developed for factor analysis), not path analysis among observed variables.  Most authors don't explain this very carefully when they make overgeneralizing statements about the independence model.

However, when a model is fitted with fixed.x = FALSE (i.e. model estimates variances and covariances) the independence model seems to estimate covariances, and those covariances are counted as free parameters.

This has nothing to do with fixed.x=FALSE.  Those covariances will be nonzero by default even when fixed.x=TRUE.  I don't have access to your data, so here is a reprex:

library(lavaan)

## Fit regression model twice, treating exogenous variables as fixed or random variables:

fitF <- sem(model = 'x1 ~ x2 + x3', data = HolzingerSwineford1939, fixed.x = FALSE)
fitT <- sem(model = 'x1 ~ x2 + x3', data = HolzingerSwineford1939, fixed.x = TRUE)

In the first case, the predictors are considered random variables, so their (co)variances are estimated, as indicated by nonzero numbers in the $free column

data.frame(lav_partable_independence(fitF))

  id lhs op rhs user block group free   ustart exo
1  1  x1 ~~  x1    1     1     1    1 1.358370   0
2  2  x2 ~~  x2    1     1     1    2 1.381784   0
3  3  x3 ~~  x3    1     1     1    3 1.274865   0
4  4  x2 ~~  x3    1     1     1    4       NA   0

In the second case, the predictors are considered fixed variables, so their (co)variances are not estimated, as indicated by zeros in the $free column (and ones in the $exo column).  Instead, those values (both variances and the covariance) are fixed to their observed (nonzero!) sample statistics, reflecting the assumption that in any future replication of this study, the same summary statistics would be observed due to using the same sampling methodology.

data.frame(lav_partable_independence(fitT))
  id lhs op rhs user block group free    ustart exo
1  1  x1 ~~  x1    1     1     1    1 1.3583698   0
2  2  x2 ~~  x2    1     1     1    0 1.3817839   1
3  3  x3 ~~  x3    1     1     1    0 1.2748649   1
4  4  x2 ~~  x3    1     1     1    0 0.4510639   1

The reason that observed predictors' covariances can be nonzero (whether estimated or fixed) in the independence model is that there are typically no hypotheses about those parameters.  By definition, exogenous variables are not explained in the model (they only do the explaining), so it would be inconsistent to place those restrictions in a "worst fitting, but still theoretically defensible" model.

Terrence D. Jorgensen
Assistant Professor, Methods and Statistics
Research Institute for Child Development and Education, the University of Amsterdam

mi nigi

unread,
Feb 26, 2024, 7:51:03 AM2/26/24
to lavaan
Terrence,

Thank you very much for your reply and sorry for the delay in getting back to you.

I was not aware that models that treat exogenous variables as fixed are actually estimating covariance.
I think I understand why lavaan defaults to `fixed.x=FALSE`.

I really appreciate it.
2024年1月11日木曜日 21:52:47 UTC+9 Terrence Jorgensen:

Jeremy Miles

unread,
Feb 26, 2024, 3:04:02 PM2/26/24
to lav...@googlegroups.com
I really like this paper by Widaman and Thompson, that talks about some of the complexities of null models.  It's not completely unambiguous what the null model should be, and it's not impossible for the null to have a lower chi-square than the fitted model (which I would have told you was impossible before I read this paper.)






--
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/f1842eaf-af9d-46fa-bfa5-fd6bf7ef3990n%40googlegroups.com.

mi nigi

unread,
Feb 27, 2024, 5:45:02 AM2/27/24
to lavaan
Jeremy,

Thank you!
I'm going to read it.

2024年2月27日火曜日 5:04:02 UTC+9 jeremy...@gmail.com:
Reply all
Reply to author
Forward
0 new messages