Constructor Functions for Smooth Terms in BAMLSS
The generic function is only a copy of smooth.construct adding
a ... argument. For objects of class "bamlss.frame" and "bamlss" the
method extracts all smooth model terms, see function bamlss.frame for details
on the setup of BAMLSS.
## Function as in package mgcv ## but with additional dots argument. smooth.construct(object, data, knots, ...) ## For 'bamlss.frame's. ## S3 method for class 'bamlss.frame' smooth.construct(object, data = NULL, knots = NULL, model = NULL, drop = TRUE, ...) ## S3 method for class 'bamlss.formula' smooth.construct(object, data = NULL, knots = NULL, model = NULL, drop = TRUE, ...) ## S3 method for class 'bamlss.terms' smooth.construct(object, data = NULL, knots = NULL, model = NULL, drop = TRUE, ...)
object |
Either a smooth specification object, or object of class |
data |
A data frame or list, see also see function |
knots |
See function |
model |
Character, specifies for which model parameter the smooth constructs should be created. |
drop |
If there is only one model parameter the returned named list is simplified. |
... |
Arguments passed to the smooth term constructor functions. |
For smooth specification objects see function see smooth.construct. For
objects of class "bamlss.frame" or "bamlss" the list of smooth constructs,
see function bamlss.frame for more details.
## Generate some data. d <- GAMart() ## Create a "bamlss.frame". bf <- bamlss.frame(num ~ s(x1) + s(x2), data = d) ## Extract the smooth construct. sc <- smooth.construct(bf) str(sc) ## Also possible with formulas. f <- bamlss.formula(list( num ~ s(x1) + te(lon,lat), sigma ~ s(x2) ), family = "gaussian") sc <- smooth.construct(f, data = d) str(sc)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.