Hi Michael.

It looks like you want to simulate a process A->A'->B (for example) where the difference between A & A' cannot be observed, and the transitions are permitted to have different rates (and, perhaps, be reversible)?

If so, you might want to try sim.history in phytools followed by mergeMappedStates to merge the states (e.g., A & A' in this case) that are not distinguishable. Finally, you can use getStates to pull out the tip values. (Alternatively, if you are not interested in the full history you can just simulate using sim.char & then merge the states manually afterwards....)

All the best, Liam

Liam J. Revell, Associate Professor of Biology
University of Massachusetts Boston
web: http://faculty.umb.edu/liam.revell/
email: liam.rev...@umb.edu
blog: http://blog.phytools.org

On 5/11/2016 1:37 PM, Michael Foisy wrote:
P.S. -- I should add that I do have estimated rates for my precursor
model(s)... I'm not sure why I presented the matrix like that.


, Michael

On Wed, May 11, 2016 at 1:34 PM, Michael Foisy <
michael.fo...@mail.utoronto.ca> wrote:

Hi,


I'm running a statistical analysis which involves simulating discrete data
at the tips (0,1) under a precursor-2 model (Marazzi et al., 2012).


It seems like Beaulieu et al. (Syst. Biol 2013) simulated under a few
different precursor models in his corHMM package; however, the citation may
just be for fitting corHMM models to the simulated data, I'm not sure...
I've read through the package notes a few times and can't find anything to
do this in corHMM.


Any ideas?  Am I missing something in corHMM, or is there another package
which I should use?(familiar with sim.char{geiger} and rTraitDisc {ape}


# my precursor matrix goes something like this:


precursor2 <- matrix(data = c(NA, NA, 2, NA,
                                                      NA, NA, NA, NA,
                                                      1, NA, NA, 4,
                                                      NA, NA, 3, NA),
                                       4,
                                       byrow = TRUE)

# I would add in zeros and balance the gain and loss rates, etc., depending
on what package requires..


Thanks a lot!
, Michael Foisy

MSc. Student,
Rodd and Mahler Labs
University of Toronto



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


_______________________________________________
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