Documentation | CRAN
Evolution
rms is an R package that is a replacement for the
Design package. The package accompanies
FE Harrell's book
Regression Modeling Strategies.
rms does not use any C level
interfaces to other packages as
Design did to the
survival package. Thus
rms will be easier to maintain.
rms has cleaned up graphics routines to make them more modular, to use
lattice graphics, and to make it easier
to use
ggplot2 graphics. Defaults for confidence bands are now gray scale-shaded polygons.
User-Visable Changes
The most visable change to the user is the replacement of the
plot.Design function with the
Predict,
plot.Predict, and
bplot
functions.
plot.Predict is used for bivariate graphics (using
lattice), and
bplot is used for 3-d graphics using base graphics functions
image,
contour, and
persp. Multi-panel
lattice graphics are usually better than 3-d graphics for showing the effects of multiple
predictors varying simultaneously. The output of
Predict is suitable for direct use by
lattice (e.g., the
xyplot function) and
ggplot2 if you don't want to use
plot.Predict.
rms also implements a high-level interface to the
quantreg package through the new
Rq function for quantile regression.
Example Changes Needed for Plotting Predicted Values
plot(fit, x1=NA, x2=NA, ...) changed to
p <- Predict(fit, x1=., x2=., ...)
plot(p) # ?plot.Predict for details; produces a lattice object
print(plot(p)) # needed if using Sweave or are inside { }
plot(p, ~ x1 | x2)
plot(p, ~ x1 | groups='x2')
plot(fit, .., method='image' or 'contour' or 'persp') changed to
p <- Predict(..., np=50) # type ?Predict for details
bplot(p, ...) # ?bplot for details; uses base graphics
-
datadensity is no longer a separate function to use after the predictions are plotted; the user specifies data= to plot.Predict to get a rug plot, for example.
-
Legend was changed to iLegend
-
nomogram does not plot by default. You must use plot(nomogram result) to plot, and the plotting arguments are separated into the arguments for plot.nomogram.
-
survplot defaults to conf='bands' and this now produces shaded confidence bands instead of bands made by pairs of lines
-
Varcov is changed to the more R-base concordant vcov
-
glmD is renamed Glm
-
glsD is renamed Gls
-
Rq allows fitting of quantile regression models with the full complement of rms capabilities including restricted cubic splines for covariates, restricted interaction surfaces, effect plots, bootstrap covariance estimation, and nomograms
Other Changes
Less visible to the user are the following changes:
- Removed all uses of
single() or storage.mode 'single'
- Removed all use of
.newSurvival
-
predictDesign changed to predictrms, added ref.zero argument
- There is no longer a generic
nomogram function, so nomogram.Design was renamed nomogram
To Do
- When bug fixed in survfit.coxph.null remove n.all stuff
- After
Hmisc is updated, makeSteps can be removed from rmsMisc.s and from rms-internal.Rd
Changes for Version 2.1-0
- Made Predict not return invisibly if predictors not specified
- New option nlines for plot.Predict for getting line plots with 2 categorical predictors
- Added rename option to rbind.Predict to handle case where predictor name has changed between models
- Added ties=mean to approx( ) calls that did not have ties= specified
- Added nlevels argument to bplot to pass to contour
- Added par argument to iLegend - list to pass to par().
- Redirected ... argument to iLegend to image( ).
- Fixed groupkm - was printing warning messages wrongly
- Added new semiparametric survival prediction calibration curve method in val.surv for external validation; this is the first implementation of smooth calibration curves for survival probability validation with right-censored data
- Fixed calibrate confidence limits from groupkm
- Added smooth calibration curve using hare (polspline package) for calibrate.cph and calibrate.psm
- Added display of predicted risks for cph and psm models even for the stratified KM method (old default)
- Syllabus for a 3-day short course on the
rms package and associated statistical methodology.
- Datasets for use in learning how to use
Hmisc, rms, logistic regression, survival analysis, ordinary regression, penalized estimation, missing value imputation, data reduction, etc. (R save() formats)
- An Introduction to S and the Hmisc and Design Packages; CF Alzola and FE Harrell (308 pages, PDF, 2004). For a list of recent changes to this document click here.
- Examples of use of rms functions
Go to the home page for the text REGRESSION MODELING STRATEGIES
Bug Reports
Please see the bug reporting
page