Hello everyone,
I have a tree, with body mass data for the tip taxa. I am interested
in simulating the evolution of continuous traits by BM that are
correlated with body mass. I want to use the body mass tip data that I
have to inform the character simulation, so that my resulting
simulated tip
Hi All,
I am using pgls in the ¡®caper¡¯ package in R to test the
correlation between four explanatory variables and a response variable. Two of
the explanatory variables are continuous, the other two are discrete, and the
response variable is continuous. After running
Hi Andrew.
For desired correlation r, size data x, and tree you could just do:
library(phytools)
y-r*x+sqrt(1-r^2)*fastBM(tree)
This should give you the correlation r on average and the y|x should be
Brownian. (If x is Brownian, then both y x y|x will be too.)
- Liam
Liam J. Revell,
Actually, modify my previous email. That only works for sig^2(x)=1.0. It
should be:
library(phytools)
y-r*x+sqrt(1-r^2)*fastBM(tree,sig2=mean(pic(x,tree)^2))
- Liam
Liam J. Revell, Assistant Professor of Biology
University of Massachusetts Boston
web: http://faculty.umb.edu/liam.revell/
Liam Revell wrote:
library(phytools)
y-r*x+sqrt(1-r^2)*fastBM(tree,sig2=mean(pic(x,tree)^2))
This should give you the correlation r on average and the y|x should be
Brownian. (If x is Brownian, then both y x y|x will be too.)
If y is evolving in response to x, and x is changing