Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

rstream.antithetic-methods

Methods for Function rstream.antithetic in Package ‘rstream’


Description

Get and change the antithetic flag for an "rstream" object in package rstream.

If the antithetic flag is on (TRUE) the "rstream" object returns antithetic random numbers.

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.

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.

value

a boolean (TRUE or FALSE) to change the status of the flag.

Methods

Methods available for the following "rstream" subclasses: rstream.mrg32k3a, rstream.runif.

Author(s)

See Also

Examples

## create a new rstream object (of subclass rstream.mrg32k3a)
s <- new("rstream.mrg32k3a")

## set antithetic flag of rstream object
rstream.antithetic(s) <- TRUE

## get antithetic flag of rstream object
rstream.antithetic(s)

rstream

Streams of Random Numbers

v1.3.6
GPL-2
Authors
Josef Leydold <josef.leydold@wu.ac.at>
Initial release
2020-02-03

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.