View source: R/method-fitmeasures.R
| bfit_indices | R Documentation |
Compute posterior distributions of Bayesian fit indices for an INLAvaan
model, analogous to blavaan::blavFitIndices().
bfit_indices(
object,
baseline.model = NULL,
rescale = c("devM", "MCMC"),
nsamp = NULL,
samp_copula = TRUE
)
## S3 method for class 'bfit_indices'
summary(object, ...)
## S3 method for class 'bfit_indices'
print(x, ...)
object |
An object of class INLAvaan. |
baseline.model |
The baseline (null) model that the incremental fit
indices (BCFI, BTLI, BNFI) are scaled against. |
rescale |
Character string controlling how the Bayesian chi-square
is rescaled. |
nsamp |
Number of posterior samples to draw. Defaults to the value used when fitting the model. |
samp_copula |
Logical. When |
... |
Additional arguments passed to methods. |
x |
An object of class |
An S3 object of class "bfit_indices" containing:
indicesNamed list of numeric vectors (one per posterior sample) for each computed fit index.
detailsList with chisq (per-sample deviance), df, pD,
rescale, and nsamp.
Use summary() to obtain a table of posterior summaries (Mean, SD,
quantiles, Mode) for each index.
lavaan::fitMeasures(), blavaan::blavFitIndices(),
fitmeasures(), compare()
HS.model <- "
visual =~ x1 + x2 + x3
textual =~ x4 + x5 + x6
speed =~ x7 + x8 + x9
"
utils::data("HolzingerSwineford1939", package = "lavaan")
fit <- acfa(HS.model, HolzingerSwineford1939, std.lv = TRUE, nsamp = 100,
verbose = FALSE)
# Absolute fit indices
bf <- bfit_indices(fit)
bf
summary(bf)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.