API for iterative interrogation of stanfit objects in R

Hierarchical models can have hundreds of parameters across all levels of the model. Due to the size of these models, post-processing their stanfit objects can be a cumbersome and time-consuming task which may impede full interrogation of the model fit. We introduce the shredder R package as a new verb-based API to promote iterative stanfit object manipulation and interrogation. Using these verbs researchers can select model parameters, thin post warmup samples and apply conditional filters directly on a stanfit object and return a new manipulated stanfit object. Returning a valid stanfit object allows for greater flexibility by generating smaller task specific stanfit objects that can be used by rstan packages that require stanfit class objects or converted into more compact data.frames with tidybayes or posterior. In the presentation we will present examples of how common tasks can be reconfigured into magrittr pipeline workflows that are model agnostic.

Documentation: https://github.com/yonicd/shredder

Presenter biography:
Jonathan Sidi

Associate Director of Modeling and Simulation at Sage Therapeutics, developing and implementing modeling both in Stan and R to answer complex drug development questions. Enjoys open source collaboration in the community and finding new ways to communicate effectively with a variety of stakeholders.