Statistics How To

Cox Regression / Cox Model: Simple Definition

Regression Analysis >

Cox’s proportional hazards regression model (also called Cox regression or Cox’s model) builds a survival function which tells you probability a certain event (e.g. death) happens at a particular time t. Once you’ve built the model from observed values, it can then be used to make predictions for new inputs.

The best Cox models are those which include censored data— observations where the event didn’t happen, as well as data from observations where the event actually occurred.

When Should I Use Cox Regression?

Cox regression can handle quantitative predictor variables and categorical variables.

Cox’s can analyze multiple risk factors for survival, unlike other methods (e.g. Kaplan-Meier analysis) which can only handle one.

Cox’s regression also tackles the problem of participant heterogeneity. Participant heterogeneity simply means that your participants are different, which could cause issues trying to analyze your data. Ideally, your participants would have similar characteristics (i.e. they would be homogeneous). In real life, however, you rarely find homogeneous samples and Cox’s regression addresses that issue.

Calculating Cox’s Regression

Although it’s popular in survival analysis, Cox regression does have the downside that—compared to other regression methods—it can be difficult to understand. Various technical computations are required, including copious matrix multiplications and inversions. This makes it extremely challenging to calculate by hand, but many statistical packages can handle this particular type of regression.


Step 1: Click Analyze > Survival > Cox Regression.

Step 2: Choose a time variable (the analysis will exclude negative time values).

Step 3: Choose a status variable.

Step 4: Click “Define Event.”

Step 5: Choose your covariates. Optional: select any interacting variables and then click >a*b>.


Coxph (in the survival package) fits data to a Cox model. Syntax is:

coxph(formula, data=, weights, subset,
na.action, init, control,
singular.ok=TRUE, robust=FALSE,
model=FALSE, x=FALSE, y=TRUE, tt, method, …)

For full explanation of syntax terms, see coxph in the survival package documentation on


Cantor, A. (2003). SAS Survival Analysis Techniques for Medical Research. SAS Institute.
IBM Knowledge Center. Cox Regression Analysis.


Confused and have questions? Head over to Chegg and use code “CS5OFFBTS18” (exp. 11/30/2018) to get $5 off your first month of Chegg Study, so you can understand any concept by asking a subject expert and getting an in-depth explanation online 24/7.

Comments? Need to post a correction? Please post a comment on our Facebook page.

Check out our updated Privacy policy and Cookie Policy

Leave a Reply