Let's say I have a dataset containing sexual relationships that occurred over a 3 year period for many individuals. We know the start and ending dates for all the relationships that were ongoing during that time. Now let's say we want to conduct a survival analysis to see how the hazard of developing HPV is affected by using condoms consistently across all relationships (
Now let's assume HPV can only happen once (this isn't the case in reality). So once you have it, you have it for life. Also our condom-use exposure is an individual-level exposure not a relationship-level exposure. This is what the data might look like:
HPV variable, 1 represents the relationship where HPV was contracted.
Because my event of interest can only occur once per person, this does not seem like an example of a repeated events analysis. However, different relationships can contribute exposure time.
So my question is, if I am performing survival analysis, should I leave the data at the relationship level, even though HPV can only occur once per person, and my explanatory variable of interest (
OverallCondom) is an individual-level indicator?
So in R using the
survival package, for example, the model would look something like:
model <- coxph(Surv(Persontime, HPV) ~ OverallCondom + cluster(ID))
Alternatively, would I want to aggregate the time at risk somehow, and then just use an invidual-level model? If so, what is the best way to count the exposure time?