About rstanarm

These pages provides a summary of the functionality available in rstanarm.

rstanarm-package

Applied Regression Modeling via RStan

available-models

Modeling functions available in rstanarm

available-algorithms

Estimation algorithms available for rstanarm models

Fitting models

Functions for model fitting.

stan_betareg() stan_betareg.fit()

Bayesian beta regression models via Stan

stan_biglm() stan_biglm.fit()

Bayesian regularized linear but big models via Stan

stan_clogit()

Conditional logistic (clogit) regression models via Stan

stan_gamm4() plot_nonlinear()

Bayesian generalized linear additive models with optional group-specific terms via Stan

stan_glm() stan_glm.nb() stan_glm.fit()

Bayesian generalized linear models via Stan

stan_glmer() stan_lmer() stan_glmer.nb()

Bayesian generalized linear models with group-specific terms via Stan

stan_jm()

Bayesian joint longitudinal and time-to-event models via Stan

stan_aov() stan_lm() stan_lm.wfit() stan_lm.fit()

Bayesian regularized linear models via Stan

stan_mvmer()

Bayesian multivariate generalized linear models with correlated group-specific terms via Stan

stan_nlmer()

Bayesian nonlinear models with group-specific terms via Stan

stan_polr() stan_polr.fit()

Bayesian ordinal regression models via Stan

normal() student_t() cauchy() hs() hs_plus() laplace() lasso() product_normal() exponential() decov() lkj() dirichlet() R2() default_prior_intercept() default_prior_coef()

Prior distributions and options

Methods

Functions to work with fitted model objects.

stanreg-objects

Fitted model objects

as.matrix(<stanreg>) as.array(<stanreg>) as.data.frame(<stanreg>)

Extract the posterior sample

bayes_R2(<stanreg>) loo_R2(<stanreg>)

Compute a Bayesian version of R-squared or LOO-adjusted R-squared for regression models.

kfold(<stanreg>)

K-fold cross-validation

launch_shinystan(<stanreg>)

Using the ShinyStan GUI with rstanarm models

log_lik(<stanreg>) log_lik(<stanmvreg>) log_lik(<stanjm>)

Pointwise log-likelihood matrix

loo(<stanreg>) waic(<stanreg>) loo_compare(<stanreg>) loo_compare(<stanreg_list>) loo_model_weights(<stanreg_list>) compare_models()

Information criteria and cross-validation

loo_predict(<stanreg>) loo_linpred(<stanreg>) loo_predictive_interval(<stanreg>)

Compute weighted expectations using LOO

pairs(<stanreg>)

Pairs method for stanreg objects

plot(<stanreg>)

Plot method for stanreg objects

posterior_interval(<stanreg>)

Posterior uncertainty intervals

posterior_linpred(<stanreg>) posterior_epred(<stanreg>)

Posterior distribution of the (possibly transformed) linear predictor

posterior_predict(<stanreg>) posterior_predict(<stanmvreg>)

Draw from posterior predictive distribution

posterior_vs_prior()

Juxtapose prior and posterior

pp_check(<stanreg>)

Graphical posterior predictive checks

predict(<stanreg>)

Predict method for stanreg objects

predictive_error(<stanreg>) predictive_error(<ppd>)

In-sample or out-of-sample predictive errors

predictive_interval(<stanreg>) predictive_interval(<ppd>)

Predictive intervals

print(<stanreg>) print(<stanmvreg>)

Print method for stanreg objects

prior_summary(<stanreg>)

Summarize the priors used for an rstanarm model

nobs(<stanmvreg>) coef(<stanreg>) confint(<stanreg>) fitted(<stanreg>) nobs(<stanreg>) residuals(<stanreg>) se(<stanreg>) update(<stanreg>) vcov(<stanreg>) fixef(<stanreg>) ngrps(<stanreg>) nsamples(<stanreg>) ranef(<stanreg>) sigma(<stanreg>) VarCorr(<stanreg>)

Methods for stanreg objects

summary(<stanreg>) print(<summary.stanreg>) as.data.frame(<summary.stanreg>) summary(<stanmvreg>) print(<summary.stanmvreg>)

Summary method for stanreg objects

posterior_survfit()

Estimate subject-specific or standardised survival probabilities

posterior_traj()

Estimate the subject-specific or marginal longitudinal trajectory

ps_check()

Graphical checks of the estimated survival function

coef(<stanmvreg>) fitted(<stanmvreg>) residuals(<stanmvreg>) se(<stanmvreg>) formula(<stanmvreg>) update(<stanmvreg>) update(<stanjm>) fixef(<stanmvreg>) ngrps(<stanmvreg>) ranef(<stanmvreg>) sigma(<stanmvreg>)

Methods for stanmvreg objects

plot(<predict.stanjm>)

Plot the estimated subject-specific or marginal longitudinal trajectory

plot(<survfit.stanjm>) plot_stack_jm()

Plot the estimated subject-specific or marginal survival function

Additional documentation

Misc. other help pages.

rstanarm-datasets

Datasets for rstanarm examples

example_model

Example model

example_jm

Example joint longitudinal and time-to-event model

stanreg_list() stanmvreg_list() stanjm_list() print(<stanreg_list>)

Create lists of fitted model objects, combine them, or append new models to existing lists of models.

adapt_delta

adapt_delta: Target average acceptance probability

QR-argument

The QR argument

neg_binomial_2()

Family function for negative binomial GLMs

prior_options()

Deprecated functions