找回密码
 注册
查看: 460|回复: 0

R语言 vcd包 fourfold()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-10-1 14:47:37 | 显示全部楼层 |阅读模式
fourfold(vcd)
fourfold()所属R语言包:vcd

                                        Fourfold Plots
                                         四重绘图

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

Creates an (extended) fourfold display of a 2 x 2 x k contingency table, allowing for the visual inspection of the association between two dichotomous variables in one or several populations (strata).
创建一个2 x 2 x k应急表(扩展)显示的4倍,允许目视检查两个二分变量中的一个或几个群体(阶层)之间的关联。


用法----------Usage----------


fourfold(x,
  color = c("#99CCFF", "#6699CC", "#FFA0A0", "#A0A0FF", "#FF0000", "#000080"),
  conf_level = 0.95, std = c("margins", "ind.max", "all.max"),
  margin = c(1, 2), space = 0.2, main = NULL, sub = NULL,
  mfrow = NULL, mfcol = NULL, extended = TRUE, ticks = 0.15,
  p_adjust_method = p.adjust.methods, newpage = TRUE,
  fontsize = 12)



参数----------Arguments----------

参数:x
a 2 x 2 x k contingency table in array form, or a 2 x 2 matrix if k is 1.  If length(dim(x)>3,  dimensions 3:length(dim(x) are silently raveled into a combined strata dimension with k=prod(dim(x)[-(1:2)])).  
一个2 x 2 x k应急表中数组的形式,或2 x 2矩阵k是1。如果length(dim(x)>3,尺寸3:length(dim(x)都默默raveled的合并阶层维度k=prod(dim(x)[-(1:2)]))。


参数:color
a vector of length 6 specifying the colors to use for the smaller and larger diagonals of each 2 x 2 table. The first pair is used for the standard (non-extended) plots, the other two for the extended version: the second/third pair is used for tables with non-significant/significant log-odds ratios, respectively, the latter being visualized in brighter colors.
长度为6的一个矢量,指定要使用的颜色为更小和更大的对角线的每个2 x 2表。第一对是使用标准(非扩展)图,其他两个为扩展版本:第二/第三对用于表non-significant/significant数的比值比分别,后者是可视化明亮的色彩。


参数:conf_level
confidence level used for the confidence rings on the odds ratios.  Must be a single non-negative number less than 1; if set to 0, confidence rings are suppressed.
置信水平的信心环的比值比。必须是单一的非负值数目小于1,如果设置为0,有信心环被抑制。


参数:std
a character string specifying how to standardize the table. Must be one of "margins", "ind.max", or "all.max", and can be abbreviated by the initial letter. If set to "margins", each 2 x 2 table is standardized to equate the margins specified by margin while preserving the odds ratio.  If "ind.max" or "all.max", the tables are either individually or simultaneously standardized to a maximal cell frequency of 1.
一个字符串指定如何规范表。必须是"margins","ind.max"或"all.max",并可以缩写的首字母。如果设置为"margins"中,每个2 x 2表是标准化等同于利润,同时保留指定的margin的比值比。如果"ind.max"或"all.max",表是单独或同时标准化的最大单元频率为1。


参数:margin
a numeric vector with the margins to equate.  Must be one of 1, 2, or c(1, 2) (the default), which corresponds to standardizing only the row, only column, or both row and column in each 2 x 2 table. Only used if std equals "margins".
一个数字矢量的边缘等同于。必须有一个1,2或c(1, 2)(默认值),对应的规范行,唯一的列,或行和列中的每一个2 x 2表。仅用于如果std等于"margins"。


参数:space
the amount of space (as a fraction of the maximal radius of the quarter circles) used for the row and column labels.
的空间量(作为最大半径的四分之一圆的一小部分),用于行和列标签。


参数:main, sub
character string for the fourfold plot title/subtitle.
四重图的标题/字幕的字符的字符串。


参数:mfrow, mfcol
a numeric vector with two components: <VAR>nr</VAR> and <VAR>nc</VAR>, indicating that the displays for the 2 x 2 tables should be arranged in an <VAR>nr</VAR> by <VAR>nc</VAR> layout, filled by rows/columns. The defaults are calculated to give a collection of plots in landscape orientation when <VAR>k</VAR> is not a perfect square.
一个数字矢量两部分组成:<VAR> NR </ VAR>和对应的NC </ VAR>,显示的显示器2 x 2表应安排在<VAR> NR </ VAR> <VAR> NC </ VAR布局,填充的行/列。的默认值,计算出的一系列图形横向<VAR> K表</ VAR>是不是一个完美的正方形。


参数:extended
logical; if TRUE, extended plots are plotted, i.e., colors are brighter for significant log-odds ratios, and ticks are plotted showing the direction of association for positive log-odds.
逻辑TRUE如果,扩展的图形绘制,即,颜色是亮显着的log胜算比,和扁虱绘制关联方向为正数赔率。


参数:ticks
the length of the ticks. If set to 0, no ticks are plotted.
刻度线的长度。如果设置为0,没有绘制刻度线。


参数:p_adjust_method
method to be used for p-value adjustments for multi-stratum plots, as provided by link[stats]{p.adjust}. Use p_adjust_method="none" to disable this adjustment. The p-values are used for the "visual" significance tests of the odds ratios.
方法被用于p-值调整为多阶层图,所提供link[stats]{p.adjust}。使用p_adjust_method="none"来禁用此调整。用于“视觉显着性检验的胜算比P值。


参数:newpage
logical; if TRUE, grid.newpage() is called before plotting.
合乎逻辑;如果TRUE,grid.newpage()之前调用绘制。


参数:fontsize
fontsize of main title.  Other labels are scaled relative to this.
字号的主标题。其他标签缩放相对于此。


Details

详细信息----------Details----------

The fourfold display is designed for the display of 2 x 2 x k tables.
的四倍,显示是专为2 x 2 x k表的显示。

Following suitable standardization, the cell frequencies f[i,j] of each 2 x 2 table are shown as a quarter circle whose radius is proportional to sqrt(f[i,j]) so that its area is proportional to the cell frequency.  An association (odds ratio different from 1) between the binary row and column variables is indicated by the tendency of diagonally opposite cells in one direction to differ in size from those in the other direction; color is used to show this direction.  Confidence rings for the odds ratio allow a visual test of the null of no association; the rings for adjacent quadrants overlap iff the observed counts are consistent with the null hypothesis.
经过适当的标准化,单元频率f[i,j]每个2 x 2表示为四分之一圆,其半径成正比sqrt(f[i,j]),使得它的面积的小区的频率成比例。关联(比值比不同的从1)之间的二进制的行和列变量表示在一个方向上由对角线相对单元的倾向从那些在其他方向上的大小不同;颜色被用来显示这个方向。置信环的比值比让一个可视化的测试没有任何关联,则返回null;,相邻象限重叠的环,当且仅当所观察到的数量是一致的零假设。

Typically, the number k corresponds to the number of levels of a stratifying variable, and it is of interest to see whether the association is homogeneous across strata.  The fourfold display visualizes the pattern of association.  Note that the confidence rings for the individual odds ratios are not adjusted for multiple testing.
通常情况下,数字k对应的分层变量的数目的级别,这是利益看到关联是否是均匀的跨阶层。协会的四倍,显示可视化的模式。需要注意的是为个人的几率比不调整的信心环的多个测试。


参考文献----------References----------

A fourfold display for 2 by 2 by <code>k</code> tables. Technical Report 217, York University, Psychology Department, http://datavis.ca/papers/4fold/4fold.pdf.
Visualizing Categorical Data. SAS Institute, Cary, NC.

参见----------See Also----------

mosaic, assoc
mosaic,assoc

link[stats]{p.adjust} for methods of p value adjustment
link[stats]{p.adjust}p值调整的方法


实例----------Examples----------


data("UCBAdmissions")
## Use the Berkeley admission data as in Friendly (1995).[#使用大学伯克利分校录取数据活动(1995年)。]
x <- aperm(UCBAdmissions, c(2, 1, 3))
dimnames(x)[[2]] <- c("Yes", "No")
names(dimnames(x)) <- c("Sex", "Admit?", "Department")
ftable(x)

## Fourfold display of data aggregated over departments, with[#四格显示的数据汇总以上各部门,]
## frequencies standardized to equate the margins for admission[频率标准化等同于利润入学]
## and sex.[#和性别。]
## Figure 1 in Friendly (1994).[#图1中的(1994)。]
fourfold(margin.table(x, c(1, 2)))

## Fourfold display of x, with frequencies in each table[#四重显示的x,在每个表中的频率]
## standardized to equate the margins for admission and sex.[#标准化等同于入学和性别的利润。]
## Figure 2 in Friendly (1994).[图2中的(1994)。]
fourfold(x)
cotabplot(x, panel = cotab_fourfold)

## Fourfold display of x, with frequencies in each table[#四重显示的x,在每个表中的频率]
## standardized to equate the margins for admission. but not[#标准化等同于入学的利润。但不]
## for sex.[#性。]
## Figure 3 in Friendly (1994).[图3中的(1994)。]
fourfold(x, margin = 2)

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2024-11-27 10:42 , Processed in 0.022943 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表