View source: R/print.efa_screen.R
| print.efa_screen | R Documentation |
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.
## S3 method for class 'efa_screen'
print(x, digits = 3, ...)
## S3 method for class 'efa_screen'
format(x, digits = 3, ...)
x |
An object of class |
digits |
Integer. The number of decimal places the reported values are rounded to. Default is 3. |
... |
Not used; for consistency with the generic. |
print() returns its argument x invisibly. format() returns a
character vector with the report lines.
Other factor analysis suitability:
efa_bartlett(),
efa_kmo(),
efa_screen()
# 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)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.