gam.outer {mgcv} | R Documentation |

## Minimize GCV or UBRE score of a GAM using ‘outer’ iteration

### Description

Estimation of GAM smoothing parameters is most stable if optimization of the smoothness selection score (GCV, GACV, UBRE/AIC, REML, ML etc) is outer to the penalized iteratively re-weighted least squares scheme used to estimate the model given smoothing parameters.

This routine optimizes a smoothness selection score in this way. Basically the
score is evaluated for each trial set of smoothing parameters by
estimating the GAM for those smoothing parameters. The score is minimized
w.r.t. the parameters numerically, using `newton`

(default), `bfgs`

, `optim`

or `nlm`

. Exact
(first and second) derivatives of the score can be used by fitting with
`gam.fit3`

. This
improves efficiency and reliability relative to relying on finite
difference derivatives.

Not normally called directly, but rather a service routine for `gam`

.

### Usage

```
gam.outer(lsp,fscale,family,control,method,optimizer,
criterion,scale,gamma,G,start=NULL,nei=NULL,...)
```

### Arguments

`lsp` |
The log smoothing parameters. |

`fscale` |
Typical scale of the GCV or UBRE/AIC score. |

`family` |
the model family. |

`control` |
control argument to pass to |

`method` |
method argument to |

`optimizer` |
The argument to |

`criterion` |
Which smoothness selction criterion to use. One of |

`scale` |
Supplied scale parameter. Positive indicates known. |

`gamma` |
The degree of freedom inflation factor for the GCV/UBRE/AIC score. |

`G` |
List produced by |

`start` |
starting parameter values. |

`nei` |
List specifying neighbourhood structure if NCV used. See |

`...` |
other arguments, typically for passing on to |

### Details

See Wood (2008) for full details on ‘outer iteration’.

### Author(s)

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

### References

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

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

### See Also

*mgcv*version 1.9-1 Index]