R语言psych包 corr.test函数使用说明 |
您所在的位置:网站首页 › 香港哪个大学在深圳 › R语言psych包 corr.test函数使用说明 |
返回R语言psych包函数列表 功能\作用概述:尽管cor函数找到矩阵的相关性,但它不报告概率值。校正试验是的,但一次只针对一对变量。校正试验使用cor找到完整或成对数据的相关性,并报告样本大小和概率值。对于对称矩阵,原始概率报告在对角线下方,相关性调整为对角线上方的多重比较。在x和y不同的情况下,默认值是调整多个测试的概率。两者校正试验和corr.p返回每个相关性的原始和调整的置信区间。 语法\用法:corr.test(x, y = NULL, use = "pairwise",method="pearson",adjust="holm", alpha=.05,ci=TRUE,minlength=5)corr.p(r,n,adjust="holm",alpha=.05,minlength=5,ci=TRUE) 参数说明:x : 矩阵或数据帧 y : 与x行数相同的第二个矩阵或数据帧 use : use=“pairwise”是默认值,将成对删除案例。use=“complete”将选择刚刚完成的案例。 method : method=“pearson”是默认值。传递给cor的替代品是“斯皮尔曼”和“肯德尔” adjust : 应该对多次测试进行什么调整?(“霍尔姆”,“霍克伯格”,“霍梅尔”,“邦费罗尼”,“波黑”,“由”,“罗斯福”,“无”)。有关为什么使用“holm”而不是“bonferroni”的详细信息,请参见p.adjust。 alpha : α水平置信区间 r : 相关矩阵 n : 如果使用校正p,观察值的数量可以是矩阵(从校正试验,或一个定标器。如果找到偏相关的显著性,则设置为n-np。(见下文)。 ci : 默认情况下,会找到置信区间。然而,这会导致明显的速度减慢,特别是对于大型问题。因此,对于rs、ts和ps,设置ci=FALSE minlength : 缩写的最小长度是多少。默认为5。 示例\实例:ct < - corr.test(attitude) #find the correlations and give the probabilitiesct #show the resultscts < - corr.test(attitude[1:3],attitude[4:6]) #reports all values corrected for multiple tests #corr.test(sat.act[1:3],sat.act[4:6],adjust="none") #don't adjust the probabilities #take correlations and show the probabilities as well as the confidence intervalsprint(corr.p(cts$r,n=30),short=FALSE) #don't adjust the probabilitiesprint(corr.test(sat.act[1:3],sat.act[4:6],adjust="none"),short=FALSE) |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |