cops: Centre of the Parameter Space

copsR Documentation

Centre of the Parameter Space

Description

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

Usage

cops(object, ...)
copsvglm(object, beta.range = c(-5, 6),
         tol = .Machine$double.eps^0.25,
         dointercepts = TRUE, trace. = FALSE,
         slowtrain = FALSE, ...)

Arguments

object

A vglm object. However, this function will not work for all such objects.

beta.range

Numeric. Interval for the numerical search. After a little scaling, it is effectively fed into interval in optimize. Convergence failure may occur if this argument is too wide so it is a good idea to vary this argument. In fact, it is strongly recommended that several values be fed into this argument to help ensure the proper solution is obtained.

tol

Numeric. Fed into tol in optimize.

dointercepts

Logical. Compute the COPS for the intercepts? This should be set to FALSE for models such as propodds and cumulative.

trace.

Logical. Print a running log? This may or may not work properly.

slowtrain

Logical. If TRUE then all columns of a matrix is computed. If FALSE then only one column of a matrix is computed, and this is the only column needed.

...

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

Details

For many models, some COPS values will be Inf or -Inf so that manual checking is needed, for example, poissonff. Each value returned may be effectively that of beta.range or NA. 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 so that the answer should be checked after several values are fed into that argument.

Value

A named vector, similar to coefvlm. If trace. then a list is returned, having a componennt comprising a matrix of function evaluations used by optimize.

Note

This function is experimental and can be made to run more efficiently in the future.

Author(s)

Thomas W. Yee.

References

Yee, T. W. (2024). Musings and new results on the parameter space. Under review.

See Also

hdeff. coefvlm, coef.

Examples

## Not run: data("xs.nz", package = "VGAMdata")
data1 <- na.omit(xs.nz[, c("age", "cancer", "sex")])
fit1 <- vglm(cancer ~ age + sex, binomialff, data1)
cops(fit1)  # 'beta.range' is okay here

## End(Not run)

VGAM documentation built on Sept. 18, 2024, 9:09 a.m.