shape.constrained.smooth.terms {scam}R Documentation

Shape preserving smooth terms in SCAM

Description

As in mgcv(gam), shape preserving smooth terms are specified in a scam formula using s terms. All the shape constrained smooth terms (SCOP-splines) 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.

For all types of the mixed constrained smoothing a first order difference penalty applied to the basis coefficients starting with the third one is used. Centring ('sum-to-zero') constraint has been applied to univariate SCOP-splines subject to monotonicity (convexity) constraints after implementing the 'zero intercept' identifiability constraint. This is achieved by dropping the first (constant) column of the spline model matrix and subtracting the corresponding column means from the elements of the remaining columns afterwards. 'Sum-to-zero' constraint orthogonalized the smooth to the model intercept term, thus avoiding confounding with the intercept. The standard errors of the estimated intercept become lower with the centring constraint.

Using the concept of the tensor product spline bases bivariate smooths under monotonicity constraint where monotonicity may be assumed on only one of the covariates (single monotonicity) or both of them (double monotonicity) are added as the smooth terms of the SCAM. Bivariate B-spline is constructed by expressing the coefficients of one of the marginal univariate B-spline bases as the B-spline of the other covariate. Double or single monotonicity is achieved by the corresponding re-parametrization of the bivariate basis coefficients to satisfy the sufficient conditions formulated in terms of the first order differences of the coefficients. The following explains the built in bivariate shape constrained smooth classes.

Double penalties for the shape constrained tensor product smooths are obtained from the penalties of the marginal smooths. For the bivariate SCOP-splines with monotonicity (convexity) constraints along one covariate, the 'sum-to-zero' constraints are applied after dropping the first columns of the model matrix of the constrained marginal smooth. The basis for the unconstrained marginal must be non-negative over the region where the marginal monotonicity (convexity) is to hold. For the bivariate interaction smooths "tismi" and "tismd" the following identifiability steps are implemented: i) dropped the first column of the "mpi" ("mpd") marginals, ii) applied 'sum-to-zero' constraints to the marginals and to the unconstrained B-spline basis, iii) tensor product constructed. The 'sum-to-zero' constraint is applied to the final tensor product model matrix afters removing its first column when constructing bivariate SCOP-splines with double monotonicity (convexity). These result in faster convergence of the optimization routines and more stable intercept estimates.

Also linear functionals of smooths with shape constraints (increasing/decreasing and convex/concave) are supported. See linear.functional.terms.

Author(s)

Natalya Pya nat.pya@gmail.com

References

Pya, N. and Wood, S.N. (2015) Shape constrained additive models. Statistics and Computing, 25(3), 543-559

Pya, N. (2010) Additive models with shape constraints. PhD thesis. University of Bath. Department of Mathematical Sciences

Eilers, P.H.C. and B.D. Marx (1996) Flexible Smoothing with B-splines and Penalties. Statistical Science, 11(2):89-121

Wood S.N. (2017) Generalized Additive Models: An Introduction with R (2nd edition). Chapman and Hall/CRC Press

Wood, S.N. (2006) Low rank scale invariant tensor product smooths for generalized additive mixed models. Biometrics 62(4):1025-1036

See Also

s, smooth.construct.mpi.smooth.spec, smooth.construct.mpd.smooth.spec,

smooth.construct.cx.smooth.spec, smooth.construct.cv.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,

smooth.construct.tismi.smooth.spec, smooth.construct.tismd.smooth.spec

Examples

## see examples for scam 

[Package scam version 1.2-17 Index]