Ordinal Regression Model Fitter
Fits ordinal cumulative probability models for continuous or ordinal response variables, efficiently allowing for a large number of intercepts by capitalizing on the information matrix being sparse. Five different distribution functions are implemented, with the default being the logistic (yielding the proportional odds model). Penalized estimation will be implemented in the future. Weights are not implemented. The optimization method is Newton-Raphson with step-halving. Execution time is linear in the number of intercepts.
orm.fit(x=NULL, y, family='logistic', offset=0., initial, maxit=12L, eps=.005, tol=1e-7, trace=FALSE, penalty.matrix=NULL, scale=FALSE)
x |
design matrix with no column for an intercept |
y |
response vector, numeric, factor, or character. The ordering of levels
is assumed from |
family |
the distribution family, corresponding to logistic (the
default), Gaussian, Cauchy, Gumbel maximum (exp(-exp(-x));
extreme value type I), and Gumbel minimum
(1-exp(-exp(x))) distributions. These are the cumulative
distribution functions assumed for Prob[Y ≥ y | X]. The
|
offset |
optional numeric vector containing an offset on the logit scale |
initial |
vector of initial parameter estimates, beginning with the
intercepts. If |
maxit |
maximum no. iterations (default= |
eps |
difference in -2 log likelihood for declaring convergence.
Default is -2 log likelihood is below 1E-9, convergence is still declared. This handles the case where the initial estimates are MLEs, to prevent endless step-halving. |
tol |
Singularity criterion. Default is 1e-7 |
trace |
set to |
penalty.matrix |
a self-contained ready-to-use penalty matrix - see |
scale |
set to |
a list with the following components:
call |
calling expression |
freq |
table of frequencies for |
yunique |
vector of sorted unique values of |
stats |
vector with the following elements: number of observations used in the
fit, number of unique |
fail |
set to |
coefficients |
estimated parameters |
var |
estimated variance-covariance matrix (inverse of information matrix).
Note that in the case of penalized estimation, |
family, trans |
see |
deviance |
-2 log likelihoods. When an offset variable is present, three deviances are computed: for intercept(s) only, for intercepts+offset, and for intercepts+offset+predictors. When there is no offset variable, the vector contains deviances for the intercept(s)-only model and the model with intercept(s) and predictors. |
non.slopes |
number of intercepts in model |
interceptRef |
the index of the middle (median) intercept used in
computing the linear predictor and |
linear.predictors |
the linear predictor using the first intercept |
penalty.matrix |
see above |
info.matrix |
see |
Frank Harrell
Department of Biostatistics, Vanderbilt University
fh@fharrell.com
#Fit an additive logistic model containing numeric predictors age, #blood.pressure, and sex, assumed to be already properly coded and #transformed # # fit <- orm.fit(cbind(age,blood.pressure,sex), death)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.