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

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

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

                                        Extended Sieve Plots
                                         扩展筛图

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

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

(Extended) sieve displays for n-way contingency tables: plots rectangles with areas proportional to the expected cell frequencies and filled with a number of squares equal to the observed frequencies.  Thus, the densities visualize the deviations of the observed from the expected values.
(扩展的)筛n路应变表显示:图用区域的矩形预期的小区频率成正比,并填充与数量等于所观察到的频率的平方。因此,密度可视化所观察到的从预期值的偏差。


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


## Default S3 method:[默认方法]
sieve(x, condvars = NULL, gp = NULL, shade = NULL,
  legend = FALSE, split_vertical = NULL, direction = NULL, spacing = NULL,
  spacing_args = list(), sievetype = c("observed","expected"),
  gp_tile = gpar(), main = NULL, sub = NULL, ...)
## S3 method for class 'formula'[类formula的方法]
sieve(formula, data, ..., main = NULL, sub = NULL, subset = NULL)



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

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


参数:condvars
vector of integers or character strings indicating conditioning variables, if any. The table will be permuted to order them first.
向量的整数或字符串显示调节变量,如果有的话。该表将被排列第一对它们进行排序。


参数:formula
a formula specifying the variables used to create a  contingency table from data.  For convenience, conditioning formulas can be specified; the conditioning variables will then be used first for splitting.  Formulas for sieve displays (unlike those for doubledecker plots) have no response variable.
公式指定使用的变量,创建一个列联表data。为方便起见,可以指定空调的公式将被用于第一个分裂的调节变量。筛显示(不像那些doubledecker图)的公式都没有反应变量。


参数:data
either a data frame, or an object of class "table" or "ftable".
一个数据框,或对象类"table"或"ftable"的。


参数:subset
an optional vector specifying a subset of observations to be used.
一个可选的向量指定要使用的观测值的一个子集。


参数:shade
logical specifying whether gp should be used or not (see gp). If TRUE and expected is unspecified, a default model is fitted: if condvars is specified, a corresponding conditional independence model, and else the total independence model. If shade is NULL (default), gp is used if specified.
逻辑指定是否gp应使用或没有(见gp)。如果TRUE和expected是不确定的,一个默认的模型安装:如果condvars指定相应的条件独立的模型,和其他的完全独立的模型。如果shadeNULL(默认),gp如果。


参数:sievetype
logical indicating whether rectangles should be filled according to observed or expected frequencies.
逻辑表明是否矩形应填写根据observed或expected频率。


参数:gp
object of class "gpar", shading function or a corresponding generating function (see details of strucplot and shadings). Components of "gpar" objects are recycled as needed along the last splitting dimension. The default is a modified version of shading_Friendly: if sievetype is "observed", cells with positive residuals are painted with a red sieve, and cells with negative residuals with a blue one. If sievetype is "expected", the sieves' color is gray. Ignored if shade = FALSE.
对象的类"gpar",遮光功能或相应产生功能(见细节strucplot和shadings)。的组成部分"gpar"对象被回收作为需要沿着最后的分割尺寸。默认值是修改后的版本shading_Friendly如果sievetype"observed",积极残差单元,绘有一个红色的筛子,单元与一个蓝色的负残差。 sievetype如果是"expected",筛子的颜色是灰色的。如果忽略shade = FALSE。


参数:gp_tile
object of class "gpar", controlling the appearance of all static elements of the cells (e.g., border and fill color).
类的对象"gpar",控制所有静态元素的单元(例如,边框和填充颜色)的外观。


参数:legend
either a legend-generating function, a legend function (see details of strucplot and legends), or a logical value. If legend is NULL or TRUE and gp is a function, legend defaults to legend_resbased.
无论是传说的功能,传说中的功能(详见strucplot和legends),或逻辑值。 legend如果是NULL或TRUE和gp是一个函数,传说默认为legend_resbased。


参数:split_vertical
vector of logicals of length k, where k is the number of margins of x (default: FALSE). Values are recycled as needed.  A TRUE component indicates that the tile(s) of the corresponding dimension should be split vertically, FALSE means horizontal splits. Ignored if direction is not NULL.
向量,逻辑值的长度k,其中k的利润是多少x(默认:FALSE)。价值被回收作为需要。 ATRUE组件的相应尺寸的瓷砖(S)应垂直分割,:FALSE是指水平分割。如果direction非NULL忽略。


参数:direction
character vector of length k, where k is the number of margins of x (values are recycled as needed). For each component, a value of "h" indicates that the tile(s) of the corresponding dimension should be split horizontally, whereas "v" indicates vertical split(s).
字符向量的长度k,k的利润是多少x(值被回收如需要)。对于每个组件,值"h"表明瓷砖(s)的对应的维度应水平分割,而"v"表示垂直分割()。


参数:spacing
spacing object, spacing function, or corresponding generating function (see strucplot for more information). The default is no spacing at all if x has two dimensions, and  spacing_increase for more dimensions.
间隔对象,间距功能,或相应的生成函数(见strucplot的详细信息)。默认情况下是没有空格,如果在所有x有两个维度,spacing_increase更多的维度。


参数:spacing_args
list of arguments for the generating function, if specified (see strucplot for more information).
生成函数的参数列表,如果指定的话(见strucplot的详细信息)。


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


参数:...
Other arguments passed to strucplot
其他参数传递给strucplot


Details

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

sieve is a generic function which currently has a default method and a formula interface.  Both are high-level interfaces to the strucplot function, and produce (extended) sieve displays.  Most of the functionality is described there, such as specification of the independence model, labeling, legend, spacing, shading, and other graphical parameters.
sieve是一个通用的功能,目前有一个默认的方法和公式接口。这两个,strucplot功能是高层次的接口,并产生(扩展)筛显示。大部分的功能描述,如规范的独立模式,标签,传说,间距,阴影,和其他图形参数。

The layout is very flexible: the specification of shading, labeling, spacing, and legend is modularized (see strucplot for details).
布局是非常灵活的阴影,标签,间距,和传说中的规格是模块化的(见strucplot)。


值----------Value----------

The "structable" visualized is returned invisibly.
"structable"返回的可视化是不可见的。


注意----------Note----------

To be faithful to the original definition by Riedwyl & Sch眉pbach,
为了忠实的原始定义由Riedwyl和Schüpbach的是,


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



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




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

Parquet diagram to plot contingency tables. In F. Faulbaum (ed.), Softstat '93: Advances in Statistical Software, 293&ndash;299. Gustav Fischer, New York.
Visualizing Categorical Data, SAS Institute, Cary, NC.
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----------

assoc, strucplot, mosaic, structable, doubledecker
assoc,strucplot,mosaic,structable,doubledecker


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


data("HairEyeColor")

## aggregate over 'sex':[#合共超过“性”:]
(tab <- margin.table(HairEyeColor, c(2,1)))

## plot expected values:[#图预计价值观:]
sieve(tab, sievetype = "expected", shade = TRUE)

## plot observed table:[#图观察表:]
sieve(tab, shade = TRUE)

## plot complete diagram:[#图完成图:]
sieve(HairEyeColor, shade = TRUE)

## an example for the formula interface:[#公式界面的一个例子:]
data("VisualAcuity")
sieve(Freq ~ right + left,  data = VisualAcuity)

## example with observed values in the cells:[#例如,在单元的观测值:]
sieve(Titanic, pop = FALSE, shade = TRUE)
labeling_cells(text = Titanic, gp_text = gpar(fontface = 2))(Titanic)

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


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

使用道具 举报

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

本版积分规则

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

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

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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