I would appreciate statistical advice on this problem. I have 3 years of data taken in defined area: 200x200km. Area has been divided into 4 quadrants and each year 20 random fields in the area were sampled in each quadrant giving 80 samples total per year. enter image description here The outcome is the number of diseased plants out of 30. So the response is binomial (proportion from 0 to 1, or number of plants out of 30). The important thing is that different fields were sampled every year (surveyors were not coming back to the same field). Along with the per-field incidence data I have other variables which could potentially be the predictors of disease presence - vector presence, climate, host distribution, intercrop etc. Now, I would like to analyse this data.

My first approach was GLM:

# Response variable (No of positives and negatives)
# Create dataframe with variables from MyData that will become fixed terms:

          data = data, 
          family = binomial(logit)) 

and then GLMM with Year and Quad as crossed random terms:



model<-glmer(y~VECTORCOUNT+PREC+TEMP+ALT+HOST+INTERCROP+ (1|YEAR) +(1|Quad),binomial,data=data)

Is any of these approaches appropriate and well scripted? What would be a better alternative?

Finally - is it ok to analyse this data as it is? I might need to account for spatial correlation - can I do it in GLM or GLMM framework? Or perhaps I need to go bayesian way to account for it? How to insert some sort of X.Y term that would account for spatial correlation in my frequentist GLM and GLMM approach?

  • $\begingroup$ "Going Bayesian" is a completely separate choice from the statistical model that you decide to use. You can use a Bayesian analysis in the context of both a GLM and a GLMM. $\endgroup$ – jaradniemi Jan 27 '17 at 14:45
  • $\begingroup$ True. Someone has mention to me that to address the spatio-temporal correlations here Bayesian is the only way. But perhaps accounting for a random term Year can do a justice here as well? Any idea how to account for spatial correlation in frequentist GLM or GLMM? $\endgroup$ – MIH Jan 27 '17 at 14:56

I am still learning about GLMMs, so I can't comment in depth, but one issue to think about is the number of levels represented in your random effects. In your case, you have only three levels of YEAR and only four levels of QUAD. In calculating a random effect, the software is this calculating the variance between three or four groups, respectively, which is a pretty small number.

I believe I've read that Andrew Gelman recommends at least five levels for random effects, and I've read others who suggest that 30 or more levels are required.

This is one of the issues regarding random effects that I'm still learning. On the one hand, you're wanting to generalize beyond the specific years and quads you used, which suggests random effects. Similarly, plots within both years and quads will be correlated because of common conditions, again recommending random effects. But with so few years and quads, the whole cluster/within-between part of random effects seems shaky.

You might find one of Gelman's introductory papers helpful: http://www.stat.columbia.edu/~gelman/research/unpublished/multi.pdf

| cite | improve this answer | |
  • $\begingroup$ Thanks that is a good point. I thought I have 20 per each random effect and that it might suffice, However, I do not sample the same field every year (so it is not one field that I am returning to). So can I treat it as crossed random effect? Or is it a nested random effect? If 20 is not sufficient I can just have YEAR as random effect? $\endgroup$ – MIH Jan 27 '17 at 14:43
  • $\begingroup$ @MIH: I could be wrong, but I don't think that the fact that you might have hundreds of measurements per quad overcomes the fact that you have only four quads. Calculating the variance of only four groups (quads) is still tricky, even if you have a really good idea of the value of each quad. How well you can calculate the variance between groups depends on both how well you can estimate the value for each group -- and you can improve this with more samples per group -- combined with how well you can estimate the variance between groups. $\endgroup$ – Wayne Jan 27 '17 at 17:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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