A quick reference for the available estimators

374 views
Skip to first unread message

Shu Fai Cheung

unread,
Oct 2, 2021, 1:55:15 AM10/2/21
to lavaan
I know there is a pattern in the naming of the estimators (MLM, MLMV, MLMVS, etc.) and the help page also describes the meanings of all the possible options. However, I would like to have a quick reference table so see what each shorthand does. I could not find one and so I prepared one myself.

To my understanding, if no missing data in the dataset, lavaan will translate the value of the estimator to options for estimator, se, information, and test. I wrote a script to list the settings for each estimator:

```
mod <-
"
m ~ x
y ~ m
"
dat <- as.data.frame(MASS::mvrnorm(100, c(x = 0, m = 0, y = 0), diag(3)))
# Only documented
estimators <- c(
"ML",
"MLR",
"MLM",
"MLMV",
"MLMVS",
"GLS",
"WLS",
"WLSM",
"WLSMV",
"ULS",
"ULSM",
"ULSMV",
"DLS",
"DWLS",
"MLF"
)
fits <- sapply(estimators,
               function(x) sem(mod, dat, estimator = x),
               simplify = FALSE,
               USE.NAMES = TRUE)
fit_options <- lapply(fits, function(x) x@Options)
options0 <- c(
"estimator",
"se",
"missing",
"information",
"test"
)
fit_options0 <- t(sapply(fit_options, function(x) unlist(x[options0]),
                       USE.NAMES = TRUE))
fit_options0 <- as.data.frame(fit_options0)
fit_options0 <- fit_options0[order(fit_options0$estimator,
                                   fit_options0$se,
                                   fit_options0$test), ]
print(fit_options0, quote = FALSE)
```

This is the table (may not display correct in email browser):

```
      estimator                 se  missing information1 information2               test
DLS         DLS         robust.sem listwise     expected     expected    satorra.bentler
WLSM       DWLS         robust.sem listwise     expected     expected    satorra.bentler
WLSMV      DWLS         robust.sem listwise     expected     expected     scaled.shifted
DWLS       DWLS           standard listwise     expected     expected           standard
GLS         GLS           standard listwise     expected     expected           standard
MLR          ML robust.huber.white listwise     observed     observed yuan.bentler.mplus
MLMVS        ML         robust.sem listwise     expected     expected  mean.var.adjusted
MLM          ML         robust.sem listwise     expected     expected    satorra.bentler
MLMV         ML         robust.sem listwise     expected     expected     scaled.shifted
ML           ML           standard listwise     expected     expected           standard
MLF          ML           standard listwise  first.order  first.order           standard
ULSM        ULS         robust.sem listwise     expected     expected    satorra.bentler
ULSMV       ULS         robust.sem listwise     expected     expected     scaled.shifted
ULS         ULS           standard listwise     expected     expected           standard
WLS         WLS           standard listwise     expected     expected           standard

```

Are there any options that I overlooked and should be included?

-- Shu Fai

P.S. I also prepared a longer version, which examine all combinations of estimator, missing, and fixed.x, because it is common to have missing data in my work:


Terrence Jorgensen

unread,
Oct 4, 2021, 7:58:40 AM10/4/21
to lavaan
Are there any options that I overlooked and should be included?

I was already going to suggest varying these options:
 
all combinations of estimator, missing, and fixed.x

Perhaps also conditional.x, although I don't think that should invoke different behavior than fixed.x alone (note that conditional.x=TRUE implies fixed.x=TRUE).  Note that there is missing="fiml" (applies only to incomplete endogeous variables) or "fiml.x" (also applies to incomplete exogenous variables).   

I would also consider discretizing your outcome to see what happens when you actually have an ordinal outcome, because I'm not sure what lavaan does when you request DWLS for all continuous variables (what would the weight matrix be?).

You might also want to keep track of the lavOptions "h1.information" and "observed.information", which carry further information about the "information" options.

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

Shu Fai Cheung

unread,
Oct 4, 2021, 8:29:39 AM10/4/21
to lavaan
Thanks a lot for the suggestions! I will revise the script when I have time. Actually, the tables won't change substantially across versions. They only need to be generated once and then posted somewhere as quick references, to let users know what happen to options R, S, T, ... when they set options A, B, C, ... .

-- Shu Fai

Shu Fai Cheung

unread,
Oct 16, 2021, 10:03:45 PM10/16/21
to lavaan
Just read an excellent paper on the various options in lavaan, accepted for publication in SEM:

Savalei, V., & Rosseel, Y. (2021). Computational options for standard errors and test statistics with incomplete normal and nonnormal data in SEM. PsyArXiv. https://doi.org/10.31234/osf.io/wmuqj

It gave a very detailed description and explanations of many (or all?) options related to SE and model chi-square test. What I did is no longer necessary (maybe except for the categorical data case Jorgensen suggested). I will just refer to this paper when I need to know what a "pre-packaged" option (their term) really means. :)

-- Shu Fai
Reply all
Reply to author
Forward
0 new messages