Re: [R-sig-phylo] Recovering rate estimates from ape::ace

2021-06-07 Thread Liam J. Revell
Dear Rafa. Try this to get the transition matrix, Q: k<-nrow(ace$index.matrix) Q<-matrix(ace$rates[ace$index.matrix],k,k) diag(Q)<--rowSums(Q,na.rm=TRUE) This should match what you get running: as.Qmatrix(fitMk(tree,x,model="ARD")) with phytools. All the best, Liam Liam J. Revell

[R-sig-phylo] Recovering rate estimates from ape::ace

2021-06-07 Thread Rafael S Marcondes
Hi all, I'm very confused trying to understand the output of ace::ape, specifically the transition rates. I'm having a hard time understanding how the rates are stored in the results. For example, I used an ARD model on a trait with three states, denoted just 0, 1 and 2. I know that the rates