efa_summary: Exploratory Factor Analysis

View source: R/efa_summary.R

efa_summaryR Documentation

Exploratory Factor Analysis

Description

[Stable]
The function is used to fit a exploratory factor analysis model. It will first find the optimal number of factors using parameters::n_factors. Once the optimal number of factor is determined, the function will fit the model using psych::fa(). Optionally, you can request a post-hoc CFA model based on the EFA model which gives you more fit indexes (e.g., CFI, RMSEA, TLI)

Usage

efa_summary(
  data,
  cols,
  rotation = "varimax",
  optimal_factor_method = FALSE,
  efa_plot = TRUE,
  digits = 3,
  n_factor = NULL,
  post_hoc_cfa = FALSE,
  quite = FALSE,
  streamline = FALSE,
  return_result = FALSE
)

Arguments

data

data.frame

cols

columns. Support dplyr::select() syntax.

rotation

the rotation to use in estimation. Default is 'oblimin'. Options are 'none', 'varimax', 'quartimax', 'promax', 'oblimin', or 'simplimax'

optimal_factor_method

Show a summary of the number of factors by optimization method (e.g., BIC, VSS complexity, Velicer's MAP)

efa_plot

show explained variance by number of factor plot. default is TRUE.

digits

number of digits to round to

n_factor

number of factors for EFA. It will bypass the initial optimization algorithm, and fit the EFA model using this specified number of factor

post_hoc_cfa

a CFA model based on the extracted factor

quite

suppress printing output

streamline

print streamlined output

return_result

If it is set to TRUE (default is FALSE), it will return a fa object from psych

Value

a fa object from psych

Examples

efa_summary(lavaan::HolzingerSwineford1939, starts_with("x"), post_hoc_cfa = TRUE)

psycModel documentation built on Nov. 2, 2023, 6:02 p.m.