Package: flexstanr 0.1.0
flexstanr: Portable Backend Layer for 'Stan' Models
Gives a 'Stan'-based R package one interface for fitting its models through either 'rstan' or (optionally) 'cmdstanr'. Collects and validates sampler options, guarding against mixing one backend's argument vocabulary into the other, dispatches the fit to the chosen backend, and exposes backend-agnostic accessors for reading posterior draws, extracting parameters, and running generated quantities. The host package supplies its own compiled models; flexstanr resolves them from the calling package at run time, so the same code works whichever backend is installed.
Authors:
flexstanr_0.1.0.tar.gz
flexstanr_0.1.0.tar.gz(r-4.7-any)flexstanr_0.1.0.tar.gz(r-4.6-any)
flexstanr_0.1.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
flexstanr/json (API)
| # Install 'flexstanr' in R: |
| install.packages('flexstanr', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org')) |
Bug tracker:https://github.com/accidda/flexstanr/issues
Pkgdown/docs site:https://accidda.github.io
Last updated from:b1a50bb801. Checks:4 OK. Indexed: yes.
| Target | Result | Time | Files | Syslog |
|---|---|---|---|---|
| linux-devel-x86_64 | OK | 229 | ||
| source / vignettes | OK | 229 | ||
| linux-release-x86_64 | OK | 235 | ||
| wasm-release | OK | 172 |
Exports:backend_draws_arraybackend_extractbackend_generate_quantitiesbackend_has_drawsfit_modelstan_optionsuse_flexstanr
Dependencies:abindbackportsBHcallrcheckmateclicpp11descdistributionalfarvergenericsggplot2gluegridExtragtableinlineisobandlabelinglifecycleloomagrittrmatrixStatsnumDerivotelpillarpkgbuildpkgconfigposteriorprocessxpsQuickJSRR6RColorBrewerRcppRcppEigenRcppParallelrlangrstanS7scalesStanHeaderstensorAtibbleutf8vctrsviridisLitewithr
Readme and manuals
Help Manual
| Help page | Topics |
|---|---|
| Posterior draws of a fit as an iterations x chains x parameters array | backend_draws_array |
| Extract named parameters from a fit as a list of arrays | backend_extract |
| Run generated quantities against a fit and return a parameter matrix | backend_generate_quantities |
| Does a fit object carry usable posterior draws? | backend_has_draws |
| Fit a Stan model through the chosen backend | fit_model |
| Stan Sampler Options | stan_options |
| Wire flexstanr into a host package | use_flexstanr |
