Re: [R-sig-phylo] corHMM reconstruction not estimating internal node states

2016-02-28 Thread Michael Foisy
Hi Kev,

Thank you for your response!

Yes -- $States was a typo, sorry!  Nevertheless, unclassing the model (on
my end) showed issues with the node labels (NA) and estimated $states (NaN).

Jeremy Beaulieu advised me to try updating my version of corHMM -- he was
spot on; I was using an old version of the package!


For future reference, if someone reading this needs to update corHMM:
install.packages("devtools")
library(devtools)
install_github("thej022214/corHMM")


Thanks again - I'm excited to work with these tools! :)

,  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/


Re: [R-sig-phylo] corHMM reconstruction not estimating internal node states

2016-02-28 Thread Arbuckle, Kevin
Hi Michael,

When I run your code I get states for the nodes, so I'm not sure what the 
problem is. However, I notice in your message you tried to get the node states 
from $States, so I wonder if this is a typo or if this is the problem: the node 
reconstructions are in $states (note the lower case 's')?

Cheers,

Kev


--

Message: 1
Date: Fri, 26 Feb 2016 12:34:16 -0500
From: Michael Foisy 
To: r-sig-phylo@r-project.org
Subject: [R-sig-phylo] [corHMM reconstruction not estimating internal
    nodestates]
Message-ID:

Content-Type: text/plain; charset="UTF-8"

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]]



--

Subject: Digest Footer

___
R-sig-phylo mailing list
R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo

--

End of R-sig-phylo Digest, Vol 97, Issue 12

___
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/


[R-sig-phylo] [corHMM reconstruction not estimating internal node states]

2016-02-27 Thread Michael Foisy
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/