clearing_fa {ccpsyc}R Documentation

Function to quickly organize and clear psych factor loadings

Description

Function to quickly organize and clear psych factor loadings

Usage

clearing_fa(
  psych_fa,
  cutoff = 0.4,
  dbl_dist = 0.2,
  key_file = NULL,
  cleaned = TRUE
)

Arguments

psych_fa

Output from the psych package, can be either fa or principal with at least two dimensions

cutoff

Desired cutoff below which loadings are omitted defaults to .40

dbl_dist

Desired distance between highest and second highest loading for an item to remove double loadings, defaults to .20

key_file

Optional: Either a .csv or .xlsx file with at least two columns: 1 labeled item containing the item labels as in the data frame, 2 a column labeled wording containing the item wording.

cleaned

If true (default), only the cleaned solution with a message for descriptive stats are returned. If false the function returns a list of data frames one cleaned and one showing all in-between steps

Value

clean This column contains the assignment after removing NAs and double loadings

dir This column contains the direction (positive or negative) of the highest loading.

Examples

library(psych)
fa_solution <- fa(example[c(paste0("help", 1:6, "m"), c(paste0("voice", 1:5, "m")))], nfactors = 2)
clearing_fa(fa_solution)

[Package ccpsyc version 0.2.6 Index]