| diagsep_osm | R Documentation |
This function checks whether there is (quasi-) complete separation, which type if any, gives the dimension of the recession cone, lists the number of columns in the design matrix that give rise to the separation as well as the columns names and lists the rows in X for which we have separation.
diagsep_osm(y, X, rational = FALSE, backend = c("rcdd", "ROI"), solver = NULL)
y |
the ordinal outcome variable. Works best if it is an ordered factor but can also be numeric, boolean or character. In the latter case we coerce to ordered factor interpret the ordering as alphanumerically increasing (just like 'as.ordered' is doing). |
X |
a design matrix, e.g. generated via a call to 'model.matrix'. This means we expect that X already contains the desired contrasts for factors (e.g., dummies) and any other expanded columns (e.g., for polynomials). |
rational |
should rational arithemtic be used? |
backend |
which backend to use for the linear program. Can be "rcdd" (default and only option for rational=TRUE) or "ROI". |
solver |
the solver to be used in the backend. Defaults to "DualSimplex" for "rcdd" and the first LP solver returned by 'ROI_applicable_solver()' for "ROI". |
an object of class 'sepmod' that is a list with the components:
separation boolean whether there is separation ('TRUE' means separation)
septype which type of separation (or not). A string of either "Overlap", "Quasi-Complete Separation" or "Complete Separation".
reccdim dimension of recession cone
offrows offending rows in X, the ones which are not linearities (note that individual observations can be duplicated in the cone as they may lie on the boundary)
nr.offcols number of columns of the design matrix that have separation
offcols columns of the design matrix that have separation. It is given as category::effect.
data(qcsepdato)
y<-qcsepdato$y
X<-qcsepdato[,2:ncol(qcsepdato)]
diagsep_osm(y,X)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.