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

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

[复制链接]
发表于 2012-10-1 16:04:48 | 显示全部楼层 |阅读模式
aggr(VIM)
aggr()所属R语言包:VIM

                                        Aggregations for missing/imputed values
                                         聚合丢失/估算值

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

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

Calculate or plot the amount of missing/imputed values in each variable and the amount of missing/imputed values in certain combinations of variables.
计算或绘制的量在每个变量的缺失/插补值和量的丢失/插补值在某些组合中的变量。


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


aggr(x, delimiter = NULL, plot = TRUE, ...)

## S3 method for class 'aggr'
plot(x, col = c("skyblue","red","orange"), bars = TRUE,
    numbers = FALSE, prop = TRUE, combined = FALSE, varheight = FALSE,
    only.miss = FALSE, border = par("fg"), sortVars = FALSE,
    sortCombs = TRUE, ylabs = NULL, axes = TRUE, labels = axes,
    cex.lab = 1.2, cex.axis = par("cex"), cex.numbers = par("cex"),
    gap = 4, ...)

TKRaggr(x, ..., delimiter = NULL, hscale = NULL, vscale = NULL,
    TKRpar = list())



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

参数:x
a vector, matrix or data.frame.
一个向量,矩阵或data.frame。


参数:delimiter
a character-vector to distinguish between variables and imputation-indices for imputed variables (therefore, x needs to have colnames). If given, it is used to determine the corresponding imputation-index for any imputed variable (a logical-vector indicating which values of the variable have been imputed). If such imputation-indices are found, they are used for highlighting and the colors are adjusted  according to the given colors for imputed variables (see col).
一个特征向量来区分变量和插补指数估算的变量(因此,x需要有colnames)。如果给出,它被用来确定相应的插补索引的任何估算的变量(一个逻辑矢量指示变量的值已被插补)。如果这样的归集指数被发现,它们用于高亮和颜色的调整,根据给定的颜色估算变量(见col“)。


参数:plot
a logical indicating whether the results should be plotted  (the default is TRUE).
逻辑的结果是否应绘制(默认为TRUE)。


参数:col
a vector of length three giving the colors to be used for  observed, missing and imputed data. If only one color is supplied, it is  used for missing and imputed data and observed data is transparent. If  only two colors are supplied, the first one is used for observed data and the second color is used for missing and imputed data.
一个长度为3的向量提供的颜色被用于观察,缺少和估算的数据。如果只有一种颜色被提供时,它是用于丢失和插补数据的和观察到的数据是透明的。如果只有两种颜色被提供,用于观测到的数据的第一个和第二颜色被用于丢失和估算的数据。


参数:bars
a logical indicating whether a small barplot for the  frequencies of the different combinations should be drawn.
一个逻辑指示一个小的频率的不同组合barplot是否应绘制。


参数:numbers
a logical indicating whether the proportion or frequencies  of the different combinations should be represented by numbers.
一个逻辑指示是否应该表示的数字的不同组合的比例或频率。


参数:prop
a logical indicating whether the proportion of missing/imputed values  and combinations should be used rather than the total amount.
逻辑是否应该使用,而不是总金额的比例丢失/估算值和组合。


参数:combined
a logical indicating whether the two plots should be  combined.  If FALSE, a separate barplot on the left hand side shows  the amount of missing/imputed values in each variable.  If TRUE, a small  version of this barplot is drawn on top of the plot for the combinations of  missing/imputed and non-missing values.  See “Details” for more information.
逻辑指示是否应结合两图。如果FALSE,一个单独的barplot左手侧上显示了每个变量的量丢失/插补值。如果TRUE,一个小版本本barplot的画的图/估算和非缺失值的组合上。有关更多信息,请参阅“详细信息”。


参数:varheight
a logical indicating whether the cell heights are given by  the frequencies of occurrence of the corresponding combinations.
一个逻辑指示是否相应的组合的频率发生的单元格的高度由下式给出。


参数:only.miss
a logical indicating whether the small barplot for the  frequencies of the combinations should only be drawn for combinations  including missing/imputed values (if bars is TRUE).  This is useful  if most observations are complete, in which case the corresponding bar would  dominate the barplot such that the remaining bars are too compressed.  The  proportion or frequency of complete observations (as determined by  prop) is then represented by a number instead of a bar.
小barplot组合的频率是否只应画的组合,包括丢失/估算值(如果逻辑bars是TRUE)。这是非常有用的,如果大多数意见是完整的,在这种情况下,相应的条码将控制barplot的,其余的条形过分压缩。的比例或完整的观测频率(由prop)来表示的,而不是一个条形。


参数:border
the color to be used for the border of the bars and  rectangles.  Use border=NA to omit borders.
的要使用的颜色的边界的条形和矩形的。使用border=NA忽略边界。


参数:sortVars
a logical indicating whether the variables should be  sorted by the number of missing/imputed values.
一个逻辑变量是否应该由数量的丢失/估算值进行排序。


参数:sortCombs
a logical indicating whether the combinations should be  sorted by the frequency of occurrence.
一个逻辑指示是否应该被排序的发生频度的组合。


参数:ylabs
if combined is TRUE, a character string giving the  y-axis label of the combined plot, otherwise a character vector of  length two giving the y-axis labels for the two plots.
combined如果是TRUE,合并后的图y轴的标签的字符串,否则字符向量的长度为二的两个图y轴的标签。


参数:axes
a logical indicating whether axes should be drawn.
逻辑指示是否应制定轴。


参数:labels
either a logical indicating whether labels should be  plotted on the x-axis, or a character vector giving the labels.
无论是一个逻辑指示是否标签应被绘制在x轴,或一个字符矢量赋予标签。


参数:cex.lab
the character expansion factor to be used for the axis labels.
字符膨胀系数要用于轴标签。


参数:cex.axis
the character expansion factor to be used for the axis  annotation.
字符膨胀系数要用于的轴线注解。


参数:cex.numbers
the character expansion factor to be used for the  proportion or frequencies of the different combinations
要用于不同组合的比例或频率的字符的扩展系数


参数:gap
if combined is FALSE, a numeric value giving the  distance between the two plots in margin lines.
如果combined是FALSE,一个数值,两个图的边界线之间的距离。


参数:...
for aggr and TKRaggr, further arguments and  graphical parameters to be passed to plot.aggr.  For  plot.aggr, further graphical parameters to be passed down.   par("oma") will be set appropriately unless supplied (see  par).
的aggr和TKRaggr,进一步的论据和图形参数被传递给plot.aggr。对于plot.aggr,进一步向下传递的图形参数。 par("oma")将设置适当的,除非提供(见par)。


参数:hscale
horizontal scale factor for plot to be embedded in a  Tcl/Tk window (see "Details").  The default value  depends on the number of variables.
被嵌入的Tcl / Tk的窗口(见“详细信息”)的地积比例因子水平。默认值取决于变量的数目。


参数:vscale
vertical scale factor for the plot to be embedded in a  Tcl/Tk window (see "Details").  The default value  depends on the number of combinations.
垂直比例因子的图,被嵌入的Tcl / Tk的窗口(见“详细信息”)。默认值取决于组合的数量。


参数:TKRpar
a list of graphical parameters to be set for the plot  to be embedded in a Tcl/Tk window (see "Details" and  par).
图形参数设置的列表的图,被嵌入的Tcl / Tk的窗口(见“详细信息和par”)。


Details

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

Often it is of interest how many missing/imputed values are contained in each  variable.  Even more interesting, there may be certain combinations of  variables with a high number of missing/imputed values.
通常情况下,它是如何丢失/估算值包含在每个变量。更有趣的是,可能有大量的丢失/估算值与变量的某些组合。

If combined is FALSE, two separate plots are drawn for the  missing/imputed values in each variable and the combinations of missing/imputed and  non-missing values. The barplot on the left hand side shows the amount of  missing/imputed values in each variable.  In the aggregation plot on the right  hand side, all existing combinations of missing/imputed and non-missing values in  the observations are visualized.  Available, missing and imputed data are color coded as given by col.  Additionally, there are two possibilities to  represent the frequencies of occurrence of the different combinations.  The  first option is to visualize the proportions or frequencies by a small bar  plot and/or numbers.  The second option is to let the cell heights be given  by the frequencies of the corresponding combinations. Furthermore, variables  may be sorted by the number of missing/imputed values and combinations by the  frequency of occurrence to give more power to finding the structure of  missing/imputed values.
如果combined是FALSE,两个独立的图形绘制估算每个变量中的值丢失/ /估算和非缺失值的组合。在左手侧的barplot量的丢失/估算值在每个变量。在汇聚图右手边的丢失/估算的和不可缺失的观测值的组合,所有现有的可视化。 ,丢失和估算的数据进行颜色编码所给出的col。此外,有两种可能性来表示的频率的不同的组合的发生。第一个选项是由一个小条形的图和/或数字可视化的比例或频率。第二个选择是让单元格的高度给予相应的组合的频率。此外,变量的数量缺少/估算值和组合发生的频率给更多的权力来寻找失踪/估算值的结构进行排序。

If combined is TRUE, a small version of the barplot showing  the amount of missing/imputed values in each variable is drawn on top of the  aggregation plot.
如果combined是TRUE,一个小版本的barplot量的丢失/估算每个变量中的值绘制的聚集图。

The graphical parameter oma will be set unless supplied as an  argument.
图形参数oma设置,除非作为参数提供。

TKRaggr behaves like plot.aggr, but uses  tkrplot to embed the plot in a Tcl/Tk  window.  This is useful if the number of variables and/or combinations  is large, because scrollbars allow to move from one part of the plot  to another.
TKRaggr的行为就像plot.aggr,但使用tkrplot的Tcl / Tk的窗口嵌入的图。这是非常有用的,如果变量和/或组合的数量非常大,因为滚动条允许的图从一个移动到另一个。


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

for aggr, a list of class "aggr" containing the following  components:
aggr,类"aggr"包含以下组件的列表:


参数:x
the data used.
所使用的数据。


参数:combinations
a character vector representing the combinations of  variables.
一个字符向量,代表变量的组合。


参数:count
the frequencies of these combinations.
这些组合中的频率。


参数:percent
the percentage of these combinations.
这些组合中的百分比。


参数:missings
a data.frame containing the amount of missing/imputed values  in each variable.
一个data.frame含有量的丢失/估算值,每个变量。


参数:tabcomb
the indicator matrix for the combinations of variables.
矩阵的变量的组合的指示器。


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

Some of the argument names and positions have changed with version 1.3  due to extended functionality and for more consistency with other plot  functions in VIM.  For back compatibility, the arguments  labs and names.arg can still be supplied to ...  and are handled correctly.  Nevertheless, they are deprecated and no  longer documented.  Use ylabs and labels instead.
由于扩展功能的1.3版本和更高的一致性与其他绘图功能VIM的参数名称和位置发生了变化。回兼容性,参数labs和names.arg仍然可以提供给...和正确处理。不过,他们已被弃用,不再记录。使用ylabs和labels。


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


Andreas Alfons, Matthias Templ, modifications for displaying imputed values by Bernd Prantner



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

Exploring incomplete data using visualization tools.  Journal of Advances in Data Analysis and Classification, Online first. DOI: 10.1007/s11634-011-0102-y.  

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

print.aggr, summary.aggr
print.aggr,summary.aggr


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


data(sleep, package="VIM")
## for missing values[#遗漏值]
a <- aggr(sleep)
a
summary(a)

## for imputed values[#估算值]
sleep_IMPUTED <- kNN(sleep)
a <- aggr(sleep_IMPUTED, delimiter="_imp")
a
summary(a)

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-26 09:42 , Processed in 0.027564 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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