Learn R Programming

VGAM (version 0.9-0)

vgam.control: Control function for vgam

Description

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

Usage

vgam.control(all.knots = FALSE, 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,
             ...)

Arguments

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 \leq 40$, and for $n > 40$, the number of knots is approximately $40 + (n-40)^{0.25}$. This increas
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 wit
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. where $d$ be the number of s terms in the formula. Recycling is used if necessary. The $i$th value is the number of B-spline coefficients to be estim
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.
...
other parameters that may be picked up from control functions that are specific to the VGAM family function.

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.

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.

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.

See Also

vgam, vglm.control, vsmooth.spline, vglm.

Examples

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

Run the code above in your browser using DataLab