ContControl(simFrame)
ContControl()所属R语言包:simFrame
Create contamination control objects
污染控制对象
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Create objects of a class inheriting from "ContControl".
创建对象的类继承"ContControl"。
用法----------Usage----------
ContControl(..., type = c("DCAR", "DAR"))
参数----------Arguments----------
参数:...
arguments passed to new("DCARContControl", ...) or new("DARContControl", ...), as determined by type.
参数传递new("DCARContControl", ...)或new("DARContControl", ...),由type。
参数:type
a character string specifying whether a control object of class "DCARContControl" or "DARContControl" should be created.
一个字符串指定的控制对象类是否"DCARContControl"或"DARContControl"应该被创建。
值----------Value----------
If type = "DCAR", an object of class "DCARContControl".
如果type = "DCAR",的对象类"DCARContControl"。
If type = "DAR", an object of class "DARContControl".
如果type = "DAR",的对象类"DARContControl"。
注意----------Note----------
This constructor exists mainly for back compatibility with early draft versions of simFrame.
此构造函数的存在主要是为了后面的兼容性与早期版本的草案simFrame。
(作者)----------Author(s)----------
Andreas Alfons
参见----------See Also----------
"DCARContControl", "DARContControl", "ContControl"
"DCARContControl","DARContControl","ContControl"
实例----------Examples----------
## distributed completely at random[#完全随机分布]
data(eusilcP)
sam <- draw(eusilcP[, c("id", "eqIncome")], size = 20)
dcarc <- ContControl(target = "eqIncome", epsilon = 0.05,
dots = list(mean = 5e+05, sd = 10000), type = "DCAR")
contaminate(sam, dcarc)
## distributed at random[#随机分布]
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))
darc <- ContControl(target = "V2", epsilon = 0.2,
fun = function(x) x * 100, type = "DAR")
contaminate(foo, darc)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|