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: