Methods for Function rstream.antithetic in Package ‘rstream’
方法函数rstream.antithetic在包rstream“
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Get and change the antithetic flag for an "rstream" object in package rstream.
获取和改变的对立标志为对象的“rstream”在包rstream。
If the antithetic flag is on (TRUE) the "rstream" object returns antithetic random numbers.
如果对立的标志是(TRUE)的“rstream”的对象返回对立的随机数。
Antithetic random streams return numbers which have smallest possible correlation (i.e. -1) to their respective counterparts. Thus instead of a number u the number 1-u is returned.
对偶随机流返回数字有最小的可能的相关性(即-1)各自的。因此,而不是一个数字u数1-u返回。
This is useful for variance reduction techniques in Monte Carlo computations.
在蒙特卡罗计算方差减少技术,这是非常有用的。
用法----------Usage----------
## S4 method for signature 'rstream'
rstream.antithetic(stream)
rstream.antithetic(stream) <- value
参数----------Arguments----------
参数:stream
an "rstream" object.
的“rstream”对象。
参数:value
a boolean (TRUE or FALSE) to change the status of the flag.
一个布尔值(TRUE或FALSE)来改变状态的标志。
方法----------Methods----------
Methods available for the following "rstream" subclasses: rstream.mrg32k3a, rstream.runif.
方法可用于下面的“rstream”子类:rstream.mrg32k3a,rstream.runif。
(作者)----------Author(s)----------
Josef Leydold <a href="mailto:josef.leydold@wu.ac.at">josef.leydold@wu.ac.at</a>
参见----------See Also----------
rstream.
rstream。
实例----------Examples----------
## create a new rstream object (of subclass rstream.mrg32k3a)[#创建新rstream对象(子类rstream.mrg32k3a的)]
s <- new("rstream.mrg32k3a")
## set antithetic flag of rstream object[#对立的标志rstream对象]
rstream.antithetic(s) <- TRUE
## get antithetic flag of rstream object[#对立的标志rstream对象]
rstream.antithetic(s)