Learn R Programming

randtoolbox (version 2.0.5)

soboltestfunctions: Some test functions for Sobol sequences

Description

Some test functions for Sobol sequences

Usage

sobol.R(n, d, echo=FALSE)

int2bit(x) bit2int(x) bit2unitreal(x)

Value

a vector of length n or a matrix for sobol.R.

Arguments

n

number of observations.

d

dimension of observations.

echo

a logical to show some traces.

x

an integer to convert in base 2 or its binary representation

Author

Christophe Dutang

Details

sobol.R computes Sobol sequences but not using Gray code so points are not in the same order as in sobol.

sobol.basic compute the Sobol sequence in one dimension according to a primitive polynomial and specified integers \(m_j\).

int2bit computes the binary representation of the integer part of a real, bit2int computes an integer from its binary representation. bit2unitreal computes the radical inverse function in base 2.

References

Glasserman P., (2003); Monte Carlo Methods in Financial Engineering, Springer. tools:::Rd_expr_doi("10.1007/978-0-387-21617-1")

See Also

quasiRNG for quasi random number generation.

Examples

Run this code
#page 306 of Glassermann
sobol.R(10,2)


Run the code above in your browser using DataLab