# NOT RUN {
data( centrarchidae )
handle <- ratematrixMCMC(data=centrarchidae$data, phy=centrarchidae$phy.map
, gen=10000, dir=tempdir())
posterior <- readMCMC(handle, burn = 0.2, thin = 1)
## Get the correlations:
cor.list <- extractCorrelation(post = posterior)
## Plot the results:
class( cor.list ) ## In this case we have a matrix.
boxplot(cor.list, names = c("Regime 1", "Regime 2"))
## Same example with more traits.
data( anoles )
handle <- ratematrixMCMC(data=anoles$data[,1:3], phy=anoles$phy
, gen=5000, dir=tempdir())
anole_post <- readMCMC(handle, burn = 0.2, thin = 1)
## Get the correlations:
cor.anole <- extractCorrelation(post = anole_post)
## Plot the results:
class( cor.anole ) ## In this case we have a list!
names( cor.anole ) ## Each element is a regime.
## We can plot the regimes in separate.
boxplot(cor.anole$island)
boxplot(cor.anole$mainland)
# }
Run the code above in your browser using DataLab