Skip to contents

ggplot of parallel analysis from the psych package

Usage

parallel_analysis(
  d,
  fm = "pa",
  factor_based = TRUE,
  vcolors = c("firebrick", "royalblue"),
  font_family = "sans",
  ...
)

Arguments

d

data to be analyzed

fm

factor method passed to psych::fa.parallel

factor_based

TRUE is factor-based and FALSE is principal component-based

vcolors

vector of 2 colors for lines

font_family

Name of font

...

parameters passed to psych::fa.parallel

Examples

d <- psych::bfi[,1:25]
parallel_analysis(d)