Hi Emmanuel,

Thank you so much for taking the pain to check this. Looking at my vector of frequencies (Pfreq[,2]) it is pretty clear that it is hard to believe that the trait variance conforms to BM.

All the best

Juan


El 18/05/2017 a las 10:00, Emmanuel Paradis escribió:
Hi Juan,

This warning seems related to the fact that the trait did not evolve according to the specified model (i.e., Brownian motion). I simulated some data with:

    tr <- rphylo(50, .1, 0)
    x <- rTraitCont(tr)

ace(x, tr)$sigma did not return NA out of 1000 replications. I changed the second line to:

    x <- rnorm(50)

and NAs were returned in 18 cases.

In your case, since you simulated the data, it could be that their distribution does not conform well to the Brownian motion model. Maybe you could transform them or discretize them and use a discrete trait model (i.e., Markovian model, type = "d" in ace).

HTH

Best,

Emmanuel

Le 11/05/2017 à 15:54, Juan Antonio Balbuena a écrit :
Hi all

I am playing around with synthetic cophylogenetic data. In one example, which represents a very extreme case of high agreement between the host and parasite phylogenies (the data was generated with 51 cospeciation, 2 sorting and 1 duplication events), I get a warning when using ace() to label the cophylogenetic nodes of the parasite tree:

fit.P<-ace(Pfreq[,2],obj$trees[[2]])
Warning message:
In sqrt(1/out$hessian) : NaNs produced

Where Pfreq[,2] is a vector of frequencies:

 >  Pfreq[,2]
  [1] 100.00000 100.00000  69.70874 100.00000 100.00000 100.00000 100.00000 100.00000
  [9] 100.00000 100.00000 100.00000  37.86408  38.44660  62.13592 61.55340 100.00000
[17] 100.00000 100.00000 100.00000 100.00000 100.00000 100.00000 100.00000 100.00000
[25] 100.00000 100.00000 100.00000 100.00000  62.13592 100.00000 100.00000 100.00000
[33] 100.00000 100.00000 100.00000 100.00000 100.00000 100.00000 100.00000 100.00000
[41] 100.00000 100.00000  68.15534 100.00000 100.00000 100.00000 100.00000 100.00000
[49] 100.00000 100.00000 100.00000 100.00000 100.00000

The following works fine

nodelabels.cophylo(pie=fit.P$ace/100, piecol=c("green","red"),cex=0.5, which="right")

but I have noticed that there is a NA in fit.P$sigma2. It would be nice to know whether this warning is important or not.

Thank you very much for your attention.

Juan A. Balbuena


-- 

Dr. Juan A. Balbuena
Cavanilles Institute of Biodiversity and Evolutionary Biology
University of Valencia http://www.uv.es/~balbuena <http://www.uv.es/%7Ebalbuena>
P.O. Box 22085 http://www.uv.es/cophylpaco <http://www.uv.es/cavanilles/zoomarin/index.htm>
46071 Valencia, Spain
e-mail: j.a.balbu...@uv.es <mailto:j.a.balbu...@uv.es>tel. +34 963 543 658    fax +34 963 543 733
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
*NOTE!*For shipments by EXPRESS COURIER use the following street address:
C/ Catedrático José Beltrán 2, 46980 Paterna (Valencia), Spain.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


Pour nous remonter une erreur de filtrage, veuillez vous rendre ici <http://f.security-mail.net/301EU0Nrv8J>




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


Pour nous remonter une erreur de filtrage, veuillez vous rendre ici : http://f.security-mail.net/301EU0Nrv8J



--

Dr. Juan A. Balbuena
Cavanilles Institute of Biodiversity and Evolutionary Biology
University of Valencia                                           
http://www.uv.es/~balbuena
P.O. Box 22085                                                   
http://www.uv.es/cophylpaco
46071 Valencia, Spain

e-mail:
j.a.balbu...@uv.es    tel. +34 963 543 658    fax +34 963 543 733
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

NOTE! For shipments by EXPRESS COURIER use the following street address:
C/ Catedrático José Beltrán 2, 46980 Paterna (Valencia), Spain.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


Libre de virus. www.avast.com
_______________________________________________
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