Re: [R-sig-phylo] question regarding PGLS

2021-05-30 Thread Simone Blomberg
Another issue is that the tree is not ultrametric. If you use nlme::gls to fit the model and you have a non-ultrametric tree, you need to use the weights argument to pass the tip heights. Otherwise gls() assumes the tree is ultrametric. This could be part of the problem. I wrote a post about

Re: [R-sig-phylo] question regarding PGLS

2021-05-30 Thread Liam J. Revell
Dear Oliver & Julien. > Also, “gls” estimates a correlation rather than a covariance > structure. On non-ultrametric trees (such as yours) this will lead to > different results. This is a great point. If your tree is non-ultrametric you can do something like: w<-diag(vcv.phylo(tree))

Re: [R-sig-phylo] question regarding PGLS

2021-05-30 Thread Julien Clavel
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

[R-sig-phylo] question regarding PGLS

2021-05-30 Thread Oliver Betz
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