How to compute partial correlation analysis, particularly spearman's pca?
I've tried to follow the instruction from the pcor.test manual (found here http://www.yilab.gatech.edu/pcor.html), b开发者_开发技巧ut the error came up
Non-numeric argument to mathematical function
What's wrong?
I initially used my own data which is imported from SPSS
pcor.test(a$Pexposed, a$w0, a$CAI, method = "spearman", na.rm = T)
but the output is like the following
Error in pcor.test(a$Pexposed, a$w0, a$CAI, method = "spearman", na.rm = T) :
unused argument(s) (method = "spearman", na.rm = T)
What's going on here? It seems that pcor.test is not for newbie user? Thanks for any help.
PS: Here's my data.
Pexposed=c(1:10)
w0=c(3:12)
CAI=c(2:11)
a=data.frame(Pexposed=Pexposed,w0=w0,CAI=CAI)
The error you get is because you gave a non-numerical vector to the function.
精彩评论