lrm.fit | R Documentation |
Fits a binary or ordinal logistic model for a given design matrix and response vector with no missing values in either. Ordinary or penalized maximum likelihood estimation is used.
lrm.fit(x, y, offset=0, initial, est, maxit=12, eps=.025,
tol=1e-7, trace=FALSE, penalty.matrix=NULL, weights=NULL,
normwt=FALSE, scale=FALSE)
x |
design matrix with no column for an intercept |
y |
response vector, numeric, categorical, or character |
offset |
optional numeric vector containing an offset on the logit scale |
initial |
vector of initial parameter estimates, beginning with the intercept |
est |
indexes of |
maxit |
maximum no. iterations (default= |
eps |
difference in |
tol |
Singularity criterion. Default is 1e-7 |
trace |
set to |
penalty.matrix |
a self-contained ready-to-use penalty matrix - see |
weights |
a vector (same length as |
normwt |
set to |
scale |
set to |
a list with the following components:
call |
calling expression |
freq |
table of frequencies for |
stats |
vector with the following elements: number of observations used in the
fit, maximum absolute value of first
derivative of log likelihood, model likelihood ratio chi-square, d.f.,
P-value,
|
fail |
set to |
coefficients |
estimated parameters |
var |
estimated variance-covariance matrix (inverse of information matrix).
Note that in the case of penalized estimation, |
u |
vector of first derivatives of log-likelihood |
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. |
est |
vector of column numbers of |
non.slopes |
number of intercepts in model |
penalty.matrix |
see above |
Frank Harrell
Department of Biostatistics, Vanderbilt University
fh@fharrell.com
lrm
, glm
, matinv
,
solvet
, cr.setup
, gIndex
#Fit an additive logistic model containing numeric predictors age,
#blood.pressure, and sex, assumed to be already properly coded and
#transformed
#
# fit <- lrm.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.