R rmsb Package

Author

Frank Harrell

Published

March 15, 2024

Bayesian Regression Modeling Strategies

News

rmsb package news for the current version on CRAN is here.

Version 1.1-0 appeared on CRAN on 2024-03-12. The major change in this version was to remove the keepsep argument, make pcontrast (priors through contrasts) apply only to the proportional odds portion of the model, and addition of npcontrast where the user specifies contrasts and prior means and standard deviations for them that pertain to departures from proportional odds. As an example suppose that Y is continuous with a range of 10-90 and a treatment effect (Tx) that has a non-proportional odds effect on the logit scale that is proportion to \(\sqrt{y}\). If Tx is coded as A, B, and the prior standard deviation (here 0.2) is meant to apply to a treatment effect over Y=10 to Y=90, the code would be

npc <- list(sd=0.2 / (sqrt(90) - sqrt(10)),
            c1=list(Tx='B'), c2=list(Tx='A'), contrast=expression(c1 - c2))
f <- blrm(y ~ Tx + age, ~ Tx, cppo=sqrt, npcontrast=npc)

Overview

The existing version of the rmsb package on CRAN uses rstan as the interface to Stan. Version 1.0.0 of rmsb also supports cmdstan through the cmdstanr package. Using cmdstan allows you to use the latest features of Stan and is more robust so is recommended. Support for rstan may be removed in the future. To use cmdstan you must install the non-CRAN cmdstanr package and the cmdstan system executable package. For the latter it is recommended that Windows users install the precompiled system package using conda as described in the link, and that Linux and Mac users use a direct installation also described there, which makes use of your system’s C++ compiler. For Windows, install miniconda which is then called with the conda command to download and install cmdstan. This can be used by Linux and Mac users if preferred. But for all systems conda has a huge overhead in disk space.

For a new approach for installing cmdstanr see this.

Documentation | CRAN | GitHub | Online

Q&A

Latest Package Files

Bug Reports

Please use Issues on GitHub.