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

rxnormV

Simulate random normal variable from threefry/vandercorput generator


Description

Simulate random normal variable from threefry/vandercorput generator

Usage

rxnorm(mean = 0, sd = 1, n = 1L, ncores = 1L)

rxnormV(mean = 0, sd = 1, n = 1L, ncores = 1L)

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; rxnormV uses the vandercorput generator

Value

normal random number deviates

Examples

## Use threefry engine

rxnorm(n=10) # with rxnorm you have to explicitly state n
rxnorm(n=10,ncores=2) # You can parallelize the simulation using openMP

rxnorm(2,3) ## The first 2 arguments are the mean and standard deviation


## This example uses `rxnorm` directly in the model

rx <- RxODE({
  a = rxnorm()
})

et <- et(1,id=1:2)

s <- rxSolve(rx,et)

## Use vandercorput generator

rxnormV(n=10) # with rxnorm you have to explicitly state n
rxnormV(n=10,ncores=2) # You can parallelize the simulation using openMP

rxnormV(2,3) ## The first 2 arguments are the mean and standard deviation


## This example uses `rxnormV` directly in the model

rx <- RxODE({
  a = rxnormV()
})

et <- et(1,id=1:2)

s <- rxSolve(rx,et)

RxODE

Facilities for Simulating from ODE-Based Models

v1.0.9
GPL (>= 3)
Authors
Matthew L. Fidler [aut] (<https://orcid.org/0000-0001-8538-6691>), Melissa Hallow [aut], Wenping Wang [aut, cre], Zufar Mulyukov [ctb], Alan Hindmarsh [ctb], Awad H. Al-Mohy [ctb], Matt Dowle [ctb], Cleve Moler [ctb], David Cooley [ctb], Drew Schmidt [ctb], Arun Srinivasan [ctb], Ernst Hairer [ctb], Gerhard Wanner [ctb], Goro Fuji [ctb], Hadley Wickham [ctb], Jack Dongarra [ctb], Linda Petzold [ctb], Martin Maechler [ctb], Matteo Fasiolo [ctb], Morwenn [ctb], Nicholas J. Higham [ctb], Roger B. Sidje [ctb], Simon Frost [ctb], Kevin Ushey [ctb], Yu Feng [ctb]
Initial release

We don't support your browser anymore

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