cops {VGAM} | R 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 |
beta.range |
Numeric.
Interval for the numerical search.
After a little scaling, it is effectively
fed into |
tol |
Numeric.
Fed into |
dointercepts |
Logical.
Compute the COPS for the intercepts?
This should be set to |
trace. |
Logical. Print a running log? This may or may not work properly. |
slowtrain |
Logical.
If |
... |
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
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)