print.md_semfindr {semfindr}R Documentation

Print a 'md_semfindr' Class Object

Description

Print the content of a 'md_semfindr'-class object.

Usage

## S3 method for class 'md_semfindr'
print(x, digits = 3, first = 10, sort = TRUE, decreasing = TRUE, ...)

Arguments

x

An 'md_semfindr'-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

Logical. If TRUE, the default, the cases will be sorted based on Mahalanobis distance. The order is determined by decreasing.

decreasing

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

...

Other arguments. They will be ignored.

Details

The print method for the 'md_semfindr'-class object, returned by mahalanobis_rerun() or mahalanobis_predictors(). 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

mahalanobis_rerun(), mahalanobis_predictors()

Examples


library(lavaan)
dat <- pa_dat
# The model
mod <-
"
m1 ~ a1 * iv1 + a2 * iv2
dv ~ b * m1
"
# Fit the model
fit <- lavaan::sem(mod, dat)
summary(fit)
# Fit the model n times. Each time with one case removed.
# For illustration, do this only for selected cases.
fit_rerun <- lavaan_rerun(fit, parallel = FALSE,
                          to_rerun = 1:10)
# Compute the Mahalanobis distance for each case
out <- mahalanobis_rerun(fit_rerun)
out
print(out, first = 3)


[Package semfindr version 0.1.8 Index]