I am trying to model annual tree nut production using climate predictors.

The nut data (dependent) is a binary timeseries (0,1 - representing unsuccessful and successful nut production), with one observation per year, and with 90 years of data and two missing years (88 onservations).

The independent variables are monthly climate variables, including months in previous years (for example, Temp.July.t, Temp.July.t-1)

I'm using R, and have an basic-intermediate knowledge of statistics.

My problem is that the dependent data has strong temporal autocorrelation (nut production cannot be successful two years running). I'm looking for a pointer towards a technique that will allow me to deal with the autocorrelation in the binary data and create a statistical model that allows me to investigate the relationship between nut production and climate.

Thank you.

  • $\begingroup$ Are you saying there's a strong negative autocorrelation, ie that if year t=1, year t+1 must equal 0? Is it possible to have two 0's in a row? $\endgroup$ Oct 17, 2012 at 15:13
  • $\begingroup$ It is possible to have two 0's in row, but not two 1's. So yes, if t=1 then t+1 = 0, but not necessarily the other way around (so if t=0, t+1 can be either 0 or 1. $\endgroup$
    – Andy HP
    Oct 17, 2012 at 15:28

1 Answer 1


If the only autocorrelation present is that a successful year must be followed by an unsuccessful year, a simple and effective approach would be to calculate a binary logistic regression on a dataset that excludes the dependent variable for all those years in which the preceding year was successful. Because those years were already determined as unsuccessful by success in the preceding year, the fact that they were unsuccessful can yield no information about the relevance to success or otherwise of the independent climate variables. With 90 years of data the exclusion of those years should still leave a reasonably large dataset.

The resulting model will be partly deterministic (the year after a successful year is an unsuccessful year) and partly stochastic (the year after an unsuccessful year has a certain probability of success, dependent on the climate variables, as estimated by the regression).

(With apologies if this is stating the obvious) excluding the dependent variable for year t because year t-1 was successful does not mean dropping all the data for year t. The independent variables for the months in year t are still potentially relevant as lagged variables influencing success or otherwise in years after t.

  • $\begingroup$ Thanks Adam, I've been investigating all sorts of possibilities for complex solutions, and missed a common-sense solution! $\endgroup$
    – Andy HP
    Oct 18, 2012 at 13:30

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.