| recession_cone | R Documentation |
This function calculates the dimension of the recession cone and returns the recession cone.
recession_cone(object, ...)
## Default S3 method:
recession_cone(object, ...)
## S3 method for class 'factor'
recession_cone(object, X, model = NULL, rational = FALSE, ...)
## S3 method for class 'character'
recession_cone(object, X, model = NULL, rational = FALSE, ...)
## S3 method for class 'logical'
recession_cone(object, X, model = NULL, rational = FALSE, ...)
## S3 method for class 'numeric'
recession_cone(object, X, model = NULL, rational = FALSE, ...)
## S3 method for class 'integer'
recession_cone(object, X, model = NULL, rational = FALSE, ...)
## S3 method for class 'matrix'
recession_cone(object, rational = FALSE, ...)
## S3 method for class 'formula'
recession_cone(
object,
data,
model = NULL,
rational = FALSE,
contrasts = NULL,
...
)
## S3 method for class 'osm'
recession_cone(object, rational = FALSE, ...)
## S3 method for class 'clm'
recession_cone(object, rational = FALSE, ...)
## S3 method for class 'polr'
recession_cone(object, rational = FALSE, ...)
## S3 method for class 'multinom'
recession_cone(object, rational = FALSE, ...)
## S3 method for class 'glm'
recession_cone(object, rational = FALSE, ...)
## S3 method for class 'bracl'
recession_cone(object, rational = FALSE, ...)
## S3 method for class 'brmultinom'
recession_cone(object, rational = FALSE, ...)
object |
an R object. Supported inputs:
|
... |
further arguments passed to the methods or lower-level functions. |
X |
a design matrix, e.g. generated via a call to
|
model |
character string specifying the model class to be fitted. One of:
If missing or |
rational |
logical; should rational arithmetic be used. |
data |
either a standard data frame, list or environment (or object
coercible by Alternatively, |
contrasts |
an optional list. See the |
Note that in case of non full column rank, the 'reccdim' value is the dimension of the recession cone due to separation plus the number of columns that are linear dependent.
The formula method is for standard data frames and formulas that
work the same way as when used with glm. It does
not support extended formulas, and may not work for functions that do
formula processing differently.
For a data frame or matrix given as rational numbers in the rcdd definition, this is recognized but the formula does not get expanded and is taken literally. Consequently:
variables in formula must match exactly with the column
names in data;
factors need to be converted to dummies beforehand (which would not be possible in the rational format in any other way anyway).
A list with the components:
cone being the recession cone,
reccdim being the dimensions of the recession cone
index the row index of the structure vectors that are not linearities.
For model = "sl" 'cone' is the recession cone over all categories, 'reccdim' the dimension of the largest recession cone of any category and 'index' the row index of the structure vectors that are not linearities over all categories.
## Binary data
data(csepdat1)
outc<-csepdat1$y
desma<-cbind("(Intercept)"=1,csepdat1[,2:ncol(csepdat1)])
recession_cone(outc, X = desma, model = "b")
# Nominal data
# Baseline-category link
data(qcsepdatm)
y<-qcsepdatm$y
X<-cbind(1,qcsepdatm[,2:ncol(qcsepdatm)])
recession_cone(y, X = X, model = "bcl")
# Ordinal data
data(qcsepdato)
yo<-qcsepdato$y
Xo<-qcsepdato[,2:ncol(qcsepdato)]
# Sequential link
recession_cone(yo, Xo, model = "sl")
# Ordered stereotype
recession_cone(yo, Xo, model = "os")
# Adjacent-category link
recession_cone(yo, Xo, model= "acl")
# Cumulative link
recession_cone(yo, Xo, model = "cl")
# post fit
if (require('ordinal')) {
m1 <- ordinal::clm(y~x1+x2, data = qcsepdato)
recession_cone(m1)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.