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

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

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

                                        Pairs Plot for Contingency Tables
                                         对图的列联表

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

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

Produces a matrix of strucplot displays.
产生一个矩阵strucplot显示。


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


## S3 method for class 'table'
pairs(x, upper_panel = pairs_mosaic, upper_panel_args = list(),
  lower_panel = pairs_mosaic, lower_panel_args = list(),
  diag_panel = pairs_barplot, diag_panel_args = list(),
  main = NULL, sub = NULL, main_gp = gpar(fontsize = 20),
  sub_gp = gpar(fontsize = 15), space = 0.3,
  newpage = TRUE, pop = TRUE, margins = unit(1, "lines"), ...)



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

参数:x
a contingency table in array form, with optional category labels specified in the dimnames(x) attribute.
联表数组的形式,dimnames(x)属性中指定的可选的分类标签。


参数:upper_panel
function for the upper triangle of the matrix, or corresponding generating function. If NULL, no panel is drawn.
上三角矩阵,或相应的生成函数的函数。如果NULL,没有绘制面板。


参数:upper_panel_args
list of arguments for the generating function, if specified.
生成函数的参数列表,如果指定的话。


参数:lower_panel
function for the lower triangle of the matrix, or corresponding generating function. If NULL, no panel is drawn.
的下三角矩阵,或相应的生成函数的函数。如果NULL,没有绘制面板。


参数:lower_panel_args
list of arguments for the panel-generating function, if specified.
的面板生成函数的参数列表,如果指定的话。


参数:diag_panel
function for the diagonal of the matrix, or corresponding generating function. If NULL, no panel is drawn.
的对角线的矩阵,或相应的生成函数的函数。如果NULL,没有绘制面板。


参数:diag_panel_args
list of arguments for the generating function, if specified.
生成函数的参数列表,如果指定的话。


参数:main
either a logical, or a character string used for plotting the main title.  If main is a logical and TRUE, the name of the object supplied as x is used.
无论是一个逻辑,或字符串,用于绘制的主标题。如果main是一个逻辑和TRUE,x提供的对象的名称使用。


参数:sub
a character string used for plotting the subtitle. If sub is a logical and TRUE and main is unspecified, the name of the object supplied as x is used.
一个字符串用于绘制的字幕。如果sub是逻辑和TRUE的和main是不确定的,x使用提供的对象的名称。


参数:main_gp, sub_gp
object of class "gpar" containing the graphical parameters used for the main (sub) title, if specified.
类的对象"gpar"包含的图形参数,如果指定用于主(分)标题。


参数:space
double specifying the distance between the cells.
双指定的单元之间的距离。


参数:newpage
logical controlling whether a new grid page should be created.
逻辑控制是否应该创建一个新的网格页。


参数:pop
logical indicating whether all viewports should be popped after the plot has been drawn.
逻辑表明所有视是否应被弹出后的图已经绘就。


参数:margins
either an object of class "unit" of length 4, or a numeric vector of length 4. The elements are recycled as needed. The four components specify the top, right, bottom, and left margin of the plot, respectively. When a numeric vector is supplied, the numbers are interpreted as "lines" units.  In addition, the unit or numeric vector may have named arguments (top, right, bottom, and left), in which case the non-named arguments specify the default values (recycled as needed), overloaded by the named arguments.
无论是类的一个对象"unit"长度为4,或一个数值向量的长度为4。被回收作为需要的元素。的四个组成部分指定的顶部,右,底部,和左边缘的图。当一个数值向量被提供时,被解释为数字"lines"单位。此外,已命名的单位或数字矢量参数(top,right,bottom和left),在这种情况下,非参数指定默认值超载的命名参数的值(如需要回收),。


参数:...
For convenience, list of arguments for the panel-generating functions of upper and lower panels, if specified.
为方便起见,为上部和下部面板的面板产生功能的参数列表,如果指定。


Details

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

This is a pairs method for objects inheriting from class "table" or "structable". It plots a matrix of pairwise mosaic plots.
这是一个pairs对象继承从类"table"或"structable"的方法。图的矩阵成对镶嵌图。

Four independence types are distinguished: "pairwise", "total", "conditional" and "joint". The pairwise mosaic matrix shows bivariate marginal relations, collapsed over all other variables. The total independence mosaic matrix shows mosaic plots for mutual independence, i.e., for marginal and conditional independence among all pairs of variables. The conditional independence mosaic matrix shows mosaic plots for marginal independence given all other variables. The joint independence mosaic matrix shows mosaic plots for joint independence of all pairs of variables from the others.
4个独立类型的区别在于:"pairwise","total","conditional"和"joint"。成对马赛克矩阵的二元边际的关系,崩溃了所有其他的变量。的完全独立马赛克矩阵镶嵌图显示为相互独立的,即所有变量对边际和条件之间的独立性。的条件独立马赛克矩阵显示给所有其他变量的边际独立的马赛克图。联合独立马赛克矩阵联合所有其他变量对独立的马赛克图。

This method uses panel functions called for each cell of the matrix which can be different for upper matrix, lower matrix, and diagonal cells.  Correspondingly, for each panel parameter <VAR>foo</VAR> (= upper, lower, or diag), pairs.table takes two arguments: <VAR>foo\_panel</VAR> and <VAR>foo\_panel\_args</VAR>, which can be used to specify the parameters as follows:
这方法使用面板调用的函数的每个单元格的矩阵,可以是不同的上部的矩阵,低级的矩阵,和对角线单元。与此相对应,每个面板参数<VAR>富</ VAR>(=upper,lower或diag)pairs.table需要两个参数:<VAR>富\ _panel </ VAR>和<VAR>富\ _panel \ _args </ VAR>,可用于指定参数如下:

Passing a suitable panel function to <VAR>foo\_panel</VAR> which subsequently is called for each cell with the corresponding coordinates.
传递一个合适的面板的功能,<VAR>富的\ _panel </ VAR>后来被称为每个单元格与相应的坐标。

Passing a corresponding generating function (of class "panel_generator") to <VAR>foo\_panel</VAR>, along with parameters passed to <VAR>foo\_panel\_args</VAR>, that generates such a function.
通过相应的生成函数(类"panel_generator")到<VAR>富\ _panel </ VAR>,以及参数传递给foo的\ _panel \ _args <VAR> </ VAR>,会产生这样的功能。

Hence, the second approach is equivalent to the first if <VAR>foo\_panel(foo\_panel\_args)</VAR> is passed to <VAR>foo\_panel</VAR>.
因此,第二种方法是等同于第一个,如果<VAR>富\ _panel(FOO \ _panel \ _args)</ VAR>的传递到<VAR>富\ _panel </ VAR>。


(作者)----------Author(s)----------



David Meyer <a href="mailtoavid.Meyer@R-project.org">David.Meyer@R-project.org</a>




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

On the graphical display of the significant components in a two-way contingency table. Communications in Statistics&mdash;Theory and Methods, A9, 1025&ndash;1041.
Graphical methods for categorical data. SAS User Group International Conference Proceedings, 17, 190&ndash;200. http://datavis.ca/sugi/sugi17.pdf
The strucplot framework: Visualizing multi-way contingency tables with <code>vcd</code>. Journal of Statistical Software, 17(3), 1-48. URL http://www.jstatsoft.org/v17/i03/ and available as  <code>vignette("strucplot")</code>.

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

pairs_mosaic, pairs_assoc, pairs_sieve, pairs_diagonal_text, pairs_text, pairs_barplot, assoc, sieve, mosaic
pairs_mosaic,pairs_assoc,pairs_sieve,pairs_diagonal_text,pairs_text,pairs_barplot,assoc,sieve,mosaic


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


data("UCBAdmissions")
data("reSex")
data(HairEyeColor)
hec = structable(Eye ~ Sex + Hair, data = HairEyeColor)

pairs(PreSex)
pairs(UCBAdmissions)
pairs(UCBAdmissions, upper_panel_args = list(shade = TRUE))
pairs(UCBAdmissions, lower_panel = pairs_mosaic(type = "conditional"))
pairs(UCBAdmissions, diag_panel = pairs_text)
pairs(UCBAdmissions, upper_panel = pairs_assoc, shade = TRUE)
pairs(hec, highlighting = 2, diag_panel_args = list(fill = grey.colors))
pairs(hec, highlighting = 2, diag_panel = pairs_diagonal_mosaic,
           diag_panel_args = list(fill = grey.colors, alternate_labels =TRUE))


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


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

使用道具 举报

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

本版积分规则

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

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

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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