glmpathcr {glmpathcr} | R Documentation |
Fit Penalized Continuation Ratio Model
Description
This function fits a penalized backward (default) or forward continuation ratio model using the glmpath framework.
Usage
glmpathcr(x, y, data, method="backward", weight = rep(1, n), offset = rep(0, n),
lambda2 = 1e-05, max.steps = 10 * min(n, m), max.norm = 100 * m,
min.lambda = (if (m >= n) 1e-06 else 0), max.vars = Inf, max.arclength = Inf,
frac.arclength = 1, add.newvars = 1, bshoot.threshold = 0.1, relax.lambda = 1e-08,
standardize = TRUE, function.precision = 3e-13, eps = .Machine$double.eps, trace = FALSE,
nopenalty=NULL)
Arguments
x |
a matrix of predictor variables |
y |
ordinal response |
data |
optional; list that includes |
method |
select between fitting a backward (default) versus a forward continuation ratio model |
weight |
an optional vector of weights for observations |
offset |
an optional vector of offset. If a column of |
lambda2 |
regularization parameter for the L2 norm of the coefficients. Default is |
max.steps |
an optional bound for the number of steps to be taken. Default is |
max.norm |
an optional bound for the L1 norm of the coefficients. Default is |
min.lambda |
an optional (lower) bound for the size of |
max.vars |
an optional bound for the number of active variables. Default is |
max.arclength |
an optional bound for arc length (L1 norm) of a step. If |
frac.arclength |
Under the default setting, the next step size is computed so that the active set changes right at the next value of |
add.newvars |
|
bshoot.threshold |
If the absolute value of a coefficient is larger than |
relax.lambda |
A variable joins the active set if |l( |
standardize |
If |
function.precision |
|
eps |
effective zero |
trace |
If |
nopenalty |
a set of indices for the predictors that are not subject to the L1 penalty |
Details
The glmpathcr
function is largely borrowed from the glmpath package and differs only in that (1) the ordinal dataset is first restructured to represent the K-1 conditionally independent likelihoods and (2) the family is specified to be binomial and the nopenalty.subset
is specified to be the thresholds for the ordinal classes.
Value
A glmpathcr
object is returned.
lambda |
vector of |
lambda2 |
|
step.length |
vector of step lengths in |
core |
matrix of l( |
new.df |
vector of degrees of freedom (to be used in the plot function) |
df |
vector of degrees of freedom at each step |
deviance |
vector of deviance computed at each step |
aic |
vector of AIC values from fitted logistic regression on restructured data; use |
bic |
vector of BIC values from fitted logistic regression on restructured data; use |
b.predictor |
matrix of coefficient estimates from the predictor steps |
b.corrector |
matrix of coefficient estimates from the corrector steps |
new.A |
vector of boolean values indicating the steps at which the active set changed (to be used in the plot/predict functions) |
actions |
actions taken at each step |
means |
means of the columns of x |
sdx |
standard deviations of the columns of x |
xnames |
column names of x |
family |
family used |
weight |
weights used |
offset |
offset used |
nopenalty.subset |
nopenalty.subset used |
standardize |
TRUE if the predictors were standardized before fitting |
x |
the matrix of predictor variables used in fitting the model |
y |
the ordinal outcome |
method |
either |
Note
For further details about the fitting algorithm, see the glmpath package.
Author(s)
Kellie J. Archer
References
Ralf Bender and Axel Benner (2000) Calculating ordinal regression models in SAS and S-Plus. Biometrical Journal 42, 677–699.
See Also
See also as predict.glmpathcr
, coef.glmpathcr
Examples
data(diabetes)
x <- diabetes[, 2:dim(diabetes)[2]]
y <- diabetes$y
fit <- glmpathcr(x, y)