Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有两列调查数据。要获得卡方值,我可以使用:
chisq.test(dat$colA, dat$colB)
输出可能是
X 平方 = 20,df = 5,p 值 = 0.2909
如何获得两列之间的相关性,值在 -1 和 1 之间?
谢谢。
用这个:cor(dat$colA, dat$colB)
cor(dat$colA, dat$colB)