metrumresearchgroup / bbr

R interface for model and project management
https://metrumresearchgroup.github.io/bbr/
Other
23 stars 2 forks source link

param_estimates(.override) argument for BAYES methods #354

Open callistosp opened 3 years ago

callistosp commented 3 years ago

Problem

Currently the param_estimates() function does not work for any of the BAYES methods (BAYES, NUTS). If bbr detects an unsupported estimation method, an error is thrown when this function is called. This hampers reusability of code utilizing this function when switching from one estimation method to another.

Proposal

Include an .override argument in the function that overrides the error thrown based on the estimation method. This would allow users to access the extracted and formatted parameter table, at which point they can manually calculate and fill in the numeric values. This improves code reusability across projects if multiple estimation methods are explored.

Feedback request

Do people think this would be a useful argument? @kylebaron @KatherineKayMRG @timwaterhouse

timwaterhouse commented 3 years ago

I'm not sure if the best thing is to provide an option like this instead of giving a warning instead, but it would be useful for the fixed/diag columns that you brought to my attention, @callistosp. It might also be useful for taking a peek at the NONMEM-provided estimates for a single chain without worrying about getting the full posterior?

(btw, BAYES and NUTS are just Bayesian methods. The EM methods in NONMEM are IMP/IMPMAP, SAEM, and ITS.)