Brat(VGAM)
Brat()所属R语言包:VGAM
Inputting Data to fit a Bradley Terry Model
输入数据,以满足布拉德利特里型号
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Takes in a square matrix of counts and outputs them in a form that is accessible to the brat and bratt family functions.
注意到在一个方阵计数,他们是方便brat和bratt家庭功能的一种形式,输出。
用法----------Usage----------
Brat(mat, ties = 0 * mat, string = c(">","=="), whitespace = FALSE)
参数----------Arguments----------
参数:mat
Matrix of counts, which is considered M by M in dimension when there are ties, and M+1 by M+1 when there are no ties. The rows are winners and the columns are losers, e.g., the 2-1 element is now many times Competitor 2 has beaten Competitor 1. The matrices are best labelled with the competitors' names.
矩阵的计数,这被认为是MM的尺寸有关系,M+1M+1时,有没有关系。该行是赢家和列都是输家,例如,在2-1元多次击败竞争对手2竞争对手1。矩阵是最好的竞争对手的名称与标记。
参数:ties
Matrix of counts. This should be the same dimension as mat. By default, there are no ties. The matrix must be symmetric, and the diagonal should contain NAs.
矩阵的计数。这应该是相同的尺寸,mat。默认情况下,有没有关系。矩阵必须是对称的,并应包含对角线NA的。
参数:string
Character. The matrices are labelled with the first value of the descriptor, e.g., "NZ > Oz" "means" NZ beats Australia in rugby. Suggested alternatives include " beats " or " wins against ". The second value is used to handle ties.
字符。矩阵标记描述符的第一个值,例如,"NZ > Oz"的意思是“新西兰的橄榄球队击败澳大利亚。建议的替代品,包括" beats "或" wins against "。第二个值是用来处理关系。
参数:whitespace
Logical. If TRUE then a white space is added before and after string; it generally enhances readability. See CommonVGAMffArguments for some similar-type information.
逻辑。如果TRUE然后一个白色的空间中添加前后string,它增强了可读性。见CommonVGAMffArguments一些类似的信息。
Details
详细信息----------Details----------
In the VGAM package it is necessary for each matrix to be represented as a single row of data by brat and bratt. Hence the non-diagonal elements of the M+1 by M+1 matrix are concatenated into M(M+1) values (no ties), while if there are ties, the non-diagonal elements of the M by M matrix are concatenated into M(M-1) values.
在VGAM包,它是必要的,,每个矩阵表示为一个单列的数据brat和bratt。因此,非对角线元素的M+1M+1矩阵连接成M(M+1)值(没有关系),而如果有关系,非对角线元素的<X M矩阵连接到M值。
值----------Value----------
A matrix with 1 row and either M(M+1) or M(M-1) columns.
1行是M(M+1)或M(M-1)列的矩阵。
注意----------Note----------
This is a data preprocessing function for brat and bratt.
这是一个数据预处理功能为brat和bratt。
Yet to do: merge InverseBrat into brat.
然而,做的事:合并InverseBrat到brat。
(作者)----------Author(s)----------
T. W. Yee
参考文献----------References----------
Categorical Data Analysis, 2nd ed. New York: Wiley.
参见----------See Also----------
brat, bratt, InverseBrat.
brat,bratt,InverseBrat。
实例----------Examples----------
journal = c("Biometrika", "Comm Statist", "JASA", "JRSS-B")
mat = matrix(c( NA, 33, 320, 284, 730, NA, 813, 276,
498, 68, NA, 325, 221, 17, 142, NA), 4, 4)
dimnames(mat) = list(winner = journal, loser = journal)
Brat(mat) # Less readable[减可读]
Brat(mat, whitespace = TRUE) # More readable[更具可读性]
vglm(Brat(mat, whitespace = TRUE) ~ 1, brat, trace = TRUE)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|