Suppose I have data with the following format:
Date_DMY age_bracket Num_Infected Total_Infected Total_Prop_Infected
1/1/2000 30-39 1 1 0.0524
2/1/2000 30-39 2 3 0.1149
3/1/2000 20-29 3 6 0.1657
3/1/2000 30-39 2 9 0.2299
.
.
.
5/12/2000 20-29 1 228 0.7243
6/12/2000 40-49 1 229 0.7755
6/12/2000 20-29 1 230 0.7786
7/12/2000 20-29 1 231 0.7900
There are packages in R
which utilize binary variables to perform cox regressions (such as the survival
and survminer
package), however I only have counts, a cumulative total and a cumulative proportions.
How can I create a Cox proportional hazards model with this data using age_bracket
as a covariate? My aim is to evaluate a hazard ratio for the age brackets.