show_options | R Documentation |
Display the values of
major options in a model fitted
by lavaan::lavaan()
or its
wrappers (e.g., lavaan::sem()
or
lavaan::cfa()
).
show_options(fit)
## S3 method for class 'show_options'
print(x, ...)
fit |
An output of
|
x |
The output of |
... |
Additional arguments. Ignored. |
It extracts the values of
major options in the output of
lavaan::lavaan()
or its wrappers
(e.g., lavaan::sem()
or
lavaan::cfa()
.
It checks the actual values, not
the call used. This is useful for
understanding how a prepackaged
estimator such as ML
, MLM
, and
MLR
set other options. It
supports the following options:
Estimator (estimator
)
Standard error (se
)
Model chi-square test(s) (test
)
Missing data method (missing
)
Information matrix used for
computing standard errors
(information
)
Information matrix used for
computing model chi-square
(information
)
Whether the mean structure is included.
A show_options
-class object with a
print method that formats the output.
print(show_options)
: The print method of the output of show_options()
.
Shu Fai Cheung https://orcid.org/0000-0002-9871-9448
library(lavaan)
# From the help page of lavaan::cfa().
HS.model <- '
visual =~ x1 + x2 + x3
textual =~ x4 + x5 + x6
speed =~ x7 + x8 + x9
'
fit <- cfa(HS.model, data = HolzingerSwineford1939)
tmp <- show_options(fit)
tmp
fit <- cfa(HS.model, data = HolzingerSwineford1939, estimator = "MLR")
show_options(fit)
fit <- cfa(HS.model, data = HolzingerSwineford1939, estimator = "MLM")
show_options(fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.