Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

first stab at integrated prior; works somewhat #1075

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

maxbiostat
Copy link
Contributor

@maxbiostat maxbiostat commented Nov 20, 2019

Please do not merge yet

The idea

Place a proper prior on the (constant) population size Ne and then integrate it out of the coalescent likelihood.
(i) Employing an inverse-Gamma prior on Ne, with parameters alpha and beta one gets a nice closed-form density. This is clumsily implemented in src/dr/evomodel/coalescent/IGCoalescentLikelihood.java.
(ii) Later, one can integrate over beta from 0 to u to potentially get a prior that does not need user input. This has not yet been implemented.

Tests

Tests compare the results of using the integrated prior with alpha = 2.0and beta = 10.0 - giving a prior expectation of E[Ne] = 10 - and the same prior on Ne but sampling its distribution using a standard ScaleOperator (full).
All tests were run with beast -seed 666 -overwrite for 10M iterations, sampling every 100. Only one replicate was run.
Results are shown for tree height and tree length (sum of branch lenghts).

  • simulate from the prior with 5 contemporaneous taxa:
    note: Root height should be 2*10*(4/5) = 16.
Quantity Full Marginalised
Wall clock time (minutes) 2.6 1.1
Root height mean (sd) 16.6 (27.4) 16.6 (27.4)
Tree length mean (sd) 42.6 (69.6) 42.4 (60.6)
Root height ESS 3342 3807
Tree length ESS 3198 4027
  • simulate from the prior with 50 contemporaneous taxa:
    note: root height should be round about 2*10*49/50 = 19.6
Quantity Full Marginalised
Wall clock time (minutes) 3.17 3.32
Root height mean (sd) 18.6 (32.2) 19.5 (29.8)
Tree length mean (sd) 85 (130) 89 (69)
Root height ESS 858 3165
Tree length ESS 686 2351
  • simulate from the prior with 17 heterochronous taxa:
Quantity Full Marginalised
Wall clock time (minutes) 2.6 2.7
Root height mean (sd) 52.2 (46.5) 51.1 (27.2)
Tree length mean (sd) 130 (157) 167 (64)
Root height ESS 509 2206
Tree length ESS 413 2411
  • sample from the posterior with 17 heterochronous taxa:
Quantity Full Marginalised
Wall clock time (minutes) 5.8 6.0
Root height mean (sd) 68.6 (9.7) 57.3 (7.9)
Tree length mean (sd) 258 (37) 212 (20)
Root height ESS 2038 472
Tree length ESS 1793 398
  • sample from a simplified posterior (simpler model) with 17 heterochronous taxa:
Quantity Full Marginalised
Wall clock time (minutes) 3.5 3.5
Root height mean (sd) 67.4 (5.8) 61.2 (4.5)
Tree length mean (sd) 263 (28) 231 (21)
Root height ESS 3892 4132
Tree length ESS 3242 3278

Notes detailing the calculations are available upon request.

all_xmls.zip

@maxbiostat maxbiostat marked this pull request as draft October 1, 2021 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant