model.frame.bamlss.Rd
Extracts the model frame of a bamlss
or bamlss.frame
object.
# S3 method for bamlss
model.frame(formula, ...)
# S3 method for bamlss.frame
model.frame(formula, ...)
## Internal helper function for creating
## the model frame.
bamlss.model.frame(formula, data, family = gaussian_bamlss(),
weights = NULL, subset = NULL, offset = NULL,
na.action = na.omit, specials = NULL, contrasts.arg = NULL,
drop.unused.levels = TRUE, ...)
An object of class "bamlss"
or "bamlss.frame"
.
A data.frame
or list
containing the model
response variable(s) and covariates specified in the formula
.
By default the variables are taken from environment(formula)
.
A bamlss.family
object, see function bamlss
.
Prior weights on the data.
An optional vector specifying a subset of observations to be used in the fitting process.
Can be used to supply model offsets for use in fitting.
A function which indicates what should happen when the data
contain NA
's. The default is set by the na.action
setting of options
, and is na.omit
if set to NULL
.
Special function in formulas, see terms.object
.
An optional list. See the contrasts.arg
of
model.matrix.default
.
Should factors have unused levels dropped?
Arguments to be passed to bamlss.model.frame()
and others.
The data.frame
containing the variables used for modeling
with function bamlss
.
if (FALSE) ## Generate some data.
d <- GAMart()
## Model formula.
f <- list(
log(pnum) ~ s(x1) + log(x2),
sigma ~ s(x3)
)
## Estimate model.
b <- bamlss(f, data = d)
#> Error in eval(expr, envir, enclos): object 'd' not found
## Extract the model frame.
head(model.frame(b))
#> Error in eval(expr, envir, enclos): object 'b' not found