A tidy reimplementation of the functions implemented in mgcv::gamSim()
that can be used to fit GAMs. An new feature is that the sampling
distribution can be applied to all the example types.
character; either "egX" where X is an integer 1:7, or
the name of a model. See Details for possible options.
n
numeric; the number of observations to simulate.
scale
numeric; the level of noise to use.
theta
numeric; the dispersion parameter \(\theta\) to use. The
default is entirely arbitrary, chosen only to provide simulated data that
exhibits extra dispersion beyond that assumed by under a Poisson.
dist
character; a sampling distribution for the response
variable.
seed
numeric; the seed for the random number generator. Passed to
base::set.seed().