print.fit_measures_change {semfindr} | R Documentation |
Print a 'fit_measures_change' Class Object
Description
Print the content of a 'fit_measures_change'-class object.
Usage
## S3 method for class 'fit_measures_change'
print(
x,
digits = 3,
first = 10,
sort_by = NULL,
decreasing = TRUE,
absolute = TRUE,
...
)
Arguments
x |
An 'fit_measures_change'-class object. |
digits |
The number of digits after the decimal. Default is 3. |
first |
Numeric. If not |
sort_by |
String. Default is |
decreasing |
Logical. Whether cases, if sorted,
is on decreasing order. Default is |
absolute |
Logical. Whether cases, if sorted,
are sorted on absolute values. Default is |
... |
Other arguments. They will be ignored. |
Details
All the functions on case influence
on fit measures, fit_measures_change()
and fit_measures_change_approx()
, return
an fit_measures_change
-class object. This method will print
the output, with the option to sort the cases.
Value
x
is returned invisibly. Called for its side effect.
See Also
fit_measures_change()
, fit_measures_change_approx()
Examples
library(lavaan)
# A path model
dat <- pa_dat
mod <-
"
m1 ~ a1 * iv1 + a2 * iv2
dv ~ b * m1
a1b := a1 * b
a2b := a2 * b
"
# Fit the model
fit <- lavaan::sem(mod, dat)
summary(fit)
# Case influence
out <- fit_measures_change_approx(fit)
out
print(out, sort_by = "chisq", first = 5)
fit_rerun <- lavaan_rerun(fit, parallel = FALSE,
to_rerun = c(2, 3, 5, 7))#'
out <- fit_measures_change(fit_rerun)
out
print(out, sort_by = "chisq", first = 5)