posteriordb icon indicating copy to clipboard operation
posteriordb copied to clipboard

Add SBC structure to posteriordb

Open MansMeg opened this issue 4 years ago • 4 comments

Include SBC in the psoteriordb. How should that be included for a model to be . tested using SBC. What additional stuff would be needed.

See SBC by Bob Carpenter and Ben Goodridge

MansMeg avatar Dec 04 '19 18:12 MansMeg

Do you have any ideas how this should be done?

eerolinna avatar Dec 12 '19 14:12 eerolinna

I need to think how to do this in the best way. Either adding simulation from the prior or a separate Stan code. I dont know SBC well enough yet.

MansMeg avatar Dec 14 '19 10:12 MansMeg

To run SBC we essentially need a way to obtain prior and prior predictive samples. I suggest we use the model implementations approach that we talked about in #112

For Stan it could mean that the model implementation file would be

{
  "code": "models/stan/blr.stan",
  "likelihood": "models/stan/blr_likelihood.stan",
  "prior_and_predictive": "models/stan/blr_prior.stan"
}

where the prior_and_predictive would be a stan program that draws prior and prior predictive samples.

For pymc I think we don't need anything extra so the model implementation file could be

{
  "code": "models/pymc/blr.py"
}

This is because pymc has API to draw prior predictive samples for any model

prior_predictive_draws = pymc.sample_prior_predictive(n_samples, model=model)

eerolinna avatar Dec 17 '19 17:12 eerolinna

That looks good!

MansMeg avatar Dec 18 '19 07:12 MansMeg