vgam.control {VGAM}R Documentation

Control function for vgam

Description

Algorithmic constants and parameters for running vgam are set using this function.

Usage

vgam.control(all.knots = FALSE, backchat = if (is.R()) FALSE else TRUE,
             bf.epsilon = 1e-07, bf.maxit = 30, 
             checkwz=TRUE,
             criterion = names(.min.criterion.VGAM), 
             epsilon = 1e-07, maxit = 30, na.action = na.fail,
             nk = NULL, save.weight = FALSE, se.fit = TRUE,
             trace = FALSE, wzepsilon = .Machine$double.eps^0.75,
             xij = NULL, ...)

Arguments

In the following, we let d be the number of s terms in the formula.

all.knots logical indicating if all distinct points of the smoothing variables are to be used as knots. By default, all.knots=TRUE for n <= 40, and for n > 40, the number of knots is approximately 40 + (n-40)^0.25. This increases very slowly with n so that the number of knots is approximately between 50 and 60 for large n.
backchat logical indicating if a backchat is to be used (not applicable in R).
bf.epsilon tolerance used by the modified vector backfitting algorithm for testing convergence. Must be a positive number.
bf.maxit maximum number of iterations allowed in the modified vector backfitting algorithm. Must be a positive integer.
checkwz logical indicating whether the diagonal elements of the working weight matrices should be checked whether they are sufficiently positive, i.e., greater than wzepsilon. If not, any values less than wzepsilon are replaced with this value.
criterion character variable describing what criterion is to be used to test for convergence. The possibilities are listed in .min.criterion.VGAM, but most family functions only implement a few of these.
epsilon positive convergence tolerance epsilon. Roughly speaking, the Newton-Raphson/Fisher-scoring/local-scoring iterations are assumed to have converged when two successive criterion values are within epsilon of each other.
maxit maximum number of Newton-Raphson/Fisher-scoring/local-scoring iterations allowed.
na.action how to handle missing values. Unlike the SPLUS gam function, vgam cannot handle NAs when smoothing.
nk vector of length d containing positive integers. Recycling is used if necessary. The ith value is the number of B-spline coefficients to be estimated for each component function of the ith s() term. nk differs from the number of knots by some constant. If specified, nk overrides the automatic knot selection procedure.
save.weight logical indicating whether the weights slot of a "vglm" object will be saved on the object. If not, it will be reconstructed when needed, e.g., summary.
se.fit logical indicating whether approximate pointwise standard errors are to be saved on the object. If TRUE, then these can be plotted with plot(..., se=TRUE).
trace logical indicating if output should be produced for each iteration.
wzepsilon Small positive number used to test whether the diagonals of the working weight matrices are sufficiently positive.
xij formula giving terms making up a covariate-dependent term.
... other parameters that may be picked up from control functions that are specific to the VGAM family function.

Details

Most of the control parameters are used within vgam.fit and you will have to look at that to understand the full details. Many of the control parameters are used in a similar manner by vglm.fit (vglm) because the algorithm (IRLS) is very similar.

Setting save.weight=FALSE is useful for some models because the weights slot of the object is often the largest and so less memory is used to store the object. However, for some VGAM family function, it is necessary to set save.weight=TRUE because the weights slot cannot be reconstructed later.

Value

A list with components matching the input names. A little error checking is done, but not much. The list is assigned to the control slot of vgam objects.

Note

vgam does not implement half-stepsizing, therefore parametric models should be fitted with vglm. Also, vgam is slower than vglm too.

Author(s)

Thomas W. Yee

References

Yee, T. W. and Wild, C. J. (1996) Vector generalized additive models. Journal of the Royal Statistical Society, Series B, Methodological, 58, 481–493.

http://www.stat.auckland.ac.nz/~yee

See Also

vgam, vsmooth.spline, vglm.

Examples

data(pneumo)
pneumo = transform(pneumo, let=log(exposure.time))
vgam(cbind(normal, mild, severe) ~ s(let, df=3), multinomial,
     pneumo, trace=TRUE, eps=1e-4, maxit=10)

[Package VGAM version 0.7-7 Index]