DARContControl-class(simFrame)
DARContControl-class()所属R语言包:simFrame
Class "DARContControl"
类“DARContControl”
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Class for controlling contamination in a simulation experiment. The values of the contaminated observations will be distributed at random (DAR), i.e., they will depend on on the original values.
一类用于控制的模拟实验中的污染。受污染的观测值将被随机分布在(DAR),也就是说,他们依靠的原始值。
类对象----------Objects from the Class----------
Objects can be created by calls of the form new("DARContControl", ...), DARContControl(...) or ContControl(..., type="DAR").
对象可以创建调用的形式new("DARContControl", ...),DARContControl(...)或ContControl(..., type="DAR")。
插槽----------Slots----------
target: Object of class "OptCharacter"; a character vector specifying specifying the variables (columns) to be contaminated, or NULL to contaminate all variables (except the additional ones
target:类的对象"OptCharacter";一个字符向量确定指定被污染,或NULL污染的所有变量(除了额外的变量(列)
epsilon: Object of class "numeric" giving the
epsilon:类的对象"numeric"给
grouping: Object of class "character" specifying a grouping variable (column) to be used for contaminating whole groups
grouping类的对象"character"指定分组变量(列)用于污染整群:
aux: Object of class "character" specifying an auxiliary variable (column) whose values are used as probability weights
aux:类对象的"character"指定的辅助变量(列)的值被用作概率加权
fun: Object of class "function" generating the values of the contamination data. The original values of the observations to be contaminated will be passed as its first argument. Furthermore, it should return an object that can be coerced to a
fun:类的对象"function"产生的污染数据的值。的意见受到污染的原始值将作为第一个参数传递。此外,它应该返回一个对象可以强制转换到
dots: Object of class "list" containing additional
dots:对象类"list"包含额外的
扩展----------Extends----------
Class "ContControl", directly. Class "VirtualContControl", by class "ContControl", distance 2. Class "OptContControl", by class "ContControl", distance 3.
类"ContControl",直接。类"VirtualContControl"“类”ContControl“,距离2。类"OptContControl"“类”ContControl“,距离3。
Details
详细信息----------Details----------
With this control class, contamination is modeled as a two-step process. The first step is to select observations to be contaminated, the second is to model the distribution of the outliers. In this case, the original values will be modified by the function given by slot fun, i.e., values of the contaminated observations will depend on on the original values.
该控件类,污染被建模为一个两步的过程。第一步是选择观测到被污染,二是模型的异常值的分布。在这种情况下,原来的值将被修改的插槽fun,即,受污染的观测值将取决于原始值由给定的函数。
访问和修改方法----------Accessor and mutator methods----------
In addition to the accessor and mutator methods for the slots inherited from "ContControl", the following are available:
除了访问和修改方法继承自"ContControl"的插槽,下面是可供选择:
getFun signature(x = "DARContControl"): get slot
getFunsignature(x = "DARContControl"):得到插槽
setFun signature(x = "DARContControl"): set slot
setFunsignature(x = "DARContControl"):设定插槽
getDots signature(x = "DARContControl"): get slot
getDotssignature(x = "DARContControl"):得到插槽
setDots signature(x = "DARContControl"): set slot
setDotssignature(x = "DARContControl"):设定插槽
方法----------Methods----------
Methods are inherited from "ContControl".
方法继承自"ContControl"。
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----------
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–36. URL http://www.jstatsoft.org/v37/i03/.
Package <code>simFrame</code> for Statistical Simulation. In Aivazian, S., Filzmoser, P. and Kharin, Y. (editors) Computer Data Analysis and Modeling: Complex Stochastic Data and Systems, volume 2, 178–181. Minsk. ISBN 978-985-476-848-9.
Multivariate Outlier Detection in Incomplete Survey Data. Survey Methodology, 34(1), 91–103.
Data. 57th Session of the International Statistical Institute, Durban.
参见----------See Also----------
"DCARContControl", "ContControl", "VirtualContControl", contaminate
"DCARContControl","ContControl","VirtualContControl",contaminate
实例----------Examples----------
require(mvtnorm)
mean <- rep(0, 2)
sigma <- matrix(c(1, 0.5, 0.5, 1), 2, 2)
foo <- generate(size = 10, distribution = rmvnorm,
dots = list(mean = mean, sigma = sigma))
cc <- DARContControl(target = "V2",
epsilon = 0.2, fun = function(x) x * 100)
contaminate(foo, cc)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|