Navigation Menu

Skip to content

Commit

Permalink
small fix in fitMk
Browse files Browse the repository at this point in the history
  • Loading branch information
liamrevell committed Sep 27, 2017
1 parent 3f4ea6d commit 554a3ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/fitMk.R
Expand Up @@ -84,7 +84,7 @@ fitMk<-function(tree,x,model="SYM",fixedQ=NULL,...){
el<-pw$edge.length[ii]
v<-vector(length=length(desc),mode="list")
for(j in 1:length(v))
v[[j]]<-matexpo(Q*el[j])%*%liks[desc[j],]
v[[j]]<-expm(Q*el[j])%*%liks[desc[j],]
vv<-if(anc==root) Reduce('*',v)[,1]*pi else Reduce('*',v)[,1]
comp[anc]<-sum(vv)
liks[anc,]<-vv/comp[anc]
Expand Down

0 comments on commit 554a3ab

Please sign in to comment.