gam2objective | R Documentation |

Estimation of GAM smoothing parameters is most stable if
optimization of the UBRE/AIC 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/AIC score of a GAM model, given
smoothing parameters, in a manner suitable for use by `optim`

or `nlm`

.
Not normally called directly, but rather service routines for `gam.outer`

.

```
gam2objective(lsp,args,...)
gam2derivative(lsp,args,...)
```

`lsp` |
The log smoothing parameters. |

`args` |
List of arguments required to call |

`...` |
Other arguments for passing to |

`gam2objective`

and `gam2derivative`

are functions suitable
for calling by `optim`

, to evaluate the GCV/UBRE/AIC score and its
derivatives w.r.t. log smoothing parameters.

`gam4objective`

is an equivalent to `gam2objective`

, suitable for
optimization by `nlm`

- derivatives of the GCV/UBRE/AIC 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).

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

Wood, S.N. (2011) Fast stable restricted maximum likelihood and marginal likelihood estimation of semiparametric generalized linear models. Journal of the Royal Statistical Society (B) 73(1):3-36

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

Wood, S.N. (2008) Fast stable direct fitting and smoothness selection for generalized additive models. J.R.Statist.Soc.B 70(3):495-518

https://www.maths.ed.ac.uk/~swood34/

`gam.fit3`

, `gam`

, `magic`

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.