[R] nScree
atramon
atramon at ncsu.edu
Thu Jul 10 15:49:21 CEST 2014
I'm trying to determine the number of factors to extract for a factor
analysis, but am having trouble with the nS/nScree function. I did this
successfully earlier today but with the wrong matrix/dataframe, and for some
reason it won't work with the corrected one even though I've entered the
same call.
attmott is the matrix:
attmott<-read.table(file.choose(), header=F, sep=",",)
> attmott<-as.matrix(attmott)
> dim(attmott)
[1] 18 41
> ev<-eigen(cor(attmott))
> ap<-parallel(subject=ncol(attmott), var=nrow(attmott), rep=100, cent=.05)
> nS<-nScree(x=ev$values, aparallel=ap$eigen$qevpea)
Error in while ((cond1 == TRUE) && (cond2 == TRUE) && (i < nk)) { :
missing value where TRUE/FALSE needed
I'm not sure what this error message means... I tried entering
nS<-nScree(x=ev$values, cor=TRUE, aparallel=ap$eigen$qevpea) but that did
not help, nor did replacing all the 0's with NA.
Any help would be greatly appreciated!
--
View this message in context: http://r.789695.n4.nabble.com/nScree-tp4693815.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list