[R-sig-ME] Spatial autocorrelation in dependent variable

Ben Bolker bbolker at gmail.com
Wed Dec 15 16:09:43 CET 2010


On 10-12-15 09:59 AM, Arnaud Mosnier wrote:

> *However, when I define the correlation structure with a function like
> corGaus, things start correctly, but after a moment, R simply close
> without any warning on my desktop computer.
> I used the same code on a workstation with larger RAM capacities and
> Rx64 and this time it did not close but gave me the following message.
> "Error: evaluation nested too deeply: infinite recursion /
> options(expressions=)?"
> 
> Looking at previous mails dealing with that kind of problem, I tried
> options(expressions = 10000), but this time R close without warning as
> previously on the other computer.
> Have you suggestions about what could cause the infinite recursion ?
> 
> my model has the following form
> 
> test_lme <- lme(Dens ~ Speed , random = ~ 1|Year/Date/Survey, data =
> test, correlation = corGaus(form = ~ Xproj + Yproj))
> 
>>str(test)
> 
> 'data.frame':   54445 obs. of  7 variables:
>  $ Xprojc: num  -1.91 -1.91 -1.91 -1.91 -1.91 ...
>  $ Yprojc: num  -1.99 -1.96 -1.93 -1.9 -1.87 ...
>  $ Year  : Factor w/ 11 levels "1990","1992",..: 1 1 1 1 1 1 1 1 1 1 ...
>  $ Date  : Factor w/ 34 levels "1990-09-12","1992-09-12",..: 1 1 1 1 1 1
> 1 1 1 1 ...
>  $ Survey: Factor w/ 37 levels "pts_kernP1990-09-12_Real",..: 1 1 1 1 1
> 1 1 1 1 1 ...
>  $ Dens  : num  4.72e-05 8.27e-04 4.65e-03 8.70e-03 5.65e-03 ...
>  $ Speed : num  0.794 0.575 0.572 0.67 0.867 ...

  The only thing that springs to mind is that you are using Xproj and
Yproj in your correlation formula, but you have Xprojc and Yprojc
(presumably centered versions of the same variables) in your data frame?




More information about the R-sig-mixed-models mailing list