StanCon 2020. Talk 11: Jonathan Sidi. API for iterative interrogation of stanfit objects in R
https://mc-stan.org
The Stan Conference 2020. August 13, 2020. #stancon2020
------------------------------------------------------------
Jonathan Sidi, Associate Director of Modeling and Simulation at Sage Therapeutics
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