Access Optimizing() functions output

Hi ,

I am using Rstan interface and using Stan’s optimizing() function to optimize parameters. Is there a way to access/ extract the output using a similar function like the extract() function for a stan fit object? I can understand print() gives values for all parameters in the console, but I would like to get the values for some parameters as a data frame.

Thanks

1 Like

It is just a list, so you can access stuff with the $ operator. It is usually best to specify as_vector = FALSE, which is not the default, so that everything stays the same shape as in the Stan program.

2 Likes

Thanks @bgoodri. specifying as_vector = FALSE really helped.

1 Like