Baseline model in a path model

132 views
Skip to first unread message

Shu Fai Cheung

unread,
Nov 9, 2021, 5:31:58 AM11/9/21
to lavaan
According to the help page of lavInspect():

>baseline:

>Logical. If TRUE, compute a baseline model (currently always the independence model, assuming all variables are uncorrelated) and store the results in the baseline slot.

This option, baseline, is TRUE by default. I assume that "all variables" does mean all observed variables, both exogenous or endogenous variables, as in some other SEM programs.

However, for a path model, it seems that the baseline model is not really the independence model.

sem("x3 ~ x1 + x2\nx4 ~ x3", HolzingerSwineford1939, fixed.x = TRUE) -> tmp1
sem("x3 ~ x1 + x2\nx4 ~ x3", HolzingerSwineford1939, fixed.x = FALSE) -> tmp2
> lavInspect(tmp1, "baseline.partable")
  id lhs op rhs block user free ustart exo label group lower upper start   est se
1  1  x3 ~~  x3     1    1    1  1.275   0           1 0.000   Inf 1.275 1.275 NA
2  2  x4 ~~  x4     1    1    2  1.351   0           1 0.000   Inf 1.351 1.351 NA
3  3  x1 ~~  x1     1    1    0  1.358   1           1 1.358 1.358 1.358 1.358  0
4  4  x2 ~~  x2     1    1    0  1.382   1           1 1.382 1.382 1.382 1.382  0
5  5  x1 ~~  x2     1    1    0  0.407   1           1 0.407 0.407 0.407 0.407  0
> lavInspect(tmp2, "baseline.partable")
  id lhs op rhs block user free ustart exo label group lower upper start   est se
1  1  x3 ~~  x3     1    1    1  1.275   0           1     0   Inf 1.275 1.275 NA
2  2  x4 ~~  x4     1    1    2  1.351   0           1     0   Inf 1.351 1.351 NA
3  3  x1 ~~  x1     1    1    3  1.358   0           1     0   Inf 1.358 1.358 NA
4  4  x2 ~~  x2     1    1    4  1.382   0           1     0   Inf 1.382 1.382 NA
5  5  x1 ~~  x2     1    1    5     NA   0           1  -Inf   Inf 0.000 0.407 NA
>

The covariance of x1 and x2 is not fixed to zero. Is it the intended behavior of lavaan() when creating the independence model? Did I misunderstand how the independence model is constructed?

-- Shu Fai

Terrence Jorgensen

unread,
Nov 9, 2021, 6:31:31 PM11/9/21
to lavaan

According to the help page of lavInspect():

>baseline:

That is from the ?lavOptions help page. 

 I assume that "all variables" does mean all observed variables, both exogenous or endogenous variables

That would contradict the role of exogenous variables.  They are not explained within the model, so their correlations are taken as given.  Because those parameters are not among the parameters relevant to testing the theory (i.e., how endogenous variables came to be), there is no reason to constrain their correlations to be zero in the baseline model.  Doing so would inflate the fitted model's apparent goodness of fit.  But if that is the behavior you want, then simply set fixed.x=FALSE.

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

Shu Fai Cheung

unread,
Nov 9, 2021, 8:15:59 PM11/9/21
to lavaan
> That is from the ?lavOptions help page. 

Ah ... yes. My bad. Sorry for the mistake.

> That would contradict the role of exogenous variables.  They are not explained within the model, so their correlations are taken as given.  Because those parameters are not among the parameters relevant to testing the theory (i.e., how endogenous variables came to be), there is no reason to constrain their correlations to be zero in the baseline model.  Doing so would inflate the fitted model's apparent goodness of fit. 

I actually agree with this way to set up the baseline model. My main concern is the documentation. Users that have used another SEM programs may not be aware of the differences because some other programs do not differentiate exogenous variables from endogenous variables when setting up the baseline model.

-- Shu Fai

Shu Fai Cheung

unread,
Nov 9, 2021, 8:22:30 PM11/9/21
to lavaan
> But if that is the behavior you want, then simply set fixed.x=FALSE.

sem("x3 ~ x1 + x2\nx4 ~ x3", HolzingerSwineford1939, fixed.x = FALSE) -> tmp2
> lavInspect(tmp2, "baseline.partable")
  id lhs op rhs block user free ustart exo label group lower upper start   est se
1  1  x3 ~~  x3     1    1    1  1.275   0           1     0   Inf 1.275 1.275 NA
2  2  x4 ~~  x4     1    1    2  1.351   0           1     0   Inf 1.351 1.351 NA
3  3  x1 ~~  x1     1    1    3  1.358   0           1     0   Inf 1.358 1.358 NA
4  4  x2 ~~  x2     1    1    4  1.382   0           1     0   Inf 1.382 1.382 NA
5  5  x1 ~~  x2     1    1    5     NA   0           1  -Inf   Inf 0.000 0.407 NA
>

I tried setting fixed.x to FALSE. The variances of x1 ans x2 are now free, as expected. However, the baseline model still does not fix the covariance between x1 and x2 to zero. Did I misunderstand something in the settings?

-- Shu Fai

On Wednesday, November 10, 2021 at 7:31:31 AM UTC+8 Terrence Jorgensen wrote:

Terrence Jorgensen

unread,
Nov 10, 2021, 5:05:46 PM11/10/21
to lavaan
  id lhs op rhs block user free ustart exo label group lower upper start   est se
5  5  x1 ~~  x2     1    1    5     NA   0           1  -Inf   Inf 0.000 0.407 NA

Oh, that is unexpected indeed.  Unless something changed in the source code, I must be misremembering my past experience with this feature.  Sorry to mislead you.

Terrence

Reply all
Reply to author
Forward
0 new messages