Hi Nic.
Have you tried the phytools functions fastAnc or anc.ML? These should
theoretically produce the same estimates as ace(...,method="ML"). This
should at least give you a clue as to whether you have a problem with
ace, or if you tree or data are badly conformed. fastAnc and anc.ML take
a tree and vector (in which the vector names attribute corresponds to
the tip labels of the tree) as input.
- Liam
Liam J. Revell, Assistant Professor of Biology
University of Massachusetts Boston
web: http://faculty.umb.edu/liam.revell/
email: liam.rev...@umb.edu
blog: http://blog.phytools.org
On 4/8/2014 8:23 AM, Nicolas Campione wrote:
Hello R Phylo List,
Question regarding rescaling trees using the ‘rescale’ function in ‘geiger’.
I’m attempting to reconstruct ancestral states based using the better supported
OU model, rather than BM. My understanding is that in order to do so, I simply
have to rescale the tree that is used in ape’s ace function based on the alpha
value obtained by fitting an OU model on the tree (using either geiger or
OUwie), so:
oufit<-OUwie(tree,data,model='OU1’)
outree<-rescale(tree,model='OU',alpha=oufit$solution[1]))
ace(trait,outree)
The first two lines run without issues, but when I run the ace function, I get
the following error:
Error in x %*% cov : non-conformable arguments
In addition: Warning message:
In sweep(x, 2, center) :
STATS is longer than the extent of 'dim(x)[MARGIN]’
A couple things that I’ve noticed: 1) there may be an issue with the rescaled
tree. I have a relatively high alpha (~0.1), which once used to rescale the
tree results in several internal branches that approach 0 (e.g., 9.879218e-10)
with a few long terminal branches; and 2) my sample size (26 taxa) may be too
small to obtain a reasonable estimate for alpha (this comes up as a warning
when I run OUwie).
I should also note that my tree is not ultrametric. I know that geiger is
currently not appropriate for fitting an OU model on non-ultrametric trees,
hence why I am using OUwie. Also my branch lengths are in millions of years.
If anybody has any opinions or suggestions, I would greatly appreciate your
assistance.
Cheers,
Nic
----
Nicolás E. Campione, M.Sc. Ph.D.
Postdoctoral Researcher
Uppsala University
email: nicolas.campi...@geo.uu.se<mailto:nicolas.campi...@geo.uu.se>
twitter: @PaleoNic<http://twitter.com/PaleoNic>
website: nicolascampione.weebly.com<http://nicolascampione.weebly.com/>
phone: +46 (0) 18 471 3526
Department of Earth Sciences - Palaeobiology
Villavägen 16
SE-752 36 Uppsala
Sweden
Department of Organismal Biology - Evolutionary Biology
Norbyvägen 18A
SE-752 36 Uppsala
Sweden
[[alternative HTML version deleted]]
_______________________________________________
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/
_______________________________________________
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/