Learn R Programming

psycho (version 0.4.91)

n_factors: Find Optimal Factor Number.

Description

Find optimal components number using maximum method aggreement.

Usage

n_factors(df, rotate = "varimax", fm = "minres", n = NULL)

Arguments

df

A dataframe or correlation matrix

rotate

What rotation to use c("none", "varimax", "oblimin","promax")

fm

Factoring method: "pa" for Principal Axis Factor Analysis, "minres" (default) for minimum residual (OLS) factoring, "mle" for Maximum Likelihood FA and "pc" for Principal Components

n

If correlation matrix is passed, the sample size.

Value

output

Examples

Run this code
# NOT RUN {
df <- dplyr::select_if(attitude, is.numeric)
results <- psycho::n_factors(df)

summary(results)
plot(results)

# See details on methods
psycho::values(results)$methods
# }

Run the code above in your browser using DataLab