Package structure

Creating the basic structure of a Stan-based R package or add Stan programs to an existing package.

rstantools-package rstantools

Tools for Developing R Packages Interfacing with Stan

rstan_create_package()

Create a new R package with compiled Stan programs

use_rstan()

Add Stan infrastructure to an existing package

rstan_config()

Configure system files for compiling Stan source code

rstantools_load_code()

Helper function for loading code in roxygenise

Generics

S3 generics (and some default methods) for adding functionality to your package using the same naming conventions as rstanarm and other Stan-based R packages.

bayes_R2() loo_R2()

Generic function and default method for Bayesian R-squared

log_lik()

Generic function for pointwise log-likelihood

loo_linpred() loo_predict() loo_predictive_interval() loo_pit()

Generic functions for LOO predictions

posterior_interval()

Generic function and default method for posterior uncertainty intervals

posterior_epred()

Generic function for accessing the posterior distribution of the conditional expectation

posterior_linpred()

Generic function for accessing the posterior distribution of the linear predictor

posterior_predict()

Generic function for drawing from the posterior predictive distribution

predictive_error()

Generic function and default method for predictive errors

predictive_interval()

Generic function for predictive intervals

prior_summary()

Generic function for extracting information about prior distributions