I have two data frames and I would like to determine correlation or another type of relationship between them.
The first data frame is consumption of soft drinks weekly (in liters).
Soft drinks consumption
ID WEEK1 WEEK2 WEEK3 ...... WEEK 28
1 1.8 2 2.5 ...... 5
2 0.7 0.3 0.5 ...... 1
.
.
.
1108 1 2 3 ...... 1
So I have liters of soft drinks consumed on sample of 1108 people.
Than I have data frame that shows that a same person had an infection in actual week.(1 is infection, 0 no infection)
Infection
ID WEEK1 WEEK2 WEEK3 ...... WEEK 28
1 1 0 0 ...... 1
2 0 0 0 ...... 0
.
.
.
1108 1 0 0 ...... 0
Could you suggest me some method, test or type of linear regression, which I could use to determine relationship between consumption of soft drinks and infections?
I would like to use R software, so if you could suggest and methodology I would very appreciate that.