agreementplot(vcd)
agreementplot()所属R语言包:vcd
Bangdiwala's Observer Agreement Chart
Bangdiwala的观察员协议图
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Representation of a k by k confusion matrix, where the observed and expected diagonal elements are represented by superposed black and white rectangles, respectively. The function also computes a statistic measuring the strength of agreement (relation of respective area sums).
一个k by k混淆矩阵,其中观察到的和预期的对角线元素为代表的叠加黑色与白色矩形,分别表示。该功能还计算的统计测量的实力协议(有关各区域款项)。
用法----------Usage----------
## Default S3 method:[默认方法]
agreementplot(x, reverse_y = TRUE, main = NULL,
weights = c(1, 1 - 1/(ncol(x) - 1)^2), margins = par("mar"),
newpage = TRUE, pop = TRUE, xlab = names(dimnames(x))[2],
ylab = names(dimnames(x))[1],
xlab_rot = 0, xlab_just = "center",
ylab_rot = 90, ylab_just = "center",
fill_col = function(j) gray((1 - (weights[j]) ^ 2) ^ 0.5),
line_col = "red", xscale = TRUE, yscale = TRUE,
...)
## S3 method for class 'formula'[类formula的方法]
agreementplot(formula, data = NULL, ..., subset)
参数----------Arguments----------
参数:x
a confusion matrix, i.e., a table with equal-sized dimensions.
混淆矩阵,也就是说,与同等大小的尺寸表。
参数:reverse_y
if TRUE, the y axis is reversed (i.e., the rectangles' positions correspond to the contingency table).
如果TRUE,y轴的扭转(即,矩形的位置对应的列联表)。
参数:main
user-specified main title.
用户指定的主标题。
参数:weights
vector of weights for successive larger observed areas, used in the agreement strength statistic, and also for the shading. The first element should be 1.
连续的较大的观察部位,中使用的协议强度统计,并且还对遮光的权重向量。第一元件应为1。
参数:margins
vector of margins (see par).
向量的利润(见par“)。
参数:newpage
logical; if TRUE, the plot is drawn on a new page.
逻辑TRUE如果,图上绘制了新的一页。
参数:pop
logical; if TRUE, all newly generated viewports are popped after plotting.
逻辑TRUE如果,所有新生成的视口被弹出后绘制。
参数:xlab, ylab
labels of x- and y-axis.
标签的x-和y-轴。
参数:xlab_rot, ylab_rot
rotation angle for the category labels.
分类标签的旋转角度。
参数:xlab_just, ylab_just
justification for the category labels.
分类标签的理由。
参数:fill_col
a function, giving the fill colors used for exact and partial agreement
一个功能,准确和部分协议用于填充颜色
参数:line_col
color used for the diagonal reference line
对角线的基准线用于颜色
参数:formula
a formula, such as y ~ x. For details, see xtabs.
一个公式,如y ~ x。有关详细信息,请参阅xtabs。
参数:data
a data frame (or list), or a contingency table from which the variables in formula should be taken.
一个数据框(或列表),或表中的变量formula应采取的应变。
参数:subset
an optional vector specifying a subset of the rows in the data frame to be used for plotting.
指定数据框中的一个子集的行的一个可选的矢量被用于进行绘图。
参数:xscale, yscale
logicals indicating whether the marginals should be added on the x-axis/y-axis, respectively.
逻辑值指示的勉强应否上x-axis/y-axis添加,分别。
参数:...
further graphics parameters (see par).
进一步的图形参数(见par“)。
Details
详细信息----------Details----------
Weights can be specified to allow for partial agreement, taking into account contributions from off-diagonal cells. A weight vector of length 1 means strict agreement only, each additional element increases the maximum number of disagreement steps.
权重可以指定允许部分协议,同时考虑到捐款的非对角(off-diagonal)单元。权重向量的长度为1,意味着严格的协议,每增加一个元素只增加了最大数量的分歧步骤。
值----------Value----------
Invisibly returned, a list with components
不可见的返回,与组件的列表
参数:Bangdiwala
the unweighted agreement strength statistic.
未加权的协议强度的统计数据。
参数:Bangdiwala_Weighted
the weighted statistic.
加权统计。
参数:weights
the weight vector used.
所使用的权重向量。
(作者)----------Author(s)----------
David Meyer <a href="mailtoavid.Meyer@R-project.org">David.Meyer@R-project.org</a>
参考文献----------References----------
Visualizing Categorical Data. SAS Institute, Cary, NC.
实例----------Examples----------
data("SexualFun")
agreementplot(t(SexualFun))
data("MSPatients")
## best visualized using a resized device, e.g. using:[#最好的可视化调整大小的装置,例如使用:]
## get(getOption("device"))(width = 12)[#(getOption(“设备”))(宽度= 12)]
pushViewport(viewport(layout = grid.layout(ncol = 2)))
pushViewport(viewport(layout.pos.col = 1))
agreementplot(t(MSPatients[,,1]), main = "Winnipeg Patients",
newpage = FALSE)
popViewport()
pushViewport(viewport(layout.pos.col = 2))
agreementplot(t(MSPatients[,,2]), main = "New Orleans Patients",
newpage = FALSE)
popViewport(2)
dev.off()
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|