ko.ordinal {kosel} | R Documentation |
Statistics of the knockoffs procedure for ordinalNet regression models.
Description
Returns the vector of statistics W of the revisited knockoffs procedure for regressions available in the R package ordinalNet
. Most of the parameters come from ordinalNet()
. See ordinalNet
documentation for more details.
Usage
ko.ordinal(x, y, family = "cumulative", reverse = FALSE,
link = "logit", alpha = 1, parallelTerms = TRUE,
nonparallelTerms = FALSE, nVal = 100, warn = FALSE,
random = FALSE)
Arguments
x |
Covariate matrix, of dimension nobs x nvars; each row is an observation vector. It is recommended that categorical covariates are converted to a set of indicator variables with a variable for each category (i.e. no baseline category); otherwise the choice of baseline category will affect the model fit. |
y |
Response variable. Can be a factor, ordered factor, or a matrix where each row is a multinomial vector of counts. A weighted fit can be obtained using the matrix option, since the row sums are essentially observation weights. Non-integer matrix entries are allowed. |
family |
Specifies the type of model family. Options are "cumulative" for cumulative probability, "sratio" for stopping ratio, "cratio" for continuation ratio, and "acat" for adjacent category. |
reverse |
Logical. If TRUE, then the "backward" form of the model is fit, i.e. the model is defined with response categories in reverse order. For example, the reverse cumulative model with K+1 response categories applies the link function to the cumulative probabilities P(Y >= 2), …, P(Y >= K+1), rather then P(Y <= 1), …, P(Y <= K). |
link |
Specifies the link function. The options supported are logit, probit, complementary log-log, and cauchit. |
alpha |
The elastic net mixing parameter, with |
parallelTerms |
Logical. If |
nonparallelTerms |
Logical. if |
nVal |
Length of lambda sequence - default is 100. |
warn |
Logical. If |
random |
If |
Value
A vector of dimension nvars corresponding to the statistics W.
Note
nonparallelTerms = TRUE
is highly discouraged because the knockoffs procedure does not suit well to this setting.
See Also
Examples
# see ko.sel