I'm sorry if this question is too broad for this board. I'm trying to figure out a survival model for my data. Right now I have it organized by country, year, "cur" which is my main IV, and event. I have an example of my data below. My issue is my main IV changes over time and I can have multiple events per country. It seems like having both of these should be possible in a survival model, but I don't know what model specifically I'd need or what R package to look towards. I'd really appreciate any advice. Again I apologize if this question isn't specific enough for this board.
id country year cur event 191 Suriname 1975 0.1269722 0 192 Suriname 1976 0.3103358 0 193 Suriname 1977 0.3103358 0 194 Suriname 1978 0.3103358 0 195 Suriname 1979 0.3103358 0 196 Suriname 1980 0.3571018 1 197 Suriname 1981 0.1718919 0 198 Suriname 1982 0.1718919 0 199 Suriname 1983 0.1718919 0 200 Suriname 1984 0.1718919 0 201 Suriname 1985 0.3442552 0 202 Suriname 1986 0.3442552 0 203 Suriname 1987 0.3665857 0 204 Suriname 1988 0.3560681 0 205 Suriname 1989 0.3671406 0 206 Suriname 1990 0.3671406 1 207 Suriname 1991 0.3671406 0 208 Suriname 1992 0.3671406 0 ...
Edit:
Thanks to everyone for the information and the informative discussion. My events here, regime failure, can theoretically happen more than once in a year but in the time frame I'm looking at it's very rare, to the point of almost not happening. I'm also sensitive to the point that I have only year level data for my IV and the events can happen at different points within a year. However the data is just not detailed enough to go to a time period less then a year. I think I can live with year long intervals without really missing a lot of nuance. I have about 100 years of data with 10,000ish country-year observations and 360ish events so I don't think I loosing too much with year level data. I'm also not that worried about the direction of causation here and the IV is a measure that should be relatively stable throughout the year.
Edit #2
I have another more technical R question if anyone is still reading this. I added another column so that each year now has an end year. The data now looks like:
id country year year_end cur event 191 Suriname 1975 1976 0.1269722 0 ...
I then ran this CoxPH model:
coxph(Surv(year, year_end, event) ~ v2x_corr, data = z)
However I'm concerned that I might have just treated each country-year as a totally separate case.