Package: rstanarm 2.36.0.9000

Ben Goodrich

rstanarm: Bayesian Applied Regression Modeling via Stan

Estimates previously compiled regression models using the 'rstan' package, which provides the R interface to the Stan C++ library for Bayesian estimation. Users specify models via the customary R syntax with a formula and data.frame plus some additional arguments for priors.

Authors:Jonah Gabry [aut], Imad Ali [ctb], Sam Brilleman [ctb], Jacqueline Buros Novik [ctb], AstraZeneca [ctb], Eren Elci [ctb], Trustees of Columbia University [cph], Simon Wood [cph], R Core Deveopment Team [cph], Douglas Bates [cph], Martin Maechler [cph], Ben Bolker [cph], Steve Walker [cph], Brian Ripley [cph], William Venables [cph], Paul-Christian Burkner [cph], Ben Goodrich [cre, aut]

rstanarm_2.36.0.9000.tar.gz
rstanarm_2.36.0.9000.zip(r-4.5)rstanarm_2.36.0.9000.zip(r-4.4)rstanarm_2.36.0.9000.zip(r-4.3)
rstanarm_2.36.0.9000.tgz(r-4.5-x86_64)rstanarm_2.36.0.9000.tgz(r-4.5-arm64)rstanarm_2.36.0.9000.tgz(r-4.4-x86_64)rstanarm_2.36.0.9000.tgz(r-4.4-arm64)rstanarm_2.36.0.9000.tgz(r-4.3-x86_64)rstanarm_2.36.0.9000.tgz(r-4.3-arm64)
rstanarm_2.36.0.9000.tar.gz(r-4.5-noble)rstanarm_2.36.0.9000.tar.gz(r-4.4-noble)
rstanarm.pdf |rstanarm.html
rstanarm/json (API)
NEWS

# Install 'rstanarm' in R:
install.packages('rstanarm', repos = c('https://stan-dev.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/stan-dev/rstanarm/issues

Pkgdown site:https://mc-stan.org

Uses libs:
  • c++– GNU Standard C++ Library v3
Datasets:
  • bball1970 - Datasets for rstanarm examples
  • bball2006 - Datasets for rstanarm examples
  • bcancer - Datasets for rstanarm examples
  • frail - Datasets for rstanarm examples
  • kidiq - Datasets for rstanarm examples
  • mice - Datasets for rstanarm examples
  • mortality - Datasets for rstanarm examples
  • pbcLong - Datasets for rstanarm examples
  • pbcSurv - Datasets for rstanarm examples
  • radon - Datasets for rstanarm examples
  • roaches - Datasets for rstanarm examples
  • tumors - Datasets for rstanarm examples
  • wells - Datasets for rstanarm examples

On CRAN:

Conda:

bayesianbayesian-data-analysisbayesian-inferencebayesian-methodsbayesian-statisticsmultilevel-modelsrstanrstanarmstanstatistical-modelingcpp

15.70 score 393 stars 13 packages 5.0k scripts 13k downloads 70 mentions 93 exports 117 dependencies

Last updated 18 hours agofrom:5f9a4e43a3 (on survival-rstantools). Checks:1 OK, 8 NOTE, 3 WARNING. Indexed: yes.

TargetResultLatest binary
Doc / VignettesOKMar 19 2025
R-4.5-win-x86_64WARNINGMar 19 2025
R-4.5-mac-x86_64NOTEMar 19 2025
R-4.5-mac-aarch64NOTEMar 19 2025
R-4.5-linux-x86_64NOTEMar 19 2025
R-4.4-win-x86_64WARNINGMar 19 2025
R-4.4-mac-x86_64NOTEMar 19 2025
R-4.4-mac-aarch64NOTEMar 19 2025
R-4.4-linux-x86_64NOTEMar 19 2025
R-4.3-win-x86_64WARNINGMar 19 2025
R-4.3-mac-x86_64NOTEMar 19 2025
R-4.3-mac-aarch64NOTEMar 19 2025

Exports:as_drawsas_draws_arrayas_draws_dfas_draws_listas_draws_matrixas_draws_rvarsbayes_R2cauchycompare_modelsdecovdefault_prior_coefdefault_prior_interceptdirichletexponentialfixefget_survget_xget_yget_zhshs_plusinvlogitkfoldlaplacelassolaunch_shinystanlkjlog_liklogitlooloo_compareloo_linpredloo_model_weightsloo_predictloo_predictive_intervalloo_R2neg_binomial_2ngrpsnormalnsamplespairs_conditionpairs_style_npplot_nonlinearplot_stack_jmposterior_epredposterior_intervalposterior_linpredposterior_predictposterior_survfitposterior_trajposterior_vs_priorpp_checkpp_validatepredictive_errorpredictive_intervalprior_optionsprior_summaryproduct_normalps_checkR2ranefsesigmastan_aovstan_betaregstan_betareg.fitstan_biglmstan_biglm.fitstan_clogitstan_gamm4stan_glmstan_glm.fitstan_glm.nbstan_glmerstan_glmer.nbstan_jmstan_lmstan_lm.fitstan_lm.wfitstan_lmerstan_mvmerstan_nlmerstan_polrstan_polr.fitstan_survstanjm_liststanmvreg_liststanreg_liststudent_tSurvtveVarCorrwaic

Dependencies:abindbackportsbase64encbayesplotBHbootbslibcachemcallrcheckmateclicolorspacecolourpickercommonmarkcpp11crayoncrosstalkdescdigestdistributionaldplyrDTdygraphsevaluatefansifarverfastmapfontawesomefsgenericsggplot2ggridgesgluegridExtragtablegtoolshighrhtmltoolshtmlwidgetshttpuvigraphinlineisobandjquerylibjsonliteknitrlabelinglaterlatticelazyevallifecyclelme4loomagrittrmarkdownMASSMatrixmatrixStatsmemoisemgcvmimeminiUIminqamunsellnlmenloptrnumDerivpillarpkgbuildpkgconfigplyrposteriorprocessxpromisespsQuickJSRR6rappdirsrbibutilsRColorBrewerRcppRcppArmadilloRcppEigenRcppParallelRdpackreformulasreshape2rlangrmarkdownrstanrstantoolssassscalesshinyshinyjsshinystanshinythemessourcetoolssplines2StanHeadersstringistringrsurvivaltensorAthreejstibbletidyselecttinytexutf8vctrsviridisLitewithrxfunxtablextsyamlzoo

Hierarchical Partial Pooling for Repeated Binary Trials

Rendered frompooling.Rmdusingknitr::rmarkdownon Mar 19 2025.

Last update: 2023-09-12
Started: 2016-02-09

How to Use the rstanarm Package

Rendered fromrstanarm.Rmdusingknitr::rmarkdownon Mar 19 2025.

Last update: 2024-04-10
Started: 2015-08-29

MRP with rstanarm

Rendered frommrp.Rmdusingknitr::rmarkdownon Mar 19 2025.

Last update: 2020-01-15
Started: 2019-09-16

Prior Distributions for rstanarm Models

Rendered frompriors.Rmdusingknitr::rmarkdownon Mar 19 2025.

Last update: 2022-03-16
Started: 2017-04-11

Probabilistic A/B Testing with rstanarm

Rendered fromab-testing.Rmdusingknitr::rmarkdownon Mar 19 2025.

Last update: 2022-03-16
Started: 2020-10-15

Estimating ANOVA Models with rstanarm

Rendered fromaov.Rmdusingknitr::rmarkdownon Mar 19 2025.

Last update: 2020-01-15
Started: 2015-08-31

Modeling Rates/Proportions using Beta Regression with rstanarm

Rendered frombetareg.Rmdusingknitr::rmarkdownon Mar 19 2025.

Last update: 2020-01-15
Started: 2016-12-31

Estimating Generalized Linear Models for Binary and Binomial Data with rstanarm

Rendered frombinomial.Rmdusingknitr::rmarkdownon Mar 19 2025.

Last update: 2020-07-08
Started: 2015-09-03

Estimating Generalized Linear Models for Continuous Data with rstanarm

Rendered fromcontinuous.Rmdusingknitr::rmarkdownon Mar 19 2025.

Last update: 2024-06-05
Started: 2015-12-07

Estimating Generalized Linear Models for Count Data with rstanarm

Rendered fromcount.Rmdusingknitr::rmarkdownon Mar 19 2025.

Last update: 2024-06-05
Started: 2015-09-04

Estimating Generalized (Non-)Linear Models with Group-Specific Terms with rstanarm

Rendered fromglmer.Rmdusingknitr::rmarkdownon Mar 19 2025.

Last update: 2021-05-07
Started: 2016-01-08

Estimating Joint Models for Longitudinal and Time-to-Event Data with rstanarm

Rendered fromjm.Rmdusingknitr::rmarkdownon Mar 19 2025.

Last update: 2022-03-16
Started: 2017-11-11

Estimating Regularized Linear Models with rstanarm

Rendered fromlm.Rmdusingknitr::rmarkdownon Mar 19 2025.

Last update: 2020-01-15
Started: 2015-08-30

Estimating Ordinal Regression Models with rstanarm

Rendered frompolr.Rmdusingknitr::rmarkdownon Mar 19 2025.

Last update: 2020-01-15
Started: 2015-09-02

Estimating Survival (Time-to-Event) Models with rstanarm

Rendered fromsurv.Rmdusingknitr::rmarkdownon Mar 19 2025.

Last update: 2025-03-19
Started: 2025-03-19

Readme and manuals

Help Manual

Help pageTopics
Applied Regression Modeling via RStanrstanarm-package rstanarm
'adapt_delta': Target average acceptance probabilityadapt_delta
Extract the posterior sampleas.array.stanreg as.data.frame.stanreg as.matrix.stanreg
Estimation algorithms available for 'rstanarm' modelsavailable-algorithms
Modeling functions available in 'rstanarm'available-models
Compute a Bayesian version of R-squared or LOO-adjusted R-squared for regression models.bayes_R2 bayes_R2.stanreg loo_R2 loo_R2.stanreg
Example joint longitudinal and time-to-event modelexample_jm
Example modelexample_model
K-fold cross-validationkfold kfold.stanreg
Using the ShinyStan GUI with rstanarm modelslaunch_shinystan launch_shinystan.stanreg
Pointwise log-likelihood matrixlog_lik log_lik.stanjm log_lik.stanmvreg log_lik.stanreg
Logit and inverse logitinvlogit logit
Compute weighted expectations using LOOloo_linpred loo_linpred.stanreg loo_predict loo_predict.stanreg loo_predictive_interval loo_predictive_interval.stanreg
Information criteria and cross-validationcompare_models loo loo.stanreg loo_compare loo_compare.stanreg loo_compare.stanreg_list loo_model_weights loo_model_weights.stanreg_list waic waic.stanreg
Family function for negative binomial GLMsneg_binomial_2
Methods for stanreg objectscoef.stanreg confint.stanreg fitted.stanreg fixef fixef.stanreg ngrps ngrps.stanreg nobs.stanmvreg nobs.stanreg nsamples nsamples.stanreg ranef ranef.stanreg residuals.stanreg se.stanreg sigma sigma.stanreg stanreg-methods update.stanreg VarCorr VarCorr.stanreg vcov.stanreg
Pairs method for stanreg objectspairs.stanreg pairs_condition pairs_style_np
Plot the estimated subject-specific or marginal longitudinal trajectoryplot.predict.stanjm
Plot method for stanreg objectsplot.stanreg plot.stansurv
Plot the estimated subject-specific or marginal survival functionplot.survfit.stanjm plot.survfit.stansurv plot_stack_jm
Posterior uncertainty intervalsposterior_interval posterior_interval.stanreg
Posterior distribution of the (possibly transformed) linear predictorposterior_epred posterior_epred.stanreg posterior_linpred posterior_linpred.stanreg
Draw from posterior predictive distributionposterior_predict posterior_predict.stanmvreg posterior_predict.stanreg
Posterior predictions for survival modelsposterior_survfit posterior_survfit.stanjm posterior_survfit.stansurv
Estimate the subject-specific or marginal longitudinal trajectoryposterior_traj
Juxtapose prior and posteriorposterior_vs_prior posterior_vs_prior.stanreg
Graphical posterior predictive checkspp_check pp_check.stanreg
Model validation via simulationpp_validate
Predict method for stanreg objectspredict.stanreg
In-sample or out-of-sample predictive errorspredictive_error predictive_error.matrix predictive_error.ppd predictive_error.stanreg
Predictive intervalspredictive_interval predictive_interval.matrix predictive_interval.ppd predictive_interval.stanreg
Print method for stanreg objectsprint.stanmvreg print.stanreg
Summarize the priors used for an rstanarm modelprior_summary prior_summary.stanreg
Prior distributions and optionscauchy decov default_prior_coef default_prior_intercept dirichlet exponential hs hs_plus laplace lasso lkj normal priors product_normal R2 student_t
Graphical checks of the estimated survival functionps_check
The 'QR' argumentQR-argument
Datasets for rstanarm examplesbball1970 bball2006 bcancer frail kidiq mice mortality pbcLong pbcSurv radon roaches rstanarm-datasets tumors wells
Deprecated functionsprior_options rstanarm-deprecated
Bayesian regularized linear models via Stanstan_aov stan_lm stan_lm.fit stan_lm.wfit
Bayesian beta regression models via Stanstan_betareg stan_betareg.fit
Bayesian regularized linear but big models via Stanstan_biglm stan_biglm.fit
Conditional logistic (clogit) regression models via Stanstan_clogit
Bayesian generalized linear additive models with optional group-specific terms via Stanplot_nonlinear stan_gamm4
Bayesian generalized linear models via Stanstan_glm stan_glm.fit stan_glm.nb
Bayesian generalized linear models with group-specific terms via Stanstan_glmer stan_glmer.nb stan_lmer
Bayesian joint longitudinal and time-to-event models via Stanstan_jm
Bayesian multivariate generalized linear models with correlated group-specific terms via Stanstan_mvmer
Bayesian nonlinear models with group-specific terms via Stanstan_nlmer
Bayesian ordinal regression models via Stanstan_polr stan_polr.fit
Bayesian survival models via Stanstan_surv
Methods for stanmvreg objectscoef.stanmvreg fitted.stanmvreg fixef.stanmvreg formula.stanmvreg ngrps.stanmvreg ranef.stanmvreg residuals.stanmvreg se.stanmvreg sigma.stanmvreg stanmvreg-methods update.stanjm update.stanmvreg
Create lists of fitted model objects, combine them, or append new models to existing lists of models.print.stanreg_list stanjm_list stanmvreg_list stanreg_list
Create a 'draws' object from a 'stanreg' objectas_draws as_draws.stanreg as_draws_array as_draws_array.stanreg as_draws_df as_draws_df.stanreg as_draws_list as_draws_list.stanreg as_draws_matrix as_draws_matrix.stanreg as_draws_rvars as_draws_rvars.stanreg stanreg-draws-formats
Fitted model objectsstanreg-objects
Summary method for stanreg objectsas.data.frame.summary.stanreg print.summary.stanmvreg print.summary.stanreg summary.stanmvreg summary.stanreg
Time-varying effects in Bayesian survival modelstve