Simulate random normal variable from threefry/vandercorput generator
Arguments
- mean
vector of means.
- sd
vector of standard deviations.
- n
number of observations
- ncores
Number of cores for the simulation
rxnorm
simulates using the threefry sitmo generator;
Examples
## Use threefry engine
rxnorm(n = 10) # with rxnorm you have to explicitly state n
#> [1] 1.31125946 0.34298624 -1.15771645 0.02768516 -0.42533977 0.51421614
#> [7] 1.72913886 0.34092896 -0.62575290 -1.24691670
rxnorm(n = 10, ncores = 2) # You can parallelize the simulation using openMP
#> [1] 0.1901691 -0.8495735 0.4039625 0.9334171 -0.2836994 0.6076422
#> [7] 0.3759326 -0.9604859 -1.7918986 0.6725448
rxnorm(2, 3) ## The first 2 arguments are the mean and standard deviation
#> [1] 0.8224287