Hello again, I think the problem has to do with one extinct taxa in my tree. When I change the branch length so the species becomes "alive" (ultrametric tree) the abline shows up at a more "normal" place. Any hint on how I can correct this? Maybe the only solution is to take the problematic taxon out of the analysis... ᐧ
2015-07-22 15:07 GMT+01:00 Sergio Ferreira Cardoso < [email protected]>: > Dear all, > > I'm analysing a small data set consisting of values for 27 taxa. I am > extracting phylogenetic residuals from a regression (as in Revell, 2009) to > be used as size corrected values. Almost all the residuals are negative > because the regression line is positioned above what I would expect. Do you > think this has something to do with the phylogeny? It probably has because > everything looks fine with the ordinary least-squares. > Thanks in advance. > > All the best, > Sérgio. > > Here is the coding I used: > > ## Used packages > > > library("ape", lib.loc="~/R/win-library/3.1") > > library("caper", lib.loc="~/R/win-library/3.1") > > library("nlme", lib.loc="~/R/win-library/3.1") > > library("phytools", lib.loc="~/R/win-library/3.1") > > library("phangorn", lib.loc="~/R/win-library/3.1") > > ## fitting PGLS > > > fit_brain<-pgls(perimeter~brain,comparative.data(tree,df,"Species")) > > summary(fit_brain) > > ## cross checking using phytools > > > phyl.resid(tree,brain,perimeter,method="BM") > > ## quick plotting > > > plot(brain,perimeter) > > abline(fit_brain) > > ols<-lm(perimeter~brain,data=df) > > abline(ols) > > > -- > Com os melhores cumprimentos, > Sérgio Ferreira Cardoso. > > -------------------- > > Best regards, > Sérgio Ferreira Cardoso > > > > > MSc. Paleontology candidate > Departamento de Ciências da Terra - FCT /Universidade Nova de Lisboa > Geociências - Universidade de Évora > > Lisboa, Portugal > -- Com os melhores cumprimentos, Sérgio Ferreira Cardoso. -------------------- Best regards, Sérgio Ferreira Cardoso MSc. Paleontology candidate Departamento de Ciências da Terra - FCT /Universidade Nova de Lisboa Geociências - Universidade de Évora Lisboa, Portugal
_______________________________________________ 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]/
