lizzieinvancouver / pmm

phylogenetic mixed models -- and we all learn together
2 stars 1 forks source link

correlation issue ... #7

Closed lizzieinvancouver closed 3 years ago

lizzieinvancouver commented 4 years ago

@maxfarrell Check this out ...

phylo <- ape::read.nexus("https://paul-buerkner.github.io/data/phylo.nex")
 A <- ape::vcv.phylo(phylo)
 B <- ape::vcv.phylo(phylo, corr=TRUE)
identical(A,B)

What the ...? (Note @MoralesCastilla)

maxfarrell commented 4 years ago

This is exactly what I ran when I saw that he wasn't using cor=TRUE, despite this being what I took away from the PMM papers.

My conclusion was that the tree they used had a depth of 1 already. If you simulate a random ultrametric tree you can see the difference:

require(phytools)
tree <- pbtree(n=10)
vcv(tree)
vcv(tree, cor=T)
lizzieinvancouver commented 4 years ago

@MoralesCastilla Can you update the main sims code to both run as it does now but also run the same exact data with corr=TRUE in simulation and analysis, and allow us to vary tree-depth a bit more systematically?

After that pass back to @lizzieinvancouver and I will adjust the PGLS to estimate lambda, which should give us some insight on that... then we need others to help run some sims.

lizzieinvancouver commented 3 years ago

@legault commits in Nov 2020 (e.g. commit d85d59e891fa3b987073ee3eddb0f4642675f205) say you get the same output, though I can see that it should matter. Right now we have corr=TRUE which seems safest.