Monday, April 25, 2011

Small updates to evol.rate.mcmc()

A couple of additional small updates to the function evol.rate.mcmc(). Direct link to code (v0.4) is here.

1) Now the user can specify the starting values for σ(1)2, σ(2)2, and a. This comes in response to a reviewer comment and I think it is a really good idea because one should be sure that the MCMC will converge to the correct distribution (eventually) regardless of where it is started. Now that will be easy to demonstrate. Starting values for the MCMC can be set using the control parameter list, e.g.:

> result<-evol.rate.mcmc(...,control=list(sig1=100,sig2=100,a=0))

If no starting values are supplied, the default setting should give the user starting values on the correct order of magnitude (which still seems like a good idea).

2) In my initial version of the raw MCMC result pre-processing function, posterior.evolrate(), I had the function plot the stretched or contracted tree for every generation of the chain. This was used to create my animation is a prior post (here). Obviously, this will be slow and annoying feature for large trees and long chains! It can now be turned on or off using:

>mcmc<-posterior.evolrate(...,showTree=TRUE)

(the default is off, i.e. showTree=FALSE ).

That's it!

No comments:

Post a Comment