As a side note, ape 2.5 (available on CRAN since yesterday) has a
function rTraitDisc that does the same job. The diagonal of the rate
matrix, if given, is always ignored. It's possible to specify
Alexandre's model as:
rTraitDisc(tree, k = 4, rate = 0.5)
It's also possible to specify the equi
Hi Alex,
The columns in your matrix should sum to 0.0, so if you want the
transitions to any of the four states to be equiprobable, try:
> q<-list(rbind(c(-1, 1/3, 1/3, 1/3),
c(1/3, -1, 1/3, 1/3),
c(1/3, 1/3, -1, 1/3),
c(1/3, 1/3, 1/3, -1)));
Then type:
> results<-sim.cha
Hi,
I am trying to use the function sim.char in geiger without success.
I would like to let a character (in this case 'species distribution',
with four states) evolve along a tree, and try different transition
costs in the matrix.
However, I don't manage to get more than one character