gam2objective {mgcv}R Documentation

Objective functions for GAM smoothing parameter estimation.

Description

Estimation of GAM smoothing parameters is most stable if optimization of the UBRE or GCV score is outer to the penalized iteratively re-weighted least squares scheme used to estimate the model given smoothing parameters. These functions evaluate the GCV/UBRE score of a GAM model, given smoothing parameters, in a manner sutable for use by optim or nlm. Not normally called directly, but rather service routines for gam.outer.

Usage

gam2objective(lsp,args)
gam2derivative(lsp,args)
gam3objective(lsp,args)

Arguments

lsp The log smoothing parameters.
args List of arguments required to call gam.fit2.

Details

gam2objective and gam2derivative are functions suitable for calling by optim, to evaluate the GCV/UBRE score and it's derivatives w.r.t. log smoothing parameters.

gam3objective is an equaivalent to gam2objective, suitable for optimization by nlm - derivatives of the GCV/UBRE function are calculated and returned as attributes.

The basic idea of optimizing smoothing parameters `outer' to the P-IRLS loop was first proposed in O'Sullivan et al. (1986).

Author(s)

Simon N. Wood simon.wood@r-project.org

References

O 'Sullivan, Yandall & Raynor (1986) Automatic smoothing of regression functions in generalized linear models. J. Amer. Statist. Assoc. 81:96-103.

http://www.stats.gla.ac.uk/~simon/

See Also

gam.fit2, gam, mgcv, magic


[Package mgcv version 1.2-3 Index]