Skip to content
Prev 6266 / 20628 Next

panel data with spatially patterned errors

Dear Reinhold,

No, I haven't thought of that--because I'm not clear on how that would work... thought I'd be very happy to be illuminated.

If I try this model:

M3 <- lme(y ~ year, random = ~ 1 | region/gridcell, correlation = corExp(form = ~ long + lat | region/year), data=data)

I get the error:

Error in lme.formula(y ~ year, random = ~1 | region/gridcell, correlation = corExp(form = ~long +  : 
  Incompatible formulas for groups in "random" and "correlation"

And if I try this:

M4 <- lme(y ~ year, random = ~ 1 | region/gridcell, correlation = corExp(form = ~ long + lat | region/gridcell/year), data=data)

I get:

Error in corFactor.corSpatial(object) : 
  NA/NaN/Inf in foreign function call (arg 1)
In addition: Warning messages:
1: In min(unlist(attr(object, "covariate"))) :
  no non-missing arguments to min; returning Inf
2: In min(unlist(attr(object, "covariate"))) :
  no non-missing arguments to min; returning Inf

In the latter case, I'm not sure what to make of the error and warnings, but it seems to me that this specification looks for within-group correlation within "groups" of 1, because I have segmented the data down to gridcell.years.

Can you tell me if I'm doing something wrong?

Thanks for your help,
Malcolm
On 22 Jun 2011, at 05:55, Reinhold Kliegl wrote: