wkappa(rmac)
wkappa()所属R语言包:rmac
Kappa Agreement Statistics
卡帕协议统计
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Calculates Cohen's kappa and Scott's pi (also called random marginal agreement coefficient).
计算科恩kappa和斯科特的PI(也被称为系数随机的边际协议)。
用法----------Usage----------
wkappa(x,...)
## Default S3 method:[默认方法]
wkappa(x, Wcode = 0, method = c("fmac", "rmac"), conf.int = TRUE, conf.level = 0.95, s = 1:k, ...)
## S3 method for class 'table':
wkappa(x, Wcode = 0, method = c("fmac", "rmac"), conf.int = TRUE, conf.level = 0.95, s = 1:k, ...)
参数----------Arguments----------
参数:x
table, matrix or data frame of responses, where the responses are in columns 1 and 2 of the matrix or data frame
表,矩阵或数据框的响应,其中的反应是在矩阵或数据框的第1列和第2
参数:Wcode
0=categorical weights, 1=absolute value of difference, 2=squared difference
0 =分类权重,1 =绝对值的差异,2 =平方差
参数:method
indicates which method of calculating the agreement coefficient to use
指示该方法计算的协议使用的系数
参数:conf.int
logical, calculate confidence intervals
逻辑,计算置信区间
参数:conf.level
the confidence level
的置信水平
参数:s
vector of scores for values
分数值向量
参数:...
any other arguments passed to the function; not currently used
任何其他参数传递给函数,而不是目前使用的
Details
详细信息----------Details----------
If the input data is individual scores, it is converted to a contingency table and a list of factors is created based on the combined set of unique levels from each input data set. This method includes factors that are present in one data set and absent in the other.
如果输入的数据是个人得分,它被转换成一个列联表的因素,并列出从每个输入数据集创建的基础上,结合一套独特的水平。此方法包括的因素是存在于一个数据集,并在其他缺席。
The default method assumes that the data is in the first two columns of x.
默认的方法假定该数据中的前两列x。
The confidence intervals are calculated using the delta method (See the supplement to Fay (2005) for more details.). If the number of zeros in the contigency matrix is too great, then the confidence intervals cannot be calculated and are set to (-1,1).
使用增量方法(有关详细信息,请参阅补充飞飞“(2005年)。)的置信区间的计算。的零的个数在contigency矩阵实在是太大了,那么置信区间不能被计算并设置为(-1,1)。
值----------Value----------
Returns a vector of doubles containing the weighted kappa and/or random marginal agreement coefficient statistic and the upper and lower bounds of the confidence interval for each statistic.
返回一个矢量,的双打含加权kappa和/或随机边际协议的系数统计,每个统计的置信区间的上限和下限。
Note that if do.ci = FALSE, then the confidence interval upper and lower bounds are not returned.
需要注意的是,如果do.ci = FALSE,然后置信区间的上界和下界不会返回。
(作者)----------Author(s)----------
Jennifer Kirk (using functions written by M.P. Fay)
参考文献----------References----------
Cohen, J. (1960). A coefficient of agreement for nominal scales. Educ. Psychol. Meas., 20: 37-46.
Cohen, J. (1968). Weighted kappa: Nominal scale agreement with provision for scaled disagreement or partial credit. Psychol. Bull., 70: 213-220.
Fay, M.P. (2005). Random marginal agreement coefficients: Rethinking the adjustment for chance in agreement coefficients. Biostatistics, 6: 171-180.
参见----------See Also----------
See also: rmac-package, rmacBoot, cac
另请参阅:rmac-package,rmacBoot,cac
实例----------Examples----------
#a simple example with two vectors of measurements (scores are 1 or 2)[用的两个向量的测量(得分为1或2)一个简单的例子]
set.seed(41919)
measure1 <- c( rep(1,15), rep(2,5) )
measure2 <- c( rep(1,12), rep(2,8) )
measures<- cbind(measure1, measure2)
#the default method[默认的方法]
wkappa(measures, method = "fmac")
wkappa(measures, method = "rmac")
#the table method[表法]
mtable<- table(measure1, measure2)
wkappa(mtable, method = "fmac")
wkappa(mtable, method = "rmac")
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|