Rstan: get names of parameters from stanmodel object?


#1

If I’ve compiled a stan model using rstan::stan_model, is there a way to inspect the resulting stanmodel object to get the names of the parameters?


#2

There is a par_names slot of something in the stanfit object.


#3

Ah, but that requires I do some sampling first. I was hoping for a pre-sampling solution. I guess I can do a single iteration call to sampling to get the names.