Hi Alanna,
You can get this kind of error if your tree has tip edges with zero
length. Then C<-vcv.phylo(tree) will be exactly singular. Could this
be true of your tree?
Best, Liam
--
Liam J. Revell
University of Massachusetts Boston
web: http://faculty.umb.edu/liam.revell/
email: liam.rev...@umb.edu
blog: http://phytools.blogspot.com
On 5/17/2011 11:23 AM, Alanna Maltby wrote:
Dear all
I've been trying to use Maximum Likelihood to estimate ancestral
characters using ace in APE, but I get an error:
?Error in solve.default(out$hessian) :
Lapack routine dgesv: system is exactly singular?
My code looks like this:
tree<-read.nexus("tree.nex")
data<-read.csv("data.csv")
BW<-data.frame(data[,c(2,3)])
rownames(BW)<-data[,2]
na.omit(BW)->BW
name.check(tree,BW)->overlap
drop.tip(tree,overlap$Tree.not.data)->tree2
tree3<-multi2di(tree2)
BW2<-BW[tree3$tip.label,]
BW3<-data.frame(BW2[,2])
as.matrix(BW3)->BWM
as.vector(BWM)->BWV
names(BWV)<-BW2[,1]
asrBW<-ace(BWV, tree3, type="continuous")
asrBW$ace
which is possibly not super-elegant, but works when I use pic instead of
ML.
I notice that someone brought up the same problem last year but there
were no solutions. Any ideas?
Many thanks,
Alanna
-------------------------------------------------------------
Alanna Maltby
PhD Student - Evolution of Echolocation in Bats
University College London and Institute of Zoology
Tel: +44 (0) 20 7449 6322
Website: www.zsl.org/alannamaltby<http://www.zsl.org/alannamaltby>
The Zoological Society of London is incorporated by Royal Charter
Principal Office England. Company Number RC000749
Registered address:
Regent's Park, London, England NW1 4RY
Registered Charity in England and Wales no. 208728
_________________________________________________________________________
This e-mail has been sent in confidence to the named add...{{dropped:20}}
_______________________________________________
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