Hi Sérgio,

It seems your results make good sense. alpha=0 is too far from the "optimum" value (i.e., the value that maximises the log-lik), so the optimisation fails to maximise the log-likelihood with respect to this parameter. It has been written in the literature that it is difficult to estimate reliably alpha in an OU model, and your results seem to confirm this.


Besides, alpha=0 is equivalent to a Brownian motion model. So if your traits are not really evolving according to this model, the GLS fitting procedure may be in difficulty.

You may try:

correlation = corMartins(value=0.9, phy=tree, fixed=FALSE)

If this estimates alpha=0.99, then you may probably rely on this result (after checking the estimates of the coefficients of course).

Best,

Emmanuel

Le 20/01/2017 à 15:16, Sergio Ferreira Cardoso a écrit :
Dear all,

I tried to estimate a value for alpha parameter of corMartins
(Ornstein-Uhlenbeck) but the output is a bit puzzling. I do as follows:


fitOU<-gls(fcl~mass+loc_dim+activity+feeding+loc_typ+agility,correlation=corMartins(value=0,phy=tree,fixed=FALSE),data=df,method="ML",weights=varFixed(~vf))
Error in recalc.corStruct(object[[i]], conLin) :
NA/NaN/Inf in foreign function call (arg 4)

Enter a frame number, or 0 to exit

1: gls(fcl ~ mass + loc_dim + activity + feeding + loc_typ + agility,
correlati
2: nlminb(c(coef(glsSt)), function(glsPars) -logLik(glsSt, glsPars),
control =
3: objective(.par, ...)
4: logLik(glsSt, glsPars)
5: logLik.glsStruct(glsSt, glsPars)
6: recalc(object, conLin)
7: recalc.modelStruct(object, conLin)
8: recalc(object[[i]], conLin)
9: recalc.corStruct(object[[i]], conLin)

It work when I turn the "value" to 1, but then the estimate for alpha is
0.99, which looks like it isn't actually estimating a value and is instead
accepting my input as the alpha value. Do you think there is a reason for
this to happen?

Thank you in advance.

Cheers,
Sérgio.


_______________________________________________
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/

Reply via email to