Skip to content
Prev 4620 / 20628 Next

resolution as random effect

Dear list,
I've a question about a spatial regression model I'm working with. Here
is my problem and question:

I'm modeling the local densities of a species (y) as a second order
polynom of the geographical position (lon,lat), time (year), and a
certain number of other variables:

mod1 <- lm( y ~ ... + poly(lon,lat, degree=2)*as.factor(year))

Then, I know that the sampling has a certain spatial resolution, that I
can represent with a regular grid. Thus, I was thinking that
observations within the same cell of the grid (gr.id) cannot be
considered completely independent, and that this could be represented
with a random effect like:

mod2 <- lme( y ~ ... + poly(lon,lat, degree=2)*as.factor(year),
random=list(gr.id=~1))

An additional level of complexity within my formulation, is given by the
temporal resolution. Thus, I would like to group the spatial dependency
of observations from the same cell within certain time intervals
(time.gr). Here my problem comes. I'm a bit confused on how to formulate
exactly the random effect expressed above into time.gr groups. I have
alternative slightly different formulations in mind, but I miss their
difference in practice.

Thanks in advance for any help or advice.

Valerio