Simulate example data for fitting GAMs
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.
data_sim( model = "eg1", n = 400, scale = 2, dist = c("normal", "poisson", "binary"), seed = NULL )
model |
character; either |
n |
numeric; the number of observations to simulate. |
scale |
numeric; the level of noise to use. |
dist |
character; a sampling distribution for the response variable. |
seed |
numeric; the seed for the random number generator. Passed to
|
data_sim("eg1")
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.