The function regSim allows to simulate from various regression
models defined by one of the three example functions LM3,
LOGIT3, GAM3 or by a user specified function.
The examples are defined in the following way:
# LM3:
> y = 0.75 * x1 + 0.25 * x2 - 0.5 * x3 + 0.1 * eps
# LOGIT3:
> y = 1 / (1 + exp(- 0.75 * x1 + 0.25 * x2 - 0.5 * x3 + eps))
# GAM3:
> y = scale(scale(sin(2 * pi * x1)) + scale(exp(x2)) + scale(x3))
> y = y + 0.1 * rnorm(n, sd = sd(y))
"LM3" models a liner regression model, "LOGIT3" a generalized
linear regression model expressed by a logit model, and "GAM" an
additive model. x1, x2, x3, and eps are random
normal deviates of length n.
The model function should return an rectangular series defined
as an object of class data.frame, timeSeries or mts
which can be accepted from the parameter estimation
functions regFit and gregFit.