print() reports the outcome of efa_bartlett()'s test of sphericity: a verdict
on whether the test was significant (and what that implies for the suitability
of the data for factor analysis), followed by the chi-square statistic, its
degrees of freedom, and the p-value. 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()).
Arguments
- x
An object of class
efa_bartlett(output fromefa_bartlett()).- ...
Not used; for consistency with the generic.
Value
print() returns its argument x invisibly. format() returns a
character vector with the report lines (styled to the active console theme;
plain when colours are disabled).
Examples
bart <- efa_bartlett(test_models$baseline$cormat, N = 500)
bart
#>
#> ✔ The Bartlett's test of sphericity was significant at an alpha level of .05.
#> These data are probably suitable for factor analysis.
#>
#> 𝜒²(153) = 2173.28, p < .001
# format() returns the same lines as plain text:
writeLines(format(bart))
#>
#> ✔ The Bartlett's test of sphericity was significant at an alpha level of .05.
#> These data are probably suitable for factor analysis.
#>
#> 𝜒²(153) = 2173.28, p < .001