View full-text article in PMC Bioinformatics. 2015 Jun 20;31(20):3282–3289. doi: 10.1093/bioinformatics/btv378 Search in PMC Search in PubMed View in NLM Catalog Add to search Copyright and License information © The Author 2015. Published by Oxford University Press. All rights reserved. For Permissions, please e-mail: journals.permissions@oup.com PMC Copyright notice Algorithm 1. splitHMC for the coalescent model Initialize θ(1) at current θ=(f,τ) Sample a new momentum value p(1)∼N(0,I) Calculate H(θ(1),p(1))=U(θ(1))+K(p(1)) according to (13) for ℓ=1 to L do p(ℓ+12)=p(ℓ)+ε/2[s(ℓ)((D−1)/2+α)−βexp(τ(ℓ))]pD(ℓ+12)=pD(ℓ)−ε/2f*(ℓ)Tf*(ℓ)/2τ(ℓ+12)=τ(ℓ)+ε/2pD(ℓ+12)[f*(ℓ+1)p−D*(ℓ+12)]←[cos(Λe12τ(ℓ+12)ε)sin(Λe12τ(ℓ+12)ε)−sin(Λe12τ(ℓ+12)ε)cos(Λe12τ(ℓ+12)ε)][f*(ℓ)p−D*(ℓ+12)]τ(ℓ+1)=τ(ℓ+12)+ε/2pD(ℓ+12)pD(ℓ+1)=pD(ℓ+12)−ε/2f*(ℓ+1)Tf*(ℓ+1)/2p(ℓ+1)=p(ℓ+12)+ε/2[s(ℓ+1)((D−1)/2+α)−βexp(τ(ℓ+1))] end for Calculate H(θ(+1),p(L+1))=U(θ(L+1))+K(p(L+1)) according to (13) Calculate the acceptance probability α=min{1,exp[−H(θ(+1),p(L+1))+H(θ(1),p(1))]} Accept or reject the proposal according to α for the next state θ′