Cmdstan sample() - exclude parameters?


In rstan:stan(), it can exclude parameters by using arguments pars= and include = FALSE.

How may I achieve the same in cmdstanr::sample()? Thanks!

Unfortunately this isn’t possible yet in CmdStanR because CmdStan always writes all variables to CSV. We can control which variables we read in from the CSV but not which ones are written.

There’s an open issue for this in the CmdStan repo from a while ago and I just added a comment to hopefully revive the discussion there:

If it gets implemented in CmdStan then we can expose it in CmdStanR.