Hi Oliver, The "gls" from nlme uses REML by default. I think that caper or phylolm use ML instead. On small sample size ML estimates (e.g., "lambda") are known to be biased and you may sometimes not have enough power to estimate them. With increasing sample size (bigger trees) this is less an issue as the bias should vanishes and ML will likely converge to similar values to REML.
Also, “gls” estimates a correlation rather than a covariance structure. On non-ultrametric trees (such as yours) this will lead to different results. Regards, Julien De : R-sig-phylo <r-sig-phylo-boun...@r-project.org> de la part de Oliver Betz <oliver.b...@uni-tuebingen.de> Envoyé : dimanche 30 mai 2021 22:49 À : r-sig-phylo@r-project.org <r-sig-phylo@r-project.org> Objet : [R-sig-phylo] question regarding PGLS Dear list members: I tried various R packages to calcuate a PGLS with the data set (csv and nwk) I have attached to this email. I would like to use the Pagels lambda model to attain an index that measures whether data exhibit phylogenetic dependence or not. While doing so, I came up with the following problem. Using ape - for example, according to the script of the Latin American Macroevolution Workshop and others - I attained results (regarding intercept, slope and lambda) that differ from the results I received from caper or phylolm. For example, with ape, lambda amounts to 0.57, whereas according to caper or phylolm lambda amounts to 0. Please find the R script that I have used attached (first block is just the data reading and organisational part; 2nd block: PGLS Pagels Lambda according to ape, 3rd block: PGLS Pagels Lambda according to caper). Do you have any idea why these packages produce these different results and which software I should follow? Thanks for any suggestions. Oliver Betz University of Tübingen Tübingen Germany _______________________________________________ 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/