[R-pkgs] New package: rms

Frank E Harrell Jr f.harrell at vanderbilt.edu
Tue Sep 8 15:19:36 CEST 2009

This is to announce a new package rms on CRAN.  rms goes along with my 
book Regression Modeling Strategies.  The home page for rms is 
http://biostat.mc.vanderbilt.edu/rms, or go directly to 
http://biostat.mc.vanderbilt.edu/Rrms for information just about the 

rms is a re-write of the Design package that has improved graphics and 
that duplicates very little code in the survival package.  In 
particular, rms does not use low-level C language interfaces to other 
packages and will be easier to maintain.  rms also interfaces to 
quantile regression (new Rq function), and interfaces to glm and gls 
have been renamed Glm and Gls.  rms requires the latest version of Hmisc 
on CRAN.

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.

The most visable change for 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. Note that 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.  plot.Predict allows you to specify a lattice formula 
(less the left hand side) if you don't like plot.Predict's choice of 
superpositioning and panel variables.

The following outlines the most significant change users will need to 
make (the web page contains the complete list).  Note that the 
convention used for getting predictions over the default range is now 
predictor=. rather than predictor=NA.

require(rms)  # instead of Design; loads Hmisc and survival
plot(fit, x1=NA, x2=NA, ...) changed to
  p <- Predict(fit, x1=., x2=., ...)
  plot(p)          # ?plot.Predict for details; produces a lattice object
  plot(Predict(fit, ...))
  print(plot(p))   # needed if using Sweave or are inside { }

  plot(fit, .., method='image' or 'contour' or 'persp') changed to
  p <- Predict(..., np=50)   # type ?Predict for details
  bplot(p, method=)   # ?bplot for details; uses base graphics

The nomogram function now has a plot method so nomogram() by itself does 
not plot.

Type ?rmsOverview for an overview and extensive examples.  The package's 
home page contains a reference card you can print.

Frank E Harrell Jr   Professor and Chair           School of Medicine
                      Department of Biostatistics   Vanderbilt University

More information about the R-packages mailing list