R rms Package


Frank Harrell


August 27, 2023

Regression Modeling Strategies


rms 6.7-0 appeared on CRAN 2023-05-08 and represents a major update. The most significant new feature is automatically computing all likelihood ratio (LR) \(\chi^2\) chunk test statistics that can be inferred from the model design when the model is fitted using lrm, orm, psm, cph, Glm. I’ve been meaning to do this for more than 10 years because LR tests are more accurate than the default anova.rms Wald tests. LR tests do not suffer from the Hauck-Donner effect when a predictor has an infinite regression coefficient that drives the Wald \(\chi^2\) to zero because the standard error blows up.

An example of a full LR anova is here.

Also new is the implementation of LR tests when doing multiple imputation, using the method of Chan and Meng. This uses a new feature in Hmisc:fit.mult.impute where besides testing on individual completed datasets the log likelihood is computed from a stacked dataset of all completed datasets. Specifying lrt=TRUE to fit.mult.impute will take the necessary actions to get LR tests with processMI including setting argument method to 'stack' which makes final regression coefficient estimates come from a single fit of a stacked dataset.

There are new rms functions or options relating to this:

  • LRupdate: update LR test-related stats after processMI is run (including pseudo \(R^2\) measures)
  • processMI.fit.mult.impute: added processing of anova result from fit.mult.impute(..., lrt=TRUE)
  • prmiInfo: print (or html) inputation parameters on the result of processMI(..., 'anova')

This new rms requires installing the latest Hmisc from CRAN.

Documentation | CRAN | GitHub | Online


rms is an R package that is a replacement for the Design package. The package accompanies FE Harrell’s book Regression Modeling Strategies. It began in 1991 as the S-Plus Design package.

Bug Reports

Please use Issues on GitHub.