Hi,


I’m using the function “make.simmap” from Phytools to reconstruct ancestral
states in 10 trees with 248 tips obtained from a BEAST analysis. I believe
rates might be different between states (four states) and I think this
would probably be the best way to run it:



simmap.trees.bs <- make.simmap(trees.bs, x = hab.bs, nsim = 1, "ARD", Q =
"empirical", pi = "estimated")



However after a while it returns me an error:



Error in rmultinom(1, 1, y/sum(y)) : non-positive probability



Do you have any suggestions of why is this happening?.



Any help is greatly appreciated.



Laura Alencar.



R output:



simmap.trees.bs <- make.simmap(trees.bs, x = hab.bs, nsim = 1, "ARD", Q =
"empirical", pi = "estimated")



Warning: some elements of Q not numerically distinct from 0; setting to
1e-08



make.simmap is sampling character histories conditioned on the transition
matrix

Q =

              1                       2                  3
    4

1 -0.0968244043  0.06758894  0.029235453  0.0000000100

2  0.0225745893 -0.02675244  0.004024555  0.0001532927

3  0.0212390324  0.01319612 -0.053640721  0.0192055634

4  0.0003248535  0.00000001  0.006457870 -0.0067827337

(estimated using likelihood);

and (mean) root node prior probabilities

pi =

        1                2                3               4

0.1141217 0.3555619 0.1363109 0.3940054

Done.



Warning: some elements of Q not numerically distinct from 0; setting to
1e-08



make.simmap is sampling character histories conditioned on the transition
matrix

Q =

            1             2           3            4

1 -0.08346002  0.0724513259  0.01100869  0.000000010

2  0.01457896 -0.0317484605  0.00000001  0.017169490

3  0.01022154  0.0066068752 -0.02122808  0.004399662

4  0.01546898  0.0001664635  0.01762501 -0.033260454

(estimated using likelihood);

and (mean) root node prior probabilities

pi =

        1         2         3         4

0.1391800 0.3730572 0.2607005 0.2270623



*Error in rmultinom(1, 1, y/sum(y)) : non-positive probability*





Laura Rodrigues Vieira de Alencar
PhD student
Department of Ecology
University of São Paulo
Phone 55-11-96190222

Website: alencarlaura.weebly.com
Lattes: *http://lattes.cnpq.br/3112833291166033
<http://lattes.cnpq.br/3112833291166033>*
Lab Meme: *http://ecologia.ib.usp.br/labmeme/Site/Inicio.html*
<http://ecologia.ib.usp.br/labmeme/Site/Inicio.html>
Labvert: *http://eco.ib.usp.br/labvert/* <http://eco.ib.usp.br/labvert/>

        [[alternative HTML version deleted]]

_______________________________________________
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