Re: [R-sig-phylo] Trait simulations

2009-05-20 Thread Emmanuel Paradis
Liam, The package MASS has the function mvrnorm that simulates from a multivariate normal distribution. Its help page says: The matrix decomposition is done via 'eigen'; although a Choleski decomposition might be faster, the eigen decomposition is stabler. The package mvtnorm (on C

Re: [R-sig-phylo] Trait simulations

2009-05-19 Thread tgarland
esearch on Evolution http://nere.bio.uci.edu/ (A University of California Multicampus Research Project) Original message Date: Tue, 19 May 2009 14:19:12 -1000 From: Marguerite Butler Subject: Re: [R-sig-phylo] Trait simulations To: r-sig-phylo@r-project.org >Hi S

Re: [R-sig-phylo] Trait simulations

2009-05-19 Thread Marguerite Butler
Hi Sam and Jeremy, On May 19, 2009, at 11:34 AM, Sam Brown wrote: > > >> I was just wondering if there is a package or function in R that >> can simulate >> two continuous traits with a user-specified correlation coefficient >> using a >> known tree topology, branch lengths, and a model of Br

Re: [R-sig-phylo] Trait simulations

2009-05-19 Thread Sam Brown
> I was just wondering if there is a package or function in R that can simulate > two continuous traits with a user-specified correlation coefficient using a > known tree topology, branch lengths, and a model of Brownian motion (or even > OU, if possible)? I stumbled across the ouch package yes

Re: [R-sig-phylo] Trait simulations

2009-05-19 Thread Liam J. Revell
Hi Jeremy, Perhaps you've already figured this out. There may be a function available in R to do this, but if not, in principle for BM it should be fairly easy to do this "manually." First, read your tree in: tree<-read.tree(FILE, etc.) % put filename or paste in tree then compute the ph

[R-sig-phylo] Trait simulations

2009-05-18 Thread jeremy . beaulieu
Hi all~ I was just wondering if there is a package or function in R that can simulate two continuous traits with a user-specified correlation coefficient using a known tree topology, branch lengths, and a model of Brownian motion (or even OU, if possible)? All the best, Jeremy Beaulieu