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

R语言 simFrame包 NAControl-class()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-30 02:42:07 | 显示全部楼层 |阅读模式
NAControl-class(simFrame)
NAControl-class()所属R语言包:simFrame

                                        Class "NAControl"
                                         类“NAControl”

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

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

Class for controlling the insertion of missing values in a simulation  experiment.
一类控制插入缺失值在模拟实验。


类对象----------Objects from the Class----------

Objects can be created by calls of the form new("NAControl", ...) or  NAControl(...).
可以创建对象通过调用的形式new("NAControl", ...)或NAControl(...)。


插槽----------Slots----------




target: Object of class "OptCharacter"; a character  vector specifying the variables (columns) in which missing values should  be inserted, or NULL to insert missing values in all variables
target:类的对象"OptCharacter";字符向量指定遗漏值插入,或NULL插入所有变量的遗漏值的变量(列),




NArate: Object of class "NumericMatrix" giving the  missing value rates, which may be selected individually for the target  variables. In case of a vector, the same missing value rates are used for  all target variables. In case of a matrix, on the other hand, the missing  value rates to be used for each target variable are given by the
NArate:对象类"NumericMatrix"给遗漏值率,这可能是单独选择的目标变量。在一个向量的情况下,同样的遗漏值用于所有目标变量。在矩阵的情况下,另一方面,缺失值率被用于每个目标变量,由下式给出的




grouping: Object of class "character" specifying a  grouping variable (column) to be used for setting whole groups to
grouping类的对象"character"指定分组变量(列)用于设置整个组:




aux: Object of class "character" specifying auxiliary  variables (columns) whose values are used as probability weights for  selecting the values to be set to NA in the respective target  variables.  If only one variable (column) is specified, it is used for
aux:类对象的"character"指定辅助变量(列)的值被用作用于选择要设置的值的概率加权NA中的各自的目标变量。如果只有一个变量(列)被指定,它被用于




intoContamination: Object of class "logical"  indicating whether missing values should also be inserted into  contaminated observations.  The default is to insert missing values only
intoContamination:类的对象"logical"是否缺少值也应该被插入到受污染的观察。默认值是插入缺失值只


扩展----------Extends----------

Class "VirtualNAControl", directly. Class "OptNAControl", by class "VirtualNAControl",  distance 2.
类"VirtualNAControl",直接。类"OptNAControl"“类”VirtualNAControl“,距离2。


访问和修改方法----------Accessor and mutator methods----------

In addition to the accessor and mutator methods for the slots inherited from  "VirtualNAControl", the following are available:
除了访问和修改方法继承自"VirtualNAControl"的插槽,下面是可供选择:




getGrouping signature(x = "NAControl"): get slot
getGroupingsignature(x = "NAControl"):得到插槽




setGrouping signature(x = "NAControl"): set slot
setGroupingsignature(x = "NAControl"):设定插槽




getAux signature(x = "NAControl"): get slot
getAuxsignature(x = "NAControl"):得到插槽




setAux signature(x = "NAControl"): set slot
setAuxsignature(x = "NAControl"):设定插槽




getIntoContamination signature(x = "NAControl"): get
getIntoContaminationsignature(x = "NAControl"):得到




setIntoContamination signature(x = "NAControl"): set
setIntoContaminationsignature(x = "NAControl"):设置


方法----------Methods----------

In addition to the methods inherited from  "VirtualNAControl", the following are available:
除了从"VirtualNAControl"继承的方法,下面的是可用的:




setNA signature(x = "data.frame",
setNA <CODE>签名(X =“数据框”




show signature(object = "NAControl"): print the object
showsignature(object = "NAControl"):打印对象


UML类图----------UML class diagram----------

A slightly simplified UML class diagram of the framework can be found in  Figure 1 of the package vignette An Object-Oriented Framework for  Statistical Simulation: The R Package simFrame.  Use  vignette("simFrame-intro") to view this vignette.
稍微简单的UML类图的框架,可以发现在图1的包小插曲统计模拟方法的一种面向对象的框架:R封装simFrame。使用vignette("simFrame-intro")查看这个小插曲。


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

Since version 0.3, this control class now allows to specify an auxiliary  variable with probability weights for each target variable.
自0.3版本以来,现在该控件类,允许指定的辅助变量为每个目标变量的概率权重。

The slot grouping was named group prior to version 0.2.   Renaming the slot was necessary since accessor and mutator functions were  introduced in this version and a function named getGroup already  exists.
插槽grouping被命名为group之前的0.2版本。重命名插槽是必要的,因为访问和修改功能在这个版本和一个名为getGroup已经存在的功能进行了介绍。


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


Andreas Alfons



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

Statistical Simulation: The R Package <code>simFrame</code>. Journal of  Statistical Software, 37(3), 1&ndash;36. URL  http://www.jstatsoft.org/v37/i03/.

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

"VirtualNAControl", setNA
"VirtualNAControl",setNA


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


data(eusilcP)
eusilcP$age[eusilcP$age &lt; 0] &lt;- 0  # this actually occurs[这实际上是发生]
sam <- draw(eusilcP[, c("id", "age", "eqIncome")], size = 20)

## missing completely at random[#完全随机缺失]
mcarc <- NAControl(target = "eqIncome", NArate = 0.2)
setNA(sam, mcarc)

## missing at random[#随机缺失]
marc <- NAControl(target = "eqIncome", NArate = 0.2, aux = "age")
setNA(sam, marc)

## missing not at random[#缺少的不是随机的]
mnarc <- NAControl(target = "eqIncome",
    NArate = 0.2, aux = "eqIncome")
setNA(sam, mnarc)

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-5-24 06:14 , Processed in 0.024495 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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