Converting a Continuous variable to categorical for Cox regression

In a Cox regression model where our variable of interest is continuous (e.g., a lab measurement);

If we want to obtain something other than a unit risk ratio for that variable (e.g., the hazard ratio of mortality among people who are in Quartile 4 (>75 percentile) vs Quartile 1 (< 25 percentile) for the lab measurement based on distribution of the measurements in our cohort), what would be the best way to integrate this variable into our model?

Would it be okay to create another column in our data which would indicate the quartile that person falls into and subsequently add that to the model?

Or is it better to run the model by keeping the variable as continuous, and then use the beta coefficient we find to calculate the hazard ratio by subtracting median values of different quartiles, multiplying them by the beta and exponentiation?

Thank you for your responses.

• What do you mean by "subtracting median values of different quartiles"? – Michael M Apr 2 '18 at 6:38
• I meant if the median for the lab measurement in Quartile 4 is a and median in Quartile 1 is b, then I would calculate the hazard ratio for Quartile 4 (Quartile 1 : reference group) as exp(beta * (a-b)). I'm not sure if this would be the correct way of doing it. – Ozan Dikilitas Apr 2 '18 at 14:07
• @OzanDikilitas Yes that would be the correct way to obtain that value from a continuous covariate. The important thing--what I sensed in your question and what I based my answer on--is for modeling an exposure not to go about slicing it into arbitrary cutpoints if it is not a hypothesis driven approach. – AdamO Apr 6 '18 at 14:35