Hi Kevin,

Although diversitree was written in a modular and efficient way, it is 
very challenging to make modifications to the code. Functions in the 
package are usually very general and make it hard to understand their 
role in the MCMC algorithm. My opinion is that it is better to use the 
likelihood function and prior function from diversitree to construct 
your own MCMC program.

Daniele Silvestro and colleagues wrote a version of the MCMC which is 
available here: https://github.com/dsilvestro/mcmc-diversitree . Note 
that this MCMC is not specific to the BiSSE model, but works with other 
models of the xxSSE family. Their code is well commented and short 
enough to be fairly easy to modify and adapt.

I assume that the multiphylo object has a posterior distribution of 
trees and that the number of trees should be fairly large. The strategy 
of sampling from those trees might be challenging. Estimating the 
unconstrained BiSSE model with large trees is already demanding, I 
imagine that sampling trees in the process might make the MCMC take much 
more time to run. Maybe you do not need to use all the trees in the 
multiphylo object, but investigate using incremental samples of trees 
whether estimating the model with different trees give you different 
answers. For example, you could sample 10 trees randomly from the 
posterior and check if parameter estimates vary among those. If 
positive, sample 10 more and see if they add more information to this 
variation.

 From my previous experience with BiSSE I think that it would be quicker 
to run 10 independent BiSSE MCMC's in parallel than to implement the 
BiSSE sampling trees from the posterior.

Hope it helped,

*Daniel S. Caetano*
Ph.D. Candidate
Harmon Lab
http://caetanods.weebly.com/
http://lukejharmon.github.io/
University of Idaho - Department of Biological Sciences
Moscow, Idaho 83844-3051 USA
----
On 12/05/2015 03:00 AM, [email protected] wrote:
> Send R-sig-phylo mailing list submissions to
>       [email protected]
>
> To subscribe or unsubscribe via the World Wide Web, visit
>       https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
> or, via email, send a message with subject or body 'help' to
>       [email protected]
>
> You can reach the person managing the list at
>       [email protected]
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of R-sig-phylo digest..."
>
>
> Today's Topics:
>
>     1. BiSSE models on multiphylo objects (Arbuckle, Kevin)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 4 Dec 2015 19:31:09 +0000
> From: "Arbuckle, Kevin" <[email protected]>
> To: "[email protected]" <[email protected]>
> Subject: [R-sig-phylo] BiSSE models on multiphylo objects
> Message-ID:
>       <eb15200a53ef104a85d6d8e071cc0edce2c25...@chexmbx1.livad.liv.ac.uk>
> Content-Type: text/plain; charset="UTF-8"
>
> Hi, I've trying to fit some BiSSE models in diversitree onto a set of fairly 
> large trees (>9k species) stored as a multiphylo object. However, due to the 
> size of the trees it quickly becomes a very time-consuming task to fit such 
> models to each individual tree.
>
>
>
> Given that the implementation in diversitree uses an MCMC approach, I would 
> imagine that it is pretty straightforward in principle to fit the model 
> sampling trees from the multiphylo object in proportion to their probability 
> (in the same way as the parameter estimation). However, this doesn't seem to 
> be implemented in diversitree.
>
>
>
> Is there a quick change to the relevant code that would run MCMC analyses of 
> BiSSE models in diversitree, or alternative another package that would fit 
> these but incorporating phylogenetic uncertainty using a set of phylogenies.
>
>
>
> Thanks,
>
>
>
> Kev
>
>       [[alternative HTML version deleted]]
>
>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> R-sig-phylo mailing list
> [email protected]
> https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
>
> ------------------------------
>
> End of R-sig-phylo Digest, Vol 95, Issue 2
> ******************************************
>


        [[alternative HTML version deleted]]

_______________________________________________
R-sig-phylo mailing list - [email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/[email protected]/

Reply via email to