orm.fit | R Documentation |
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, y.precision = 7)
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 ( |
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 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 |
y.precision |
When ‘y’ is numeric, values may need to be rounded
to avoid unpredictable behavior with |
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
orm
, lrm
, glm
,
gIndex
, solve
#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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.