[R-sig-phylo] Problem in ace with discrete data

Emmanuel Paradis Emmanuel.Paradis at mpl.ird.fr
Wed Feb 3 18:03:38 CET 2010


Hi Sébastien,

Sebastien Lavergne wrote on 03/02/2010 00:37:
> Dear All,   
> 
> I am having an unexpected error while trying to run an ancestral state 
> estimation for a binary variable.
> Surprinsingly (to me at least), it is returning a different error 
> message depending the type of model that is being used.
> I am attaching the files in case somebody wants to examine the problem 
> in detail.
> Do you think it is a problem of singularity in my data ?
> 
>  > library(ape) ; load('cou') ; load('mytreedi')
>  > SYMreconstruction <- ace(cou, mytreedi, type="discrete", model="SYM")
> Erreur dans matexpo(Q * phy$edge.length[i]) :
>   NA/NaN/Inf dans un appel à une fonction externe (argument 1)

Use the option 'ip' to change the parameter initial value for the 
likelihood optimization. It worked for me with:

m1 <- ace(cou, mytreedi, type="discrete", ip=.01)

>  > SYMreconstruction <- ace(cou, mytreediNoZ, type="discrete", model="ARD")
> Message d'avis :
> In sqrt(diag(solve(h))) : production de NaN

It's not an error message but a warning (assuming you meant the tree to 
be 'mytreedi', of course). Again, it works with me with:

m2 <- ace(cou, mytreedi, type="discrete", model="ARD", ip=.01)

Then you can feed m1 and m2 into anova().

HTH

Emmanuel

> I am working with R 2.10.1 with Package /ape/ version 2.4-1 (on a winXP 
> platform).
> Any insights appreciated.
> Cheers
> Seb
> 
> 
> -- 
>  -------------------------------------------------------------------------
>  Sébastien Lavergne
>  Laboratoire d'Ecologie Alpine, UMR-CNRS 5553
>  Université Joseph Fourier
>  BP 53, 38041 Grenoble Cedex 9, France
>  tel +33 (0)4 76 63 54 50
>  http://www-leca.ujf-grenoble.fr/membres/lavergne.htm
>  -------------------------------------------------------------------------
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> R-sig-phylo mailing list
> R-sig-phylo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-phylo

-- 
Emmanuel Paradis
IRD, Montpellier, France
   ph: +33 (0)4 67 16 64 47
  fax: +33 (0)4 67 16 64 40
http://ape.mpl.ird.fr/



More information about the R-sig-phylo mailing list