I have some spatial measurement for two quantities, x and y. y is my dependent variable that I am looking to build a linear mixed effects model.Each point in space (lat,long) has one value of x, for which there are multiple repetitive measurements for y (hence the mixed effects). Note that two points in space could have the same value of x. Also the multiple repetitive measurements are different in numbers, for instance point 1 in space could have 10 values of y (for the same value of x) and point 2 in space could have 50 values of y for the same/different value of x.

My question in general is if this arrangement is suited for a mixed effects model or not. The effects of x on y will be treated fixed and the reps (dummied as integer values) will be randomized effects. What is particularly confusing is that in this context rep 1, will have a different impact on y at spatial point 1 vs 2 or some other point, so in general the effect of reps varies in space. (Note that the number of reps is different in space, as per my earlier observation).

Also the points are reasonably close to each other to disregard any explicit spatial covariates in the model.

The model I have in mind is

y = bx + Zu + e

where b is the unknown coefficient, Z is a vector of 1 and 0, depending on if that rep value was there in the experiment or not. So for example if an experiment had reps 1, then that row for Z would equal [1,0,0,0,0.....].

In other words that row would translate to,

yi = bxi + r1 + ei

Saying that value of y at the ith location, is a function of x at that location and randomized effect given the fact that it was the first rep at that location. r1 is that effect. We could have effects r2, r3 and so on. u is the unknown vector of reps and e is white noise.

  • $\begingroup$ Why don't you show your mixed-effect model specification here? $\endgroup$
    – Aksakal
    Commented Dec 18, 2014 at 19:47
  • $\begingroup$ Sure, I just did that. Does that make sense? $\endgroup$
    – gbh.
    Commented Dec 18, 2014 at 20:09

1 Answer 1


My question in general is if this arrangement is suited for a mixed effects model or not.

Yes, this is exactly the type of scenario (eg different cluster sizes) where a mixed effects model would be suited. You would fit random intercepts for the point id.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.