Dear Enrico/Emmanuel, 

Actually, I just realized I need continuous traits, not discrete. Sorry about 
that. Thanks so much for pointing me towards rTrait(using Cont). 


Would it be right that a one optima OU model with rTraitCont would have theta 
set to one single value? And a two optima model would have theta at two 
possible values for each branch? Etc.? 


Enrico, thanks very much for that thought. So I am simulating trees and traits 
on trees, and then calculating K using the phylosignal function. Thus, K is 
implicitly manipulated, instead of explicitly manipulated. 


Scott
On Monday, January 31, 2011 at 3:28 AM, Enrico Rezende wrote:

> Scott,
> one important caveat that should be added is that, even when one knows 
> and controls the parameters of the evolutionary model, the resulting 
> dataset will have the expected amount of signal only ON AVERAGE, given 
> the inherent stochasticity of these models. For instance, if you want K 
> = 1 and assume Brownian motion character evolution on a given tree, you 
> may still get data that have a K ranging between, say, 0.6 and 1.4 (with 
> a mean K = 1, of course). Thus, you might want to quantify K after the 
> simulations to ensure that you're obtaining the amount of signal desired.
> 
> Ah yes, this applies primarily to quantitative traits, for qualitative 
> characters things change a bit.
> 
> Enrico
> 
> 
> 
> Emmanuel Paradis escribió:
> 
> > On Fri, 28 Jan 2011 17:20:57 -0600 Scott Chamberlain 
> > <myrmecocys...@gmail.com> wrote:
> > 
> > > Dear R community,
> > > I would like to simulate discrete characters on a randomly generated 
> > > tree. However, I would like to create different sets of trees and 
> > > associated characters at certain levels of phylogenetic signal. 
> > > 
> > > 
> > 
> > If you know the relationship between phylogenetic signal (Blomberg et 
> > al's K in your case) and the parameters of the model used to simulate 
> > the characters, this would be easy. But I don't think this 
> > relationship is obvious, at least for discrete characters. Keep in 
> > mind also that, for a given model and parameters of evolution, the 
> > quantity of phylogenetic signal depends on the tree.
> > 
> > 
> > > Can someone point me in the right direction?
> > > 
> > > I am familiar with sim.char from geiger package for simulating 
> > > characters, and rcoal for simulating the ultrametric trees that I 
> > > want, but I don't know how I could, if at all, simulate characters 
> > > that have a particular a priori set phylogenetic signal. 
> > > 
> > > 
> > 
> > BTW, instead of rcoal() you may wish to use rbdtree(). And if you want 
> > more flexibility for simulating the characters, see rTraitDisc() in ape.
> > 
> > Best,
> > 
> > Emmanuel
> > 
> > 
> > > As a simple example, the following example gets phylogenetic signal 
> > > (K) that is all over the map in different runs:
> > > 
> > > 
> > > q <- list(rbind(c(-.5, .5), c(.5, -.5)))
> > > traits <- sim.char(tree, q, model = "discrete", n = 1)
> > > traits_ <- as.data.frame(traits[,,1])
> > > traitsvec <- traits_[,1]
> > > names(traitsvec) <- rownames(traits_)
> > > phylosignal(traitsvec, tree, reps = 100)
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > Sincerely,
> > > 
> > > Scott Chamberlain
> > > Rice University, EEB Dept.
> > > 
> > > 
> > > 
> > >  [[alternative HTML version deleted]]
> > > 
> > > _______________________________________________
> > > R-sig-phylo mailing list
> > > R-sig-phylo@r-project.org
> > > https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
> > > 
> > > 
> > 
> > _______________________________________________
> > R-sig-phylo mailing list
> > R-sig-phylo@r-project.org
> > https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
> > 
> > 
> 
> 
> -- 
> *******************************************************************
> Enrico L. Rezende
> 
> Departament de Genètica i de Microbiologia
> Facultat de Biociències, Edifici Cn
> Universitat Autònoma de Barcelona
> 08193 Bellaterra (Barcelona)
> SPAIN
> 
> Telephone: +34 93 581 4705
> Fax: +34 93 581 2387
> E-mail: enrico.reze...@uab.cat
> 
> *******************************************************************
> 
> 
> 





        [[alternative HTML version deleted]]

_______________________________________________
R-sig-phylo mailing list
R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo

Reply via email to