Skip to content

Example Models

bgoodri edited this page Nov 10, 2018 · 3 revisions

The easiest way to execute an example is via the stan_demo() function, such as

library(rstan)
options(mc.cores = parallel::detectCores())
rstan_options(auto_write = TRUE)

dogs <- stan_demo("dogs")
dogs

If stan_demo() is called without any arguments, then a text menu will pop up listing the (more than 500) examples that can be run (although a handful do not work at any particular time)