Smooth constructor for monotonic P-splines
The function sets up a smooth term for shape constraint estimation of P-spline model terms. Note that this currently only works using boosting.
## S3 method for class 'ms.smooth.spec' smooth.construct(object, data, knots, ...)
object |
Either a smooth specification object, or object of class |
data |
A data frame or list, see also see function |
knots |
See function |
... |
Arguments passed to the smooth term constructor functions. |
See function see smooth.construct
.
## Not run: ## Generate some data. d <- GAMart() ## Increasing: constr = 1. ## Decreasing: constr = 2. b <- bamlss(num ~ s2(x1,bs="ms",xt=list(constr=2)), data = d, sampler = FALSE, optimizer = opt_boost) plot(b) ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.