Hello all,

(I'm a troublemaker today.)

Sometimes, in ordered discrete data, there are states we know might
exist as intermediary between observed states but aren't observed
themselves. I suppose this is probably common for meristic data. At
least to me, it seems like it should be possible to reconstruct node
states in a scenario with 'missing' states in a ML approach by
defining the corre

Anyway, in a recent conversation with a friend, he noted that he
couldn't get the function for ML ancestral reconstruction of discrete
characters, specifically ace (in ape) or rerootingMethod (in phytools)
to accept data with missing states. I was a little shocked by this,
and I didn't believe him in my foolhardiness and investigated myself.

#################################

library(ape)
data(bird.orders)

#make an ordered matrix for a 4 state trait
model<-matrix(0,4,4)
for(i in 1:4){for(j in 1:4){
    if(abs(i-j)<2){
        model[i,j]<-0.1
        }
    }}
rownames(model)<-colnames(model)<-0:3

#simulate data where you have only observed endmembers
trait <- factor(c(rep(0, 5), rep(3, 18)))
names(trait)<-bird.orders$tip.label

ace(trait, bird.orders, type = "discrete")
#works
ace(trait, bird.orders, type = "discrete", model=model)
#fail

library(phytools)
rerootingMethod(tree=bird.orders, x=trait)
#works
rerootingMethod(tree=bird.orders, x=trait, model=model)
#fail

#################################

(And it doesn't look like ancestral.pml in phangorn accepts model matrices.)

So, are these functions rejecting a model with missing states due to a
real analytical issue that I'm blithely ignorant of, or is there some
other function that I've missed that will allow ML reconstruction with
missing states?

Cheers,
-Dave

-- 
David W. Bapst, PhD
Adjunct Asst. Professor, Geology and Geol. Eng.
South Dakota School of Mines and Technology
501 E. St. Joseph
Rapid City, SD 57701

http://webpages.sdsmt.edu/~dbapst/
http://cran.r-project.org/web/packages/paleotree/index.html

_______________________________________________
R-sig-phylo mailing list - [email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/[email protected]/

Reply via email to