cops | R Documentation |
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, ...)
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. |
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.
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
.
This function is experimental and can be made to run more efficiently in the future.
Thomas W. Yee.
Yee, T. W. (2024). Musings and new results on the parameter space. Under review.
hdeff
.
coefvlm
,
coef
.
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.