Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

smooth.construct.ms.smooth.spec

Smooth constructor for monotonic P-splines


Description

The function sets up a smooth term for shape constraint estimation of P-spline model terms. Note that this currently only works using boosting.

Usage

## S3 method for class 'ms.smooth.spec'
smooth.construct(object, data, knots, ...)

Arguments

object

Either a smooth specification object, or object of class "bamlss", "bamlss.frame", "bamlss.formula" or "bamlss.terms". For smooth specification objects, see function smooth.construct.

data

A data frame or list, see also see function smooth.construct.

knots

See function smooth.construct.

...

Arguments passed to the smooth term constructor functions.

Value

See function see smooth.construct.

See Also

Examples

## 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)

bamlss

Bayesian Additive Models for Location, Scale, and Shape (and Beyond)

v1.1-3
GPL-2 | GPL-3
Authors
Nikolaus Umlauf [aut, cre] (<https://orcid.org/0000-0003-2160-9803>), Nadja Klein [aut] (<https://orcid.org/0000-0002-5072-5347>), Achim Zeileis [aut] (<https://orcid.org/0000-0003-0918-3766>), Meike Koehler [ctb], Thorsten Simon [aut] (<https://orcid.org/0000-0002-3778-7738>), Stanislaus Stadlmann [ctb]
Initial release
2021-01-25

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.