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

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

Reply via email to