with.random.seed: Evalutes the expression expr with the specified random seed....

Description Usage Arguments Value

Description

This function can be useful in simulation studies in which some random variables, e.g. explanatory variables X shall always be drawn in the same fashion, while other data, like disturbances epsilon shall differ between runs. One can then draw the X using with.random.seed to guarantee the same X in every simulation run.

Usage

1
2
## S3 method for class 'random.seed'
with(expr, seed = 1234567890)

Arguments

expr

an R expression that returns some random value

seed

an integer number that will be used to call set.seed

Value

the value of expr evaluated under the specifed random seed


skranz/sktools documentation built on May 30, 2019, 3:03 a.m.