Skip to content

Instantly share code, notes, and snippets.

@rschuetzler
Created February 7, 2014 18:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rschuetzler/8869180 to your computer and use it in GitHub Desktop.
Save rschuetzler/8869180 to your computer and use it in GitHub Desktop.
Get number of factors
library(nFactors)
ev <- eigen(cor(all.data[self.reports]))
ap <- parallel(subject = nrow(all.data), var = ncol(all.data[self.reports]),
rep = 100, cent = 0.05)
nS <- nScree(x = ev$values, aparallel = ap$eigen$qevpea)
plotnScree(nS)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment