Learn R Programming

mgcv (version 0.8-2)

gam.control: Setting Generalized Additive Models fitting defaults

Description

This is an internal function of package mgcv. It is a modification of the function glm.control. It enables the user to set defaults for convergence tolerance and maximum number of iterations when using gam. Argument mgcv.tol controls the tolerence used to judge multiple smoothing parameter convergence (default 1e-6). mgcv.half is the maximum number of times to halve the step length in an iterative update of the smoothing parameters if the step is failing to decrease the GCV/UBRE score (default 15). Setting trace to TRUE will cause various diagnostics to be produced as fitting progresses, including plots of the GCV function and current minimum, against model EDF. maxit and globit control the maximum iterations of the IRLS algorithm, as follows: the algorithm will first execute up to globit steps in which the GCV/UBRE algorithm performs a global search for the best overall smoothing parameter at every iteration, if convergence has not occured by then, then a further maxit steps are taken, in which the overall smoothing parameter estimate is taken as the one locally minimising the GCV/UBRE score and resulting in the lowest EDF change. The difference between the two phases is only significant if the GCV/UBRE function develops more than one minima. The reason for this approach is that the GCV/UBRE score for the IRLS problem can develop "phantom" minimima for some models: these are minima which are not present in the GCV/UBRE score of the IRLS problem resulting from moving the parameters to the minimum! Such minima can lead to convergence failures, which are usually fixed by the second phase.

See glm.control for more information.

Arguments

References

Gu and Wahba (1991) Minimizing GCV/GML scores with multiple smoothing parameters via the Newton method. SIAM J. Sci. Statist. Comput. 12:383-398

Wood (2000) Modelling and Smoothing Parameter Estimation with Multiple Quadratic Penalties. JRSSB 62(2):413-428

http://www.ruwpa.st-and.ac.uk/simon.html

See Also

gam gam.fit