Helper function to quickly simulate from a distribution with given parameters.

distrSimulate(
  n = 100,
  distribution = "Normal",
  pars = list(),
  simplify = TRUE,
  seed,
  ...
)

Arguments

n

number of points to simulate.

distribution

distribution to simulate from, corresponds to ClassName of distr6 distribution, abbreviations allowed.

pars

parameters to pass to distribution. If omitted then distribution defaults used.

simplify

if TRUE (default) only the simulations are returned, otherwise the constructed distribution is also returned.

seed

passed to set.seed

...

additional optional arguments for set.seed

Value

If simplify then vector of n simulations, otherwise list of simulations and distribution.