stingray icon indicating copy to clipboard operation
stingray copied to clipboard

Include Deviance Information Criterion in Modeling subpackage

Open dhuppenkothen opened this issue 7 years ago • 3 comments

Since we allow the user to do MCMC, I think it would be useful to have an implementation of the Deviance Information Criterion (DIC), since it's more robust for model comparison than likelihood ratio tests, AIC, BIC and the like, but not quite as computationally expensive as the full marginal likelihood.

See here for details: https://arxiv.org/pdf/astro-ph/0701113.pdf https://arxiv.org/pdf/0803.4089.pdf

dhuppenkothen avatar Mar 14 '17 19:03 dhuppenkothen

Can you tell me where i can start(i read the references)

Billaud avatar Mar 29 '17 10:03 Billaud

@Billaud Thanks for your interest in this. After looking at this again, I realized that I may have gotten the references confused. This here is much clearer about how to do this: http://www.sph.umn.edu/faculty1/wp-content/uploads/2012/11/rr98-009.pdf

Essentially, this procedure has three steps:

  1. Compute an MCMC sample for a model (this is already implemented in ParameterEstimation
  2. Compute the deviance for all MCMC samples (there's an expression for the deviance I think in OptimizationResults or so)
  3. Compute the mean of all deviances
  4. Compute the means for all parameters from the MCMC sample (i.e. compute the mean of each column)
  5. Compute the deviance using the means of all parameters
  6. Take 2* the result of step 3 (the mean of all deviances) - the result of step 5 (the deviance of the mean parameters)

I hope this makes some sense. Feel free to post here or in slack if you have questions!

dhuppenkothen avatar Mar 30 '17 15:03 dhuppenkothen

Can you check this it is a first attempt.

test.txt

Billaud avatar Apr 01 '17 21:04 Billaud