Learn R Programming

scam (version 1.0)

monotonic.smooth.terms: 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 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
  • Monotone increasing P-splines
{ 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.} Monotone decreasing P-splines{ 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.} Monotone increasing and convex P-splines{ 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.} Monotone increasing and concave P-splines{ 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.} Monotone decreasing and convex P-splines{ 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.} Monotone decreasing and concave P-splines{ 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.

Arguments

itemize

  • Double monotone increasing P-splines

code

bs="tesmd2"

item

  • Double monotone decreasing P-splines
  • Single monotone increasing P-splines along the first covariate direction
  • Single monotone increasing P-splines along the second covariate direction
  • Single monotone decreasing P-splines along the first covariate direction
  • Single monotone decreasing P-splines along the second covariate direction

References

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. (2006a) Generalized Additive Models: An Introduction with R. Chapman and Hall/CRC Press. Wood, S.N. (2006b) 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.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

Examples

Run this code
## see examples for scam

Run the code above in your browser using DataLab