Learn R Programming

CreditMetrics (version 0.0-2)

cm.rnorm: Computation of standard normal distributed random numbers

Description

cm.rnorm simulates standard normal distributed random numbers while using antithetic sampling.

Usage

cm.rnorm(N, n)

Arguments

N
number of simulations
n
number of simulated random numbers

Value

  • The function returns N simulations with n simulated random numbers each.

Details

This function computes standard normal distributed random numbers with antithetic sampling. Here one has a sequence of standard normal distributed random numbers $(X_1,...,X_{n/2})$. Reflected random numbers are computed with $$X_i' = (-1) X_i$$ So the sequence $X_1',...,X_{n/2}'$ is also standard normal distributed

References

Glasserman, Paul, Monte Carlo Methods in Financial Engineering, Springer 2004

See Also

matrix, rnorm

Examples

Run this code
N <- 3
  n <- 50000
  
  cm.rnorm(N, n)

Run the code above in your browser using DataLab