Package: rstanarm 2.32.2
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:
rstanarm_2.32.2.tar.gz
rstanarm_2.32.2.zip(r-4.6)rstanarm_2.32.2.zip(r-4.5)rstanarm_2.32.2.zip(r-4.4)
rstanarm_2.32.2.tgz(r-4.5-x86_64)rstanarm_2.32.2.tgz(r-4.5-arm64)rstanarm_2.32.2.tgz(r-4.4-x86_64)rstanarm_2.32.2.tgz(r-4.4-arm64)
rstanarm_2.32.2.tar.gz(r-4.6-arm64)rstanarm_2.32.2.tar.gz(r-4.6-x86_64)rstanarm_2.32.2.tar.gz(r-4.5-arm64)rstanarm_2.32.2.tar.gz(r-4.5-x86_64)
rstanarm.pdf |rstanarm.html✨
rstanarm/json (API)
NEWS
| # Install 'rstanarm' in R: |
| install.packages('rstanarm', repos = c('https://community.r-multiverse.org', 'https://cloud.r-project.org')) |
Bug tracker:https://github.com/stan-dev/rstanarm/issues
Pkgdown/docs site:https://mc-stan.org
- bball1970 - Datasets for rstanarm examples
- bball2006 - Datasets for rstanarm examples
- kidiq - 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
bayesianbayesian-data-analysisbayesian-inferencebayesian-methodsbayesian-statisticsmultilevel-modelsrstanrstanarmstanstatistical-modelingcpp
Last updated from:aabb521eeb (on v2.32.2). Checks:9 OK, 3 NOTE, 1 FAIL. Indexed: no.
| Target | Result | Total time | Artifact |
|---|---|---|---|
| linux-devel-arm64 | OK | 982 | |
| linux-devel-x86_64 | OK | 1021 | |
| source / vignettes | OK | 1584 | |
| linux-release-arm64 | OK | 1013 | |
| linux-release-x86_64 | OK | 1007 | |
| macos-release-arm64 | OK | 778 | |
| macos-release-x86_64 | OK | 1688 | |
| macos-oldrel-arm64 | NOTE | 1076 | |
| macos-oldrel-x86_64 | NOTE | 1582 | |
| windows-devel | OK | 1530 | |
| windows-release | OK | 1461 | |
| windows-oldrel | NOTE | 1380 | |
| wasm-release | FAIL | 187 |
Exports:as_drawsas_draws_arrayas_draws_dfas_draws_listas_draws_matrixas_draws_rvarsbayes_R2cauchycompare_modelsdecovdefault_prior_coefdefault_prior_interceptdirichletexponentialfixefget_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.fitstanjm_liststanmvreg_liststanreg_liststudent_tSurvVarCorrwaic
Dependencies:abindbackportsbase64encbayesplotBHbootbslibcachemcallrcheckmateclicolourpickercommonmarkcpp11crosstalkdescdigestdistributionaldplyrDTdygraphsevaluatefarverfastmapfontawesomefsgenericsggplot2ggridgesgluegridExtragtablegtoolshighrhtmltoolshtmlwidgetshttpuvigraphinlineisobandjquerylibjsonliteknitrlabelinglaterlatticelazyevallifecyclelitedownlme4loomagrittrmarkdownMASSMatrixmatrixStatsmemoisemimeminiUIminqanlmenloptrnumDerivpillarpkgbuildpkgconfigplyrposteriorprocessxpromisespspurrrQuickJSRR6rappdirsrbibutilsRColorBrewerRcppRcppEigenRcppParallelRdpackreformulasreshape2rlangrmarkdownrstanrstantoolsS7sassscalesshinyshinyjsshinystanshinythemessourcetoolsStanHeadersstringistringrsurvivaltensorAthreejstibbletidyrtidyselecttinytexutf8vctrsviridisLitewithrxfunxtablextsyamlzoo
Hierarchical Partial Pooling for Repeated Binary Trials
Rendered frompooling.Rmdusingknitr::rmarkdownon Oct 15 2025.Last update: 2025-09-29
Started: 2016-02-09
How to Use the rstanarm Package
Rendered fromrstanarm.Rmdusingknitr::rmarkdownon Oct 15 2025.Last update: 2025-09-29
Started: 2015-08-29
MRP with rstanarm
Rendered frommrp.Rmdusingknitr::rmarkdownon Oct 15 2025.Last update: 2020-01-15
Started: 2019-09-16
Prior Distributions for rstanarm Models
Rendered frompriors.Rmdusingknitr::rmarkdownon Oct 15 2025.Last update: 2022-03-16
Started: 2017-04-11
Probabilistic A/B Testing with rstanarm
Rendered fromab-testing.Rmdusingknitr::rmarkdownon Oct 15 2025.Last update: 2025-10-06
Started: 2020-10-15
Estimating ANOVA Models with rstanarm
Rendered fromaov.Rmdusingknitr::rmarkdownon Oct 15 2025.Last update: 2020-01-15
Started: 2015-08-31
Modeling Rates/Proportions using Beta Regression with rstanarm
Rendered frombetareg.Rmdusingknitr::rmarkdownon Oct 15 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 Oct 15 2025.Last update: 2025-09-29
Started: 2015-09-03
Estimating Generalized Linear Models for Continuous Data with rstanarm
Rendered fromcontinuous.Rmdusingknitr::rmarkdownon Oct 15 2025.Last update: 2025-09-29
Started: 2015-12-07
Estimating Generalized Linear Models for Count Data with rstanarm
Rendered fromcount.Rmdusingknitr::rmarkdownon Oct 15 2025.Last update: 2025-09-29
Started: 2015-09-04
Estimating Generalized (Non-)Linear Models with Group-Specific Terms with rstanarm
Rendered fromglmer.Rmdusingknitr::rmarkdownon Oct 15 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 Oct 15 2025.Last update: 2022-03-16
Started: 2017-11-11
Estimating Regularized Linear Models with rstanarm
Rendered fromlm.Rmdusingknitr::rmarkdownon Oct 15 2025.Last update: 2020-01-15
Started: 2015-08-30
Estimating Ordinal Regression Models with rstanarm
Rendered frompolr.Rmdusingknitr::rmarkdownon Oct 15 2025.Last update: 2020-01-15
Started: 2015-09-02
Readme and manuals
Help Manual
| Help page | Topics |
|---|---|
| Applied Regression Modeling via RStan | rstanarm-package rstanarm |
| 'adapt_delta': Target average acceptance probability | adapt_delta |
| Extract the posterior sample | as.array.stanreg as.data.frame.stanreg as.matrix.stanreg |
| Estimation algorithms available for 'rstanarm' models | available-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 model | example_jm |
| Example model | example_model |
| K-fold cross-validation | kfold kfold.stanreg |
| Using the ShinyStan GUI with rstanarm models | launch_shinystan launch_shinystan.stanreg |
| Pointwise log-likelihood matrix | log_lik log_lik.stanjm log_lik.stanmvreg log_lik.stanreg |
| Logit and inverse logit | invlogit logit |
| Compute weighted expectations using LOO | loo_linpred loo_linpred.stanreg loo_predict loo_predict.stanreg loo_predictive_interval loo_predictive_interval.stanreg |
| Information criteria and cross-validation | compare_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 GLMs | neg_binomial_2 |
| Methods for stanreg objects | coef.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 objects | pairs.stanreg pairs_condition pairs_style_np |
| Plot the estimated subject-specific or marginal longitudinal trajectory | plot.predict.stanjm |
| Plot method for stanreg objects | plot.stanreg |
| Plot the estimated subject-specific or marginal survival function | plot.survfit.stanjm plot_stack_jm |
| Posterior uncertainty intervals | posterior_interval posterior_interval.stanreg |
| Posterior distribution of the (possibly transformed) linear predictor | posterior_epred posterior_epred.stanreg posterior_linpred posterior_linpred.stanreg |
| Draw from posterior predictive distribution | posterior_predict posterior_predict.stanmvreg posterior_predict.stanreg |
| Estimate subject-specific or standardised survival probabilities | posterior_survfit |
| Estimate the subject-specific or marginal longitudinal trajectory | posterior_traj |
| Juxtapose prior and posterior | posterior_vs_prior posterior_vs_prior.stanreg |
| Graphical posterior predictive checks | pp_check pp_check.stanreg |
| Model validation via simulation | pp_validate |
| Predict method for stanreg objects | predict.stanreg |
| In-sample or out-of-sample predictive errors | predictive_error predictive_error.matrix predictive_error.ppd predictive_error.stanreg |
| Predictive intervals | predictive_interval predictive_interval.matrix predictive_interval.ppd predictive_interval.stanreg |
| Print method for stanreg objects | print.stanmvreg print.stanreg |
| Summarize the priors used for an rstanarm model | prior_summary prior_summary.stanreg |
| Prior distributions and options | cauchy 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 function | ps_check |
| The 'QR' argument | QR-argument |
| Datasets for rstanarm examples | bball1970 bball2006 kidiq mortality pbcLong pbcSurv radon roaches rstanarm-datasets tumors wells |
| Deprecated functions | prior_options rstanarm-deprecated |
| Bayesian regularized linear models via Stan | stan_aov stan_lm stan_lm.fit stan_lm.wfit |
| Bayesian beta regression models via Stan | stan_betareg stan_betareg.fit |
| Bayesian regularized linear but big models via Stan | stan_biglm stan_biglm.fit |
| Conditional logistic (clogit) regression models via Stan | stan_clogit |
| Bayesian generalized linear additive models with optional group-specific terms via Stan | plot_nonlinear stan_gamm4 |
| Bayesian generalized linear models via Stan | stan_glm stan_glm.fit stan_glm.nb |
| Bayesian generalized linear models with group-specific terms via Stan | stan_glmer stan_glmer.nb stan_lmer |
| Bayesian joint longitudinal and time-to-event models via Stan | stan_jm |
| Bayesian multivariate generalized linear models with correlated group-specific terms via Stan | stan_mvmer |
| Bayesian nonlinear models with group-specific terms via Stan | stan_nlmer |
| Bayesian ordinal regression models via Stan | stan_polr stan_polr.fit |
| Methods for stanmvreg objects | coef.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' object | as_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 objects | stanreg-objects |
| Summary method for stanreg objects | as.data.frame.summary.stanreg print.summary.stanmvreg print.summary.stanreg summary.stanmvreg summary.stanreg |
