Learn R Programming

rms (version 4.1-3)

orm.fit: Ordinal Regression Model Fitter

Description

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.

Usage

orm.fit(x=NULL, y, family='logistic',
        offset=0., initial,  maxit=12L, eps=.005, tol=1e-7, trace=FALSE,
        penalty.matrix=NULL)

Arguments

x
design matrix with no column for an intercept
y
response vector, numeric, factor, or character. The ordering of levels is assumed from factor(y).
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 f
offset
optional numeric vector containing an offset on the logit scale
initial
vector of initial parameter estimates, beginning with the intercepts. If initial is not specified, the function computes the overall score $\chi^2$ test for the global null hypothesis of no regression.
maxit
maximum no. iterations (default=12).
eps
difference in $-2 log$ likelihood for declaring convergence. Default is .005. If the $-2 log$ likelihood gets worse by eps/10 while the maximum absolute first derivative of -2 log likelihood is below 1E-9, convergence is still declared. Thi
tol
Singularity criterion. Default is 1e-7
trace
set to TRUE to print -2 log likelihood, step-halving fraction, change in -2 log likelihood, and maximum absolute value of first derivative at each iteration.
penalty.matrix
a self-contained ready-to-use penalty matrix - seelrm

Value

  • a list with the following components:
  • callcalling expression
  • freqtable of frequencies for y in order of increasing y
  • yuniquevector of sorted unique values of y
  • statsvector with the following elements: number of observations used in the fit, number of unique y values, median y from among the observations used in the fit, maximum absolute value of first derivative of log likelihood, model likelihood ratio chi-square, d.f., P-value, score chi-square and its P-value, Spearman's $\rho$ rank correlation between linear predictor and y, the Nagelkerke $R^2$ index, the $g$-index, $gr$ (the $g$-index on the ratio scale), and $pdm$ (the mean absolute difference between 0.5 and the estimated probability that $y\geq$ the marginal median). When penalty.matrix is present, the $\chi^2$, d.f., and P-value are not corrected for the effective d.f.
  • failset to TRUE if convergence failed (and maxiter>1)
  • coefficientsestimated parameters
  • varestimated variance-covariance matrix (inverse of information matrix). Note that in the case of penalized estimation, var is not the improved sandwich-type estimator (which lrm does compute). The only intercept parameter included in the stored object is the middle intercept.
  • family, transsee orm
  • 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.slopesnumber of intercepts in model
  • interceptRefthe index of the middle (median) intercept used in computing the linear predictor and var
  • linear.predictorsthe linear predictor using the first intercept
  • penalty.matrixsee above
  • info.matrixsee orm

concept

logistic regression model

See Also

orm, lrm, glm, gIndex, solve

Examples

Run this code
#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)

Run the code above in your browser using DataLab