clearing_fa | R Documentation |
Function to quickly organize and clear psych factor loadings
clearing_fa( psych_fa, cutoff = 0.4, dbl_dist = 0.2, key_file = NULL, cleaned = TRUE )
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 |
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.
library(psych) fa_solution <- fa(example[c(paste0("help", 1:6, "m"), c(paste0("voice", 1:5, "m")))], nfactors = 2) clearing_fa(fa_solution)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.