Returns a vector similar to coefs() comprising the centre of the parameter space (COPS) values, given a fitted VGLM regression.
cops(object, ...)
copsvglm(object, beta.range = c(-5, 6),
tol = .Machine$double.eps^0.25,
dointercepts = TRUE, trace. = FALSE,
slowtrain = FALSE, ...)
A named vector, similar to coefvlm
.
If trace.
then a list is returned,
having a componennt comprising a
matrix of function evaluations used by
A vglm
object.
However, this function will not work for all
such objects.
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.
Numeric.
Fed into tol
in
optimize
.
Logical.
Compute the COPS for the intercepts?
This should be set to FALSE
for models such as
propodds
and
cumulative
.
Logical. Print a running log? This may or may not work properly.
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.
Thomas W. Yee.
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.
Yee, T. W. (2024). Musings and new results on the parameter space. Under review.
hdeff
.
coefvlm
,
coef
.
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) # 'beta.range' is okay here
Run the code above in your browser using DataLab