Created
August 4, 2018 11:41
-
-
Save vsoch/83b5727f12cf7e3549e6c7e1bb53d30f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This needs to already have been done | |
# install.packages("psych") | |
library(psych) | |
SCRATCH <- Sys.getenv("SCRATCH") | |
setwd(SCRATCH) | |
# This command assumes the file exists at /scratch/$USER/emotionzs.csv | |
alldata = read.csv("emotionzs.csv", header = FALSE) | |
ev <- eigen(cor(alldata)) # get eigenvalues | |
ap <- parallel(subject=nrow(alldata),var=ncol(alldata), | |
rep=100,cent=.05) | |
nS <- nScree(x=ev$values, aparallel=ap$eigen$qevpea) | |
# This will save to /scratch/$USER | |
save(nS) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment