![](/img/trans.png)
[英]function of corr.test() and cor() to get pearson correlation and P value in R
[英]psych::corr.test adjust not working when kendall correlation is used to get p.value
我發現其他用戶正在使用心理包corr.test函數,並在 此處和此處獲得經過校正和未經校正的p.values。他們使用Pearson和Spearman Rho相關性與“ adjust”參數。
但是使用kendall相關方法時我沒有得到調整...我認為這不是數據問題...代碼如下:
JustScores.Cor<-psych::corr.test(JustScores,method="kendall",adjust="none")
ap<-data.frame(JustScores.Cor$p)
如果省略“ adjust =” none“”(默認=“ holm”),或將調整值更改為“ BH”,“ bonferroni”,“ BH”,“ fdr”,則得到相同的值...
無論我得到什么,它都不是未校正的值,因為它與ggscatter(ggpubr軟件包)和stats cor.test中顯示的值不同。
cor.test(JustScores[,VarName1],JustScores[,VarName2],exact=TRUE,method="kendall")$p.value
我也嘗試了corr.p,但它提供了相同的...
我究竟做錯了什么? 任何想法?
任何幫助表示贊賞。
我無法重現您的問題。 原始概率在標有“概率值”的矩陣的對角線以下,而調整后的值在對角線以上。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.