This function will create publication worthy factor tables from objects created from psych pack. I have came across this beautiful piece of codes at https://www.anthonyschmidt.co/post/2020-09-27-efa-tables-in-r/ and modified it a bit.
Arguments
- x
A psych package object.
- cut
The value under which all factor loading will be suppressed.
- complexity
To add complexity parameters.
Value
A publication ready summary table for the Factor analysis conducted by psych Package. Output structure is data frame.
Examples
data <- tabledown::Rotter[, 11:31]
correlations <- psych::polychoric(data, correct = 0)
fa.5F.1 <- psych::fa(r=correlations$rho, nfactors = 5, fm= "pa",rotate ="varimax",
residuals = TRUE, SMC = TRUE, n.obs =428)
table <- fac.tab(fa.5F.1, .3)
#> Joining with `by = join_by(item)`
#always save the output into an object