Simple Cox regression with a continuous x

Theoretical examples

Example 1
We want to estimate the effect of age (x) on all-cause mortality (y) among a group of individuals ages 65 and older within a ten-year follow-up period. The failure event is death (0=No event, 1=Event). Age is measured in years, with values ranging from 65 to 100. The HR for age in years is 1.13, which suggests that the expected hazard is 1.13 times higher for an individual who is one year older than another individual.
Example 2
In this example, we estimate the association between weight (x) and hospitalization attributable to cardiovascular disease (y) on a population of 50-year-old women, who are followed for five years. The failure event is hospitalization for cardiovascular disease (0=No event, 1=Event). Weight at age fifty is measured in kilograms, ranging from 48 to 114. We find that the HR is 1.03. This suggests that a one-kilogram increase in weight is associated with a 3% increase in the expected hazard for hospitalization.

Practical example

Dataset
StataData1.dta
Variable namecvd
Variable labelOut-patient care due to CVD (Ages 41-50, Year 2011-2020)
Value labels0=No
1=Yes
Variable namegpa
Variable labelGrade point average (Age 15, Year 1985)
Value labelsN/A

sum cvd gpa if pop_cox==1

stcox gpa if pop_cox==1, noshow
Summary
The higher the grade point average at age 15, the lower the risk of having experienced out-patient care due to CVD in ages 41-50 (HR=0.48). The association is statistically significant (95% CI=0.42-0.56).