# How to interpret categorical covariates for Cox regression

I am using Cox regression to model the deterioration of bridges using covariates such as salt (tons/mile), average daily traffic (ADT), average daily truck traffic (ADTT), span length, snow day per year, and some categorical covariate like superstructure type, district, or region. When I built my model, the continuous covariates were statistically significant and the categorical covariate of district or region in two separate models which do not have any defined or exact attribute except that it divides the states spatially are also statistically significant in the presence of the continuous covariates. My question is when interpreting the categorical covariates, for example, district 1 hazard is 50% more than district 3. Is the increased hazard due to the continuous covariates already in the model, which itself has to be interpreted for each unit of increase in the covariate or the 50% increased hazard from the district is from some other factors not captured by the continuous covariate in the model?

My question is when interpreting the categorical covariates, for example, district 1 hazard is 50% more than district 3. Is the increased hazard due to the continuous covariates already in the model, which itself has to be interpreted for each unit of increase in the covariate or the 50% increased hazard from the district is from some other factors not captured by the continuous covariate in the model?

The answer depends on details of how you included district in your modeling.

If you included district as a predictor without any interactions with the other predictors, then like any regression model the coefficient for district will represent the association of hazard with district in addition to what's accounted for by the other predictors.* So any coefficient for district is "from some other factors not captured by the [other covariates] in the model." Similarly in that type of model, coefficients for other predictors are assumed to be the same regardless of district.

As the answer from @nxglogic notes, a way to disentangle these issues is to include interaction terms between district and any other predictors whose associations with hazard might be expected to differ according to district. The coefficient of a 2-way interaction term represents the additional association with outcome beyond what you would expect from the 2 predictor coefficients separately. If such an interaction coefficient isn't "significant" then there is insufficient evidence to rule out simple additive associations from the 2 predictors. Nevertheless, a predictive model might best include even "insignificant" interactions to improve overall performance.

One risk in that approach is that each interaction term adds a predictor to the model, requiring more "events" to provide power while avoiding overfitting.** Dealing with those issues is part of the art of survival modeling.

What you don't want to do is run separate models on each district. Including district as a predictor in model (potentially interacting with other predictors) uses all the data together, giving you the largest number of events while allowing you to share information among districts about the other predictors. If the linearity and proportional-hazards assumptions hold and you aren't overfit, a single model will give you the greatest power to identify true associations with outcome.

*In a Cox model, the additive association is on the scale of log-hazard.

**You generally want no more than one predictor per 15 or so "events"; see Section 4.4 of Frank Harrell's class notes. I strongly recommend using those notes (or his book) as a guide to this type of modeling, both in general and specifically for Cox survival modeling (Chapters 20 and 21).

• very clear explanation! This is what I wanted. I appreciate your time and help! – mmhxc5 Apr 22 at 14:08

"Is the increased hazard due to the continuous covariates already in the model?" has to be answered using interaction terms, i.e., $$\texttt{region*saltconcentration}$$, $$\texttt{region*ADT}$$, etc. I would also run models for separate regions, since what's informative regarding a particular set of covariates for one region, may bomb out in another region, and you won't know this until you run separate models.

• thank you for your comment. could you please let me know what would be the result of the interaction i.e., region*saltconcentration? what if this interaction is statistically significant and what if it is not? I will run separate models for regions and see what happens. – mmhxc5 Apr 21 at 14:00
• You would need to have your software generate a coefficient for each combination of region_salt, based on all possible levels of region, except the reference region, whose effect goes into the constant term. So in the output table, you'll have a list of coeffs under the entry "region_salt", which will be the mean failure rates for each region accounting for saltconc. This will reveal if a region has higher failure rate than others accounting for saltconc. Thus, saltconc may result in an increased failure rate in certain regions - you'll be able to see this. – wrstks Apr 21 at 15:04
• The coeffs for the interaction between region_salt would essentially be "similar" to running Cox PH regression on saltconc, separately for each region. Same thing, You'd be able to see how saltconc influences the failure rate in each region. Using interactions, you can do this simultaneously in one model. – wrstks Apr 21 at 15:09
• I appreciate your comments. great job! – mmhxc5 Apr 22 at 14:06