Skip to contents

Setup

Wire flexstanr into your own package.

use_flexstanr()
Wire flexstanr into a host package

Fitting

Build sampler options and fit a model through the chosen backend.

stan_options()
Stan Sampler Options
fit_model()
Fit a Stan model through the chosen backend

Reading a fit

Backend-agnostic accessors for a fitted model object.

backend_draws_array()
Posterior draws of a fit as an iterations x chains x parameters array
backend_extract()
Extract named parameters from a fit as a list of arrays
backend_generate_quantities()
Run generated quantities against a fit and return a parameter matrix
backend_has_draws()
Does a fit object carry usable posterior draws?