print.efa_screen: Print and format an efa_screen object

View source: R/print.efa_screen.R

print.efa_screenR Documentation

Print and format an efa_screen object

Description

print() turns the factor-analysis screening diagnostics computed by efa_screen() into a sectioned report with banded, colour-coded verdicts: sampling adequacy and sphericity (the Kaiser-Meyer-Olkin measure and Bartlett's test of sphericity), multicollinearity (the determinant and condition number of the correlation matrix), the per-variable diagnostics, and, when raw data were supplied, multivariate normality and multivariate outliers. It closes with a consolidated list of actionable recommendations (for example, which items to consider dropping, whether to prefer an ordinal or a robust estimator, and a caveat that keeps an over-powered Bartlett's test from being over-trusted). format() assembles the same report and returns it as a character vector; print() is cat(format(x), sep = "\n"). The lines follow the active console theme, so they are plain when colours are disabled (for example when captured into a file or stripped with cli::ansi_strip()). print() does not draw a plot.

Usage

## S3 method for class 'efa_screen'
print(x, digits = 3, ...)

## S3 method for class 'efa_screen'
format(x, digits = 3, ...)

Arguments

x

An object of class efa_screen (output from efa_screen()).

digits

Integer. The number of decimal places the reported values are rounded to. Default is 3.

...

Not used; for consistency with the generic.

Value

print() returns its argument x invisibly. format() returns a character vector with the report lines.

See Also

Other factor analysis suitability: efa_bartlett(), efa_kmo(), efa_screen()

Examples

# From raw data
efa_screen(iris[, 1:4])

# From a correlation matrix (supply N for Bartlett's test of sphericity)
efa_screen(test_models$baseline$cormat, N = 500)

# format() returns the same lines as a character vector:
writeLines(format(efa_screen(test_models$baseline$cormat, N = 500)))


EFAtools documentation built on Aug. 21, 2026, 5:16 p.m.