Learn R Programming

scam (version 1.0)

scam-package: Shape constrained additive models

Description

scam provides functions for generalized additive modelling under shape constraints on the component functions of the linear predictor of the GAM. Models can contain multiple shape constrained and unconstrained terms as well as bivariate smooths with double or single monotonicity. The model set up is the same as in mgcv(gam) with the added shape constrained smooths, so the unconstrained smooths can be of more than one variable, and other user defined smooths can be included. Penalized log likelihood maximization is used to fit the model together with the automatic smoothness selection.

Arguments

Details

ll{ Package: scam Type: Package Version: 1.0 Date: 2012-17-01 License: GPL (version 2 or later) See file LICENSE LazyLoad: yes } The package provides generalized additive modelling under shape constraints on the component functions of the linear predictor. scam and plot.scam. These functions are based on the functions of the unconstrained GAM mgcv(gam) and mgcv(plot.gam) and similar in use. summary.scam allows to extract the results of the model fitting in the same way as in summary.gam. A Bayesian approach is used to obtain a covariance matrix of the model coefficients and credible intervals for each smooth.

References

Pya, N. (2010) Additive models with shape constraints. PhD thesis. University of Bath. Department of Mathematical Sciences Wood S.N. (2006) Generalized Additive Models: An Introduction with R. Chapman and Hall/CRC Press. Wood, S.N. (2008) Fast stable direct fitting and smoothness selection for generalized additive models. J.R.Statist.Soc.B 70(3):495-518 Wood, S.N. (2011) Fast stable restricted maximum likelihood and marginal likelihood estimation of semiparametric generalized linear models. Journal of the Royal Statistical Society: Series B. 73(1): 1--34

Examples

Run this code
## see examples for scam

Run the code above in your browser using DataLab