Package description

An overview of the package and how it differs from RStan.

cmdstanr-package

CmdStanR: the R interface to CmdStan

Installing and setting the path to CmdStan

Install CmdStan, assuming the necessary C++ toolchain.

install_cmdstan() rebuild_cmdstan() cmdstan_make_local()

Install CmdStan or clean and rebuild an existing installation

set_cmdstan_path() cmdstan_path() cmdstan_version()

Get or set the file path to the CmdStan installation

Running CmdStan from R

Run CmdStan from R.

cmdstan_model()

Create a new CmdStanModel object

CmdStanModel

CmdStanModel objects

model-method-compile

Compile a Stan program or get the Stan code

model-method-optimize

Run Stan's optimization algorithms

model-method-sample

Run Stan's MCMC algorithms

model-method-variational

Run Stan's variational approximation algorithms

Fitted model objects and methods

CmdStanMCMC

CmdStanMCMC objects

CmdStanMLE

CmdStanMLE objects

CmdStanVB

CmdStanVB objects

fit-method-cmdstan_summary

Run CmdStan's bin/stansummary and bin/diagnose

fit-method-draws

Extract posterior draws

fit-method-sampler_diagnostics

Extract sampler diagnostics

fit-method-save_output_files

Save output and data files

fit-method-summary

Run posterior::summarise_draws()

Other tools for working with CmdStan

write_stan_json()

Write data to a JSON file readable by CmdStan