[R-sig-ME] Problem with computing gr and false convergence
Ben Bolker
bbolker at gmail.com
Tue Jun 14 21:09:42 CEST 2011
On 06/14/2011 02:57 PM, Iker Vaquero Alba wrote:
>
> Dear R-users:
>
> I am fitting a model with quite many terms, and I'm having a lot of
> problems. Either I get:
>
>
> "In mer_finalize(ans) : gr cannot be computed at initial par (65)"
>
> or false convergence problems, when the model is a little bit
> simpler. I attach the most complex one with "verbose=TRUE" to see if
> you can help me detectt where the problem is:
>
>
> hatchcoltailmodel1<-lmer(nhatch~sex+mod+briventral+brithr+tlength+cond+briventral:brithr+briventral:tlength+briventral:cond+briventral:sex+briventral:mod+
>brithr:tlength+brithr:cond+brithr:sex+brithr:mod+tlength:cond+tlength:sex+tlength:mod+
>
cond:sex+cond:mod+(1|site/pair)+(1|year),family=poisson,na.action=na.omit,verbose=TRUE)
>
> 0: nan: 1.06217 0.584705 0.261488 -15.3440 -0.757161
> 16.9953 3.85760 1.53215 1.30924 5.14768 -0.0259057 0.0675839
> 0.172804 9.56398 0.000488889 -0.000119170 0.0156963 0.00445958
> -0.109915 -0.0119783 -0.0113610 -0.00132653 0.00594852 -2.29204e-05
> -0.0678690 0.00288760 0.321050 -0.0107392 0.0195566 -0.00242138
> -0.0538382 -0.0866086 -0.00632440 -0.168793 -0.0123981 0.00379237
> -0.00313671 -0.0228579 0.504940 nan -0.722186 -1.31712 -0.618912
> -1.25492 Mensajes de aviso perdidos In mer_finalize(ans) : gr cannot
> be computed at initial par (65)
>
>
Very hard to say without a reproducible example. Can you post the
data somewhere?
How big is your data set?
If any of your variables are continuous, consider centering and
scaling them (e.g. using scale())
Other than that, I only have a couple of coding style suggestions.
1. I *think* but am not sure that your very long model above is
equivalent to
(briventral+brithr+tlength+cond+sex+mod)^2-mod:sex
(all main effects + all pairwise interactions except mod:sex) but you
should of course check that (and the order might not be the same as the
model you have above).
2. It is best to use the 'data' argument to specify a data frame
(rather than attach()ing or having the variables floating around in the
workspace)
More information about the R-sig-mixed-models
mailing list