pcc(scrime)
pcc()所属R语言包:scrime
Pearson's Contingency Coefficient
皮尔逊的应变系数
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Computes the values of (the corrected) Pearson's contingency coefficient for all pairs of rows of a matrix.
(校正),皮尔逊的应变系数的矩阵行对计算值。
用法----------Usage----------
pcc(x, dist = FALSE, corrected = TRUE, version = 1)
参数----------Arguments----------
参数:x
a numeric matrix consisting of integers between 1 and n.cat, where n.cat is the maximum number of levels a variable in x can take.
一个数字矩阵之间的整数n.cat,其中n.cat是最大级别数中的一个变量x可以。
参数:dist
should the distance based on Pearson's contingency coefficient be computed? For how this distance is computed, see version.
距离应根据Pearson的应变系数计算的?对于如何计算这个距离,version。
参数:corrected
should Pearson's contingency coefficient be corrected such that it can take values between 0 and 1? If not corrected, it takes values between and 0 and sqrt((a - 1) / a), where a is the minimum of the numbers of levels that the respective two variables can take. Must be set to TRUE, if dist = TRUE.
Pearson的应变系数应该进行校正等,它可以采取在0和1之间的值?如果不进行校正,它需要之间的值和0,且sqrt((a - 1) / a),其中a是最低的水平,可以采取相应的两个变量的数目。必须设置为TRUE,如果dist = TRUE。
参数:version
a numeric value – either 1, 2, or 3 – specifying how the distance is computed. Ignored if dist = FALSE. If 1, sqrt(1 - Cont^2) is computed, where Cont denotes Pearson's contigency coefficient. If 2, 1 - Cont is determined, and if 3, 1 - Cont^2 is returned.
一个数字值 - 1,2,或3 - 指定距离计算如何。如果忽略dist = FALSE。如果1,sqrt(1 - Cont^2)计算,其中Cont表示Pearson的contigency系数。如果是2,1 - Cont是确定的,如果是3,1 - Cont^2返回。
值----------Value----------
A matrix with nrow(x) columns and rows containing the values of (or distances based on) the (corrected) Pearson's contigency coefficient for all pairs of rows of x.
的矩阵nrow(x)的行和列的值(或距离的基础上)(校正)皮尔逊的contigency系数的所有对行的x。
(作者)----------Author(s)----------
Holger Schwender, <a href="mailto:holger.schwender@udo.edu">holger.schwender@udo.edu</a>
参见----------See Also----------
smc
smc
实例----------Examples----------
# Generate a data set consisting of 10 rows and 200 columns,[生成数据集组成的10行和200列,]
# where the values are randomly drawn from the integers 1, 2, and 3.[的值是随机绘制从整数1,2,和3。]
mat <- matrix(sample(3, 2000, TRUE), 10)
# For each pair of rows of mat, the value of the corrected Pearson's [对于每个对行的垫子,该值的校正Pearson的]
# contingency coefficient is then obtained by[应急系数,然后通过]
out1 <- pcc(mat)
out1
# and the distances based on this coefficient by[这个系数的基础上的距离]
out2 <- pcc(mat, dist = TRUE)
out2
# Note that if version is set to 1 (default) in pcc, then[需要注意的是,如果版本被设置为1(默认值),然后在PCC]
all.equal(sqrt(1 - out1^2), out2)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|