Ok to combine bmodeltest with nested sampling?

90 views
Skip to first unread message

magnus...@gmail.com

unread,
Nov 19, 2018, 11:55:25 AM11/19/18
to beast-users
Hi, all.

I want to use nested sampling to obtain marginal likelihood estimates to compare the fit of different clock and population models. Also, I want the phylogeny to reflect the uncertainty in the choice of the substitution model, which can be achieved by using bmodeltest. So I thought both these goals could be achieved by combining bmodeltest and nested sampling. 
I am able to set this up by editing the .xml file. Still, I have a feeling that there is something conceptually wrong about doing this.

Is it okay to combine bmodeltest with nested sampling in Beast 2.0? Or will the nested sampling be disrupted by moving between different substitution models?

Thanks in advance,

Best regards,
Magnus Nygård Osnes

Remco Bouckaert

unread,
Nov 19, 2018, 6:30:10 PM11/19/18
to beast...@googlegroups.com
Hi Magnus,

The bModelTest model does Bayesian model averaging for the site model. Nested sampling is for model selection, which allows you to justify using a particular clock model and population model, but that does not prevent you from model averaging over the site models. I see no reason why you cannot use nested sampling in combination with bModelTest.

Cheers,

Remco

--
You received this message because you are subscribed to the Google Groups "beast-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beast-users...@googlegroups.com.
To post to this group, send email to beast...@googlegroups.com.
Visit this group at https://groups.google.com/group/beast-users.
For more options, visit https://groups.google.com/d/optout.

Message has been deleted
Message has been deleted

magnus...@gmail.com

unread,
Nov 29, 2018, 4:34:59 PM11/29/18
to beast-users
Thanks for clearing this up Remco.

I have a couple of more questions.
I have been using Bmodeltest + nested sampling in combination to select between demographic and clock models given the substitution model space created by Bmodeltest. A typical run looks like this: (plots of modelindicator with a transitiontrasversion split, and NSlikelihood):
Nslikelihood values.pngModelindicatior.png
.

However, I am having problems with some nested sampling runs where the likelihood contributions starts to decrease, as if the main bulk of the likelihood has been found, followed by a jump in log likehood values to positive values. This should be impossible, any idea what is happening here? After such runs I get results like:  "Marginal likelihood: 139487.0392603452 sqrt(H/N)=(0.7483293926811662)=?=SD=(1.6959334260361976) Information: 11.19993759901126, Max ESS: 1.0000361043702644". It usually happens at some suboptimal likelihood value, possibly a local mode. 

Also, I have been trying to run NSlogAnalyser on macOS, and it doesn't seem to launch on Mac OS High Sierra with Java 8 update 191, even though all the other Beast 2.0 applications are working fine.

Best regards,
Magnus 

Remco Bouckaert

unread,
Dec 5, 2018, 4:52:04 PM12/5/18
to beast...@googlegroups.com
Hi Magnus,

Did you run with MultiThreadedNS and multiple threads when the jumps in likelihoods occurred?

Thanks for reporting the NSlogAnalyser issue. This should be fixed in version v1.0.3 of the nested sampling package. However, be aware it is more limited than the command line version at the moment, since it does not deal with multiple log files yet.

Cheers,

Remco

On 30/11/2018, at 8:34 AM, magnus...@gmail.com wrote:

Thanks for clearing this up Remco.

I have a couple of more questions.
I have been using Bmodeltest + nested sampling in combination to select between demographic and clock models given the substitution model space created by Bmodeltest. A typical run looks like this: (plots of modelindicator with a transitiontrasversion split, and NSlikelihood):
<Nslikelihood values.png><Modelindicatior.png>
<Nslikelihood values.png><Modelindicatior.png>

Message has been deleted

magnus...@gmail.com

unread,
Dec 7, 2018, 3:04:05 AM12/7/18
to beast-users
Yes, this happened both with MultiThreadedNS and for single-threaded runs. 

I tried running the log analyzer. It does open now, but doesn't find the log-files that I specify.
Here are some screenshots from an attempt at analyzing the log file produced by a nested sampling run. 
Screenshot 2018-12-07 08.58.41.pngScreenshot 2018-12-07 08.52.43.png

regards, 
Magnus

magnus...@gmail.com

unread,
Mar 14, 2019, 6:55:18 AM3/14/19
to beast-users
Hi, Remco. I'm back to this infinity likelihood issue. This still happens regularly when I use nested sampling in Beast. I wonder if it is caused by specifying too complex models (too many parameters) on too little data? (70 sites, 92 taxa).  I have attached an output (STDOUT) file along with the XML on multiple threads run with specs, with bmodeltest+ constant population+ relaxed lognormal clock. For the nested sampling I have used specs: 
particleCount="10"subChainLength="5000"threads="4"epsilon="1.0E-12"
In the STDOUT file, you can see that the likelihood jumps to infinity when it approaches ≈ -1300. 

Best regards, 
Magnus 
re_constant.xml
STDOUT (10)

­Wonseop Lim

unread,
Jun 25, 2024, 2:09:29 PM (6 days ago) Jun 25
to beast-users
Hi Magnus, 

I know that this feed has not been active for a long time, but I am having some trouble with the similar issues. I encountered some positive marginal likelihood issues when using nested sampling (particularly, when using random local clock as a clock model). So I analyzed some publicly available xml files involving random local clock model and observed the similar issue. 

Did you get to solve the problem? Or would this be the internal problem of the program? Plus, would there be any alternative ways to come around this issue? 
Just for the note, I fixed the tree topology during the analysis (as in https://doi.org/10.1093/sysbio/syad066, and their xml file gave positive marginal likelihood when using nested sampling). 

2019년 3월 14일 목요일 오후 7시 55분 18초 UTC+9에 magnus...@gmail.com님이 작성:
Reply all
Reply to author
Forward
0 new messages