mgcv(gam)
, shape preserving smooth terms are specified in a scam
formula using s
terms. All the shape constrained smooth terms are constructed using the B-splines basis proposed by Eilers and Marx (1996) with
a discrete penalty on the basis coefficients.
The univariate single penalty built in shape constrained smooth classes are summarized as follows
bs="mpi"
. To achieve monotone increasing smooths these reparametrize the coefficients
so that they form an increasing sequence.
For details see
smooth.construct.mpi.smooth.spec
.}
bs="mpd"
. To achieve monotone decreasing smooths these reparametrize the coefficients
so that they form a decreasing sequence. A first order difference penalty applied to the basis coefficients starting with the
second is used for the monotone increasing and decreasing cases.}
bs="micx"
. These reparametrize the coefficients
so that the first and the second order differences of the basis coefficients are greater than zero.
For details see
smooth.construct.micx.smooth.spec
.}
bs="micv"
. These reparametrize the coefficients
so that the first order differences of the basis coefficients are greater than zero while the second order difference
are less than zero.}
bs="mdcx"
. These reparametrize the coefficients
so that the first order differences of the basis coefficients are less than zero while the second order difference
are greater.
For details see smooth.construct.mdcx.smooth.spec
.}
bs="mdcv"
. These reparametrize the coefficients
so that the first and the second order differences of the basis coefficients are less than zero.}
For all four types of the mixed constrained smoothing a first order difference
penalty applied to the basis coefficients starting with the third one is used.bs="tesmd2"
s
, smooth.construct.mpi.smooth.spec
,
smooth.construct.mpd.smooth.spec
,
smooth.construct.micx.smooth.spec
,
smooth.construct.micv.smooth.spec
,
smooth.construct.mdcx.smooth.spec
,
smooth.construct.mdcv.smooth.spec
,
smooth.construct.tedmi.smooth.spec
,
smooth.construct.tedmd.smooth.spec
,
smooth.construct.tesmi1.smooth.spec
,
smooth.construct.tesmi2.smooth.spec
,
smooth.construct.tesmd1.smooth.spec
,
smooth.construct.tesmd2.smooth.spec