Hello,
I’ve coded an R library that uses Stan for estimation. The estimation function that runs sampling()
and vb()
currently returns a stanfit
object. I would like, however, to include additional data in that object for post-processing, e.g. the arguments that the user gave to call the estimation function. However, I also want to maintain the ability of the object to be analyzed with standard Stan software such as shiny_stan
. Can someone let me know what the best practices are to include extra data in a stanfit
object? Add a unique slot for these extra data? If so, how would one do that? Thanks!