Skip to contents

Returns a function that mimics stats::runif but is seeded from seed. Pairs with morie.longitudinal_sim.sync_rng on the Python side so the two emit identical streams when given the same seed.

Usage

morie_sync_rng(seed)

Arguments

seed

Non-negative integer seed.

Value

An environment with rnorm, runif, sample methods that share the same underlying RNG state.

Examples

morie_sync_rng(seed = 1L)
#> <environment: 0x55a701b7b4c8>