Skip to content

Extended code for analysis of bimodal posterior distributions from an interaction between MCMC sampling and numerical error.

Notifications You must be signed in to change notification settings

Tess-LaCoil/hmde-be-dragons

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Here Be Dragons: Bimodal posteriors arise from numerical error in longitudinal models

Lifecycle: experimental

This repo is an extended investigation of a quirk that I found while building hmde. The problem arises from conditioning parameters for a longitudinal model on numerical integration with error. It arises in both Markov Chain Monte Carlo sampling and deterministic optimisation methods such as the BFGS algorithm.

When building the von Bertalanffy (affine first order ODE) model for hmde, I observed persistent bimodality in the posterior parameter estimates when using numerical integration to estimate growth increments. The fix for the package was to implement an analytic solution for the von Bertalanffy model.

Here I document and demonstrate a more thorough investigation of that interaction. I demonstrate that posterior bimodality in is a sticky problem for numerics in the case of

$$f\left( Y \left( t \right), \beta_0, \beta_1 \right) = \frac{dY}{dt} = \beta_0 - \beta_1 Y \left( t \right), $$

across step sizes, different methods, priors, and parameter values. I also demonstrate that the Canham model in hmde is robust to similar problems with a suitable numerical method.

Set-up

This repo requires the hmde package in R.

The here_be_dragons.Rmd file provides a complete walk-through to reproduce the results.

About

Extended code for analysis of bimodal posterior distributions from an interaction between MCMC sampling and numerical error.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published