Hello,


I'm running some precursor models in corHMM to understand the evolution of
a discrete binary character.  Some example code using data(primates) below,
but what happens is the internal nodes are not being estimated ($States =
NaN).  Also, when I unclass(precursor2.primates), the internal Node labels
are all "NA".  Still solves the optimization, but I can't plot the
reconstruction!





library(corHMM)

data(primates)



#write precursor matrix (Marazzi et al., 2012):

precursor2.matrix <- matrix(data = c(NA, NA, 2, NA,

                                     NA, NA, NA, NA,

                                     1, NA, NA, 4,

                                     NA, NA, 3, NA ),

                            nrow = 4, ncol = 4,

                            byrow = TRUE

)

rownames(precursor2.matrix) <- c("(0,R1)", "(1,R1)", "(0,R2)", "(1,R2)")

rownames(precursor2.matrix)

colnames(precursor2.matrix) <- c("(0,R1)", "(1,R1)", "(0,R2)", "(1,R2)")

colnames(precursor2.matrix)



#running the precursor-2 model:

precursor2.primates <- corHMM(primates$tree,primates$trait,rate.cat
=2,rate.mat=precursor2.matrix,node.states="marginal",diagn=FALSE)



unclass(precursor2.primates)



Am I neglecting something in the corHMM() function, or is there something
else going on?  I run into the same NaN when running the precursor matrices
Beaulieu wrote into the corHMM notes.







Any help is appreciated!  Thank you!

,  Michael Foisy



MSc. Student

University of Toronto

michael.fo...@mail.utoronto.ca

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

Reply via email to