Cmdstanr with the "pars" input argument?

Thanks for developing the cmdstanr package!

I was just wondering, since I did not see the input argument “pars” in the mod$sample() call, how I could specify the parameters that I am interested in?

Thank you!

1 Like

Hi!

you can use the variables argument in the fit$draws() function. Have a look here https://mc-stan.org/cmdstanr/reference/fit-method-draws.html

Do let me know if there is any additional questions.

Right now we don’t have a way of specifying which parameters are written to CSV, which is what that RStan argument is doing (at least when specified at sampling time). CmdStan will just write everything to CSV.

That said, you don’t need to read all the parameters back into R. Like @rok_cesnovar said you can use the variables argument to control which parameters, transformed parameters, and generated quantities are read back into R.

2 Likes

glad to know. Thank you both @rok_cesnovar and @jonah!

2 Likes