Learn R Programming

EFAtools (version 1.1.0)

print.efa_scores: Print and format an efa_scores object

Description

print() shows a concise overview of an efa_scores() result: a header naming the method and whether factor scores were computed, and the per-factor determinacy table (determinacy, squared determinacy, and Guttman index). summary() returns a summary.efa_scores object whose print method adds the full factor-weight matrix, the score validity/univocality matrix, and the score intercorrelations. 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()).

Usage

# S3 method for efa_scores
print(x, digits = 3, ...)

# S3 method for efa_scores format(x, digits = 3, ...)

# S3 method for efa_scores summary(object, digits = 3, ...)

# S3 method for summary.efa_scores print(x, ...)

# S3 method for summary.efa_scores format(x, digits = x$opts$digits, ...)

Value

print() and the print method for summary.efa_scores objects return their argument invisibly. format() returns a character vector with the report lines. summary() returns an object of class summary.efa_scores.

Arguments

x, object

An object of class efa_scores; for the summary.efa_scores methods, the object returned by summary().

digits

numeric. Number of decimal places for the printed tables. Default is 3.

...

Not used; for consistency with the generics.

See Also

Other factor scoring: efa_scores()

Examples

Run this code
efa <- efa_fit(test_models$baseline$cormat, n_factors = 3, N = 500,
               estimator = "PAF", rotation = "oblimin")
fs <- efa_scores(test_models$baseline$cormat, f = efa)
fs
summary(fs)

# format() returns the same lines as a character vector:
writeLines(format(fs))

Run the code above in your browser using DataLab