# NOT RUN {
data( centrarchidae )
## Set the limits of the uniform prior on the root based on the observed traits
data.range <- t( apply( centrarchidae$data, 2, range ) )
## Set a reasonable value for the uniform prior distribution for the standard deviation.
## Here the minimum rate for the traits is 0 and the maximum is 10 ( using 'sqrt(10)' to
## transform to standard deviation).
## Note that we need to use a matrix with dimension dependent on the number of traits.
par.sd <- cbind(c(0,0), sqrt( c(10,10) ))
prior <- makePrior(r = 2, p = 2, den.mu = "unif", par.mu = data.range, den.sd = "unif"
, par.sd = par.sd)
## Running a very short chain, it will not converge:
handle <- ratematrixMCMC(data=centrarchidae$data, phy=centrarchidae$phy.map, prior=prior
, gen=5000, dir=tempdir())
posterior <- readMCMC(handle, burn = 0.2, thin = 1)
plotRatematrix( posterior )
# }
Run the code above in your browser using DataLab