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 NULL, it prints only the first k cases, k equal to first. Default is 10.

sort_by

String. Default is NULL and the output is not sorted. If set to a column names of x, cases will sorted by this columns. The sorting is done on the absolute values if absolute is TRUE, and in decreasing order if decreasing is TRUE. If decrease is FALSE, the order is increasing. If absolute is FALSE, the sorting is done on the raw values.

decreasing

Logical. Whether cases, if sorted, is on decreasing order. Default is TRUE. See sort_by.

absolute

Logical. Whether cases, if sorted, are sorted on absolute values. Default is TRUE. See sort_by.

...

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)


[Package semfindr version 0.1.8 Index]