Constrained Generalized Additive Model
Overview
A constrained generalized additive model is fitted by the cgam routine. Given a set of predictors, each of which may have a shape or order restrictions, the maximum likelihood estimator for the constrained generalized additive model is found using an iteratively re-weighted cone projection algorithm. The ShapeSelect routine chooses a subset of predictor variables and describes the component relationships with the response. For each predictor, the user needs only specify a set of possible shape or order restrictions. A model selection method chooses the shapes and orderings of the relationships as well as the variables. The cone information criterion (CIC) is used to select the best combination of variables and shapes. A genetic algorithm may be used when the set of possible models is large. In addition, the cgam routine implements a two-dimensional isotonic regression using warped-plane splines without additivity assumptions. It can also fit a convex or concave regression surface with triangle splines without additivity assumptions. See Liao X, Meyer MC (2019)doi:10.18637/jss.v089.i05 for more details.
Install
Health
NOTEdependencies in R coder-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-windows-x86_64
r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc
Base packages in Suggests/Enhances imported in NAMESPACE: ‘grDevices’ ‘graphics’ ‘utils’
r-devel-windows-x86_64
Base packages in Suggests/Enhances imported in NAMESPACE: 'grDevices' 'graphics' 'utils'
- NOTE10 OK, 3 NOTENow
- NOTE11 OK, 2 NOTE2026-09-12
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK14 OK2026-03-10
Documentation
- Help pages
- 38
- Examples that run
- 84%31 run in a plain check · 6 never run
- Exported functions with examples
- 100%
- Documented parameters
- 92%
- Return-value docs
- 100%
- Help pages citing references
- 82%
Downloads
Dependencies
Installing cgam adds 42 packages (23 with compiled code, 30 MB of source tarballs). Heaviest: ggplot2 6.0 MB, lme4 4.1 MB, nloptr 2.1 MB.
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- 1.33Latest
- RR 4.6.0 released · 2026-04-24
- 1.322026-03-05 · diff ↗ ·
removed 4 exports
ShapeSelect, shapes, in.or.out, best.fitadded 2 exports
shapeselect, shapeselect_control - 1.312026-02-08 · diff ↗
- 1.302026-01-16 · diff ↗
- 1.292025-08-23 · diff ↗
- 1.282025-07-05 · diff ↗
- 1.27
- 1.262025-04-28 · diff ↗
- 1.252025-04-24 · diff ↗
- 1.24
- RR 4.5.0 released · 2025-04-11
- 1.232025-02-19 · diff ↗
- 1.222025-02-17 · diff ↗
- RR 4.4.0 released · 2024-04-24
- 1.212023-08-10 · diff ↗
Show 32 earlier eventsHide 32 earlier events
- RR 4.3.0 released · 2023-04-21
- 1.202022-11-16 · diff ↗
- 1.192022-10-04 · diff ↗
- 1.182022-07-18 · diff ↗
- RR 4.2.0 released · 2022-04-22
- 1.172021-12-13 · diff ↗
- RR 4.1.0 released · 2021-05-18
- 1.162020-09-29 · diff ↗
- RR 4.0.0 released · 2020-04-24
- 1.152019-10-13 · diff ↗
- 1.142019-05-01 · diff ↗
- RR 3.6.0 released · 2019-04-26
- 1.132019-04-23 · diff ↗
- 1.122018-11-08 · diff ↗
- 1.11
- RR 3.5.0 released · 2018-04-23
- 1.102018-04-11 · diff ↗
- 1.92018-02-15 · diff ↗
- 1.82017-10-02 · diff ↗
- 1.72017-07-03 · diff ↗ ·
removed 4 exports
wps, ii, dd, diadded 8 exports
s.incr.incr, s.decr.decr, s.decr.incr, s.incr.decr, s.conv.conv, s.conc.conc, Ord, predict.cgam - RR 3.4.0 released · 2017-04-21
- 1.6
- 1.52016-06-05 · diff ↗
- RR 3.3.0 released · 2016-05-03
- 1.4
- 1.32015-10-01 · diff ↗
- RR 3.2.0 released · 2015-04-16
- 1.22014-09-10 · diff ↗ ·
added 10 exports
s, s.incr, s.decr, s.conc, s.conv, s.incr.conc, s.incr.conv, s.decr.conc, s.decr.conv, plotpersp - 1.12014-04-17 · diff ↗
- RR 3.1.0 released · 2014-04-10
- 1.02014-03-05
- RR 3.0.0 released · 2013-04-03
Package metadata
- First published
- 2014-03-05
- Total releases
- 34 / 12 yrs
- License
- GPL (>= 2) OSI
- Minimum R
- ≥ 4.3.0
- Bundled data
- 116 KB / 4 files
- Download size
- 352 KB
Cite
Cite this package
Run in R for the authors' entry:
citation("cgam")The package provides a citation file, so citation() returns the authors' own entry.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-21, which the citation names so these numbers can be found later. More on citing and the projects behind them.