Learn R Programming

VGAM (version 1.1-14)

cops: Centre of the Parameter Space

Description

Returns a vector similar to coef(object), comprising the centre of the parameter space (COPS) values, given a fitted VGLM.

Usage

cops(object, ...)
copsvglm(object, level = 0.999,
    beta.range = confint(object, level = level),
    muxrange = 4, iter.max = 8, tol = 1e-5, subset = NULL,
    do1 = TRUE, slowtrain = FALSE, ...)

Value

A named vector, similar to coefvlm.

Arguments

object

A vglm object, e.g., representing a logistic regression.

level

Fed into confint to obtain an interval for each coefficient. Then the centered confidence limits are multiplied by muxrange and iter to widen the interval, so as to allow a gridsearch. Hopefully each maximum is bracketed by two endpoints. So a value of level closer to 1 will mean the initial confidence intervals will be wider.

beta.range

Numeric. Interval for the numerical search. It is common for the COPS to be relatively near the estimated regression coefficients. Argument level provides an initial wide range about these estimates. Alternatively, a 2-column matrix can be inputted to replace the default, where the first column is the lower limit, etc.

muxrange, iter.max

Numeric. Used to obtain the interval endpoints that cover each COPS value. The initial confidence intervals are linearly widened by multiplication by muxrange and 1:iter.max. This provides the positions for a gridsearch whereby the maximum can be covered. If the highest information value of the is at the most extreme gridpoints (i.e., the first or the last) then a warning is given for the user to increase at least one of these arguments. Note that muxrange > 1 in order to expand the gridsearch outward.

tol

Numeric. Fed into tol in optimize. Probably tol should only occasionally used, e.g., if coef(object) contains some very large or small values.

do1

Logical. Include the intercepts? This operates in conjunction with subset.

slowtrain

Logical. Used internally, not important.

subset

Same as in wsdm. To control whether intercepts are included, use do1.

...

currently unused but may be used in the future for further arguments passed into other methods.

Author

Thomas W. Yee.

Details

For many models, some COPS values will be Inf or -Inf so that manual checking is needed, for example, poissonff. The answers returned by this function only make sense if the COPSs are in the interior of the parameter space. This function was written specifically for logistic regression but has much wider applicability. Currently the result returned depends critically on beta.range, muxrange and iter.max so that the answer ought to be checked.

Yee (2025) shows that not all VGLMs have a finite COPS. For example, an intercept-only propodds with second cumulative probability less than 0.25 will not have a finite COPS for the first intercept. For now, this function should probably only applied to binomialff models with the four most common link functions.

References

Yee, T. W. (2025). The centre of the parameter space and its mapping with the WSDM function: A diagnostic for logistic regression and beyond. In preparation.

See Also

hdeff, wsdm, cops3.glm, binomialff, coefvlm, coef.

Examples

Run this code
if (FALSE) data("xs.nz", package = "VGAMdata")
data1 <- na.omit(xs.nz[, c("age", "cancer", "sex")])
fit1 <- vglm(cancer ~ age + sex, binomialff, data1)
cops(fit1)

Run the code above in your browser using DataLab