# Logistic regression with year as covariate

I am trying to investigate factors associated with disease in 2 different years (2013 and 2014) and would like to include year as one of the variables too.

Would the normal logistic regression approach work on such data?

Data sample provided where the values are arranged and coded as per year. x are continuous variables, year 1= 2013, 2=2014,Yes.No13.14 simly means 0=no disease, 1=disease present.

x   Year  Yes.No.13.14
155 1   0
150 2   0
740 1   0
760 2   1
100 1   0
850 2   0
163 1   1
152 2   1
0   1   0
460 2   0
130 1   0
133 2   1
450 1   0

• Sure, why not? You can include the year as a factor in your model. – JohnK Mar 10 '17 at 15:19
• Since only two years, you could include it as a factor, or numerically, but then maybe center in some way, that is, use $\text{year}-2013$ as the variable. – kjetil b halvorsen Mar 10 '17 at 15:49
• @JohnK,thank you. Wasn't very sure whether it would work due to fact that data was collected per farm thus farmers gave information for 2013 and 2014. Thus doubled the data i.e every farm would have two rows. – Josh Mar 10 '17 at 17:18

Yes, you can certainly include year in your analysis, ideally as a factor since you have data from only two years.
Your concerns about non-independence due to multiple measurements on each farm suggest that you might want to include farm as a random effect in your model as well.