factoranalysis: Principal Components and Exploratory Factor Analysis

View source: R/itemanalysis.R

factoranalysisR Documentation

Principal Components and Exploratory Factor Analysis

Description

Perform principal components or exploratory factor analysis of a set of variables. This is a wrapper around psych::principal, psych::fa, and psych::irt.fa.

Usage

factoranalysis(
  x,
  nfactors,
  rotate = "oblimin",
  fm = "minres",
  polychor = FALSE,
  return.res = FALSE
)

Arguments

x

a data frame of variables to be analyzed

nfactors

(integer) number of factors to be extracted

rotate

(char) rotation

fm

factoring (char) method. May be any method allowed for psych::fa or "principal" for principal components analysis.

polychor

(logical) use polychoric correlatons (via psych::irt.fa)?

return.res

(logical) if TRUE, return output as a list instead of simply printing the output. This is used by Iana to render the output via renderTable().

Value

if return.res is TRUE, a list with components res (the results of factor analysis) and stats (the fit statistics)

Author(s)

Michael Hock michael.hock@uni-bamberg.de


mihock/iana documentation built on Jan. 14, 2024, 8:58 p.m.