R/factor.R

Defines functions factor

Documented in factor

#' @title Factor analysis
#' @rdname factor
#' @export
#' @importFrom psych polychoric fa


factor <- function(ncmscs_factor_df) {
  polycor <- polychoric(ncmscs_factor_df, smooth = FALSE)
  fa(polycor$rho, nfactors = 3, rotate = "Promax", fm = "ols")
}
awconway/nc-mscs documentation built on Feb. 17, 2021, 10:07 p.m.