简体   繁体   English

如何计算偏相关分析,尤其是斯皮尔曼的 pca?

[英]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 ), but the error came up我尝试按照 pcor.test 手册中的说明进行操作(在此处找到http://www.yilab.gatech.edu/pcor.html ),但出现了错误

Non-numeric argument to mathematical function

What's wrong?怎么了?

I initially used my own data which is imported from SPSS我最初使用的是从 SPSS 导入的自己的数据

pcor.test(a$Pexposed, a$w0, a$CAI, method = "spearman", na.rm = T)

but the output is like the following但 output 如下

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?似乎 pcor.test 不适合新手用户? Thanks for any help.谢谢你的帮助。

PS: Here's my data. PS:这是我的数据。

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.你得到的错误是因为你给了 function 一个非数值向量。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM