Skip to content

Latest commit

 

History

History
59 lines (44 loc) · 6.23 KB

old_README.md

File metadata and controls

59 lines (44 loc) · 6.23 KB

In the figs folder you will find large figures(constrained, unconstrained) representing a fit of the Monster model. I'll try to keep this readme as brief as possible.

I rebuilt the models (constrained, unconstrained)

I added

  • an upper truncation for the population (geometric) standard deviation and
  • a lower and upper truncation for the personwise parameters.

I kept

  • the lower and upper truncation for the population (geometric) means.

I potentially did not implement faithfully

I don't think the sum-to-one constraints should impact the fit very much, though Fwp looks a bit weird.

I did/checked

Warmup+sampling (while conditioning only on the data from the first two participants) took 3+3 minutes for "my" incremental warmup, which includes an automatic adaptation of the ODE solution precision , while it took 24+6 minutes using Stan's regular warmup, with the ODE solution precision provided by my warmup (not included in runtime). Neff is slightly higher for my warmup, but overall comparable. There were no divergences. Rhat with 6x333 samples is 1.014/1.023. E-BFMI is a bit low, around 0.5.

My warmup consists of repeatedly rerunning the first two adaptation windows with few iterations and pooling draws to estimate the covariance across chains, while

Neither for this partial fit nor for fits including all of the data was I able to recover the marginal posteriors as provided in the original paper (black vertical lines for all figures). Some parameters agreed relatively well, others not at all. Most of my marginal posteriors were considerably wider than the ones from the paper.

I do not include in the repository

  • the raw measurements, as they are potentially private,
  • the code/framework for my incremental warmup, as it is kind of a mess. All computations were run on my local machine (6/12 core 2020 Dell-notebook).

I think the model should be correct, or at least as close to correct as necessary. In the best case (for me), everything but the "sum-to-one" constraints are correct, and I can successfully fit the original Monster model roughly within an hour on my local machine. In the worst case, there is a bug somewhere, but even then I can fit a model which qualitatively behaves very similarly to the original Monster model, and after an eventual bugfix I should be able to fit the original Monster model.

Renormalization to satisfy sum-to-X constraints happens at two levels:

  • At the population level and
  • at the person level.

Meaning, for the blood flows (parameters 2-5) which are constrained to sum to one, both the population geometric means get renormalized such that they sum to one and the personwise parameters get renormalized as well. The same is done for the relative volumes of the compartments.

To prescribe the same priors exactly as in the original paper, it looks like we would have to adjust the prior means and SDs as described e.g. in http://stat.columbia.edu/~gelman/research/published/moments.pdf

A better approach appears to be to enforce the sum-to-X constraints by reducing the number of parameters by one for each constraint, as described by @bob-carpenter (personal communication). This is implemented in a tentative model and a sample outputs are with SD truncation but nu=2 or without any truncation but nu=4.