Trying to determine how to analyse a time dependent variable (rainfall) in a survival analysis. Two rows of example data for animal A and animal B as below: Each value next to the animal represents rainfall recorded (in mm) for each day, with animal A dying after day 2, and animal B surviving through past day 4.
animal A: 12, 24 animal B: 6 ,3 5, 7
If I wanted to look at the effect of TOTAL rainfall (cumulative over all days surviving), how would I code this time dependent variable WHEN the total number of days each animal survived wasn't the same. Is it even possible to analyse the effect of total rainfall when the number of days this total rainfall is calculated over differs between animals?