Epi Info™ User Guide

Command Reference


Analsysis Commands: COXPH

Description
This command performs Cox-Proportional Hazards and Extended Cox-Proportional Hazards survival analysis. This form of survival analysis relates covariates to failure through hazard ratios. A covariate with a hazard ratio greater than one causes failure. A covariate with a hazard ratio less than one improves survival. Some of the subjects may be unavailable prior to failure; the term “censored” is applied to them. COXPH is especially constructed to deal with this situation. Statistics showing the risk set by group and time can be written to an OUTTABLE for later formatting.

Syntax
COXPH <time variable>= <covariate(s)>[: <time function>:] * <censor variable> (<value>) [TIMEUNIT=”<time unit>”] [OUTTABLE=<tablename>] [GRAPHTYPE=”<graph type>”] [WEIGHTVAR=<weight variable>] [STRATAVAR=<strata variable(s)>] [GRAPH=<graph variable(s)>]

  • The <time variable> represents a numeric or date variable, specifying when failure or censorship occurred.
  • The <covariate(s)> represent a numeric variable, a non-numeric variable, or a variable specified as non-numeric by parenthesis. Any non-numeric variable, even a variable specified as non-numeric by surrounding with parenthesis, is automatically recoded into dummy variables. For all but one of the levels of a variable, a dummy variable will be created. It measures the contribution of its level to the excluded level. A covariate may be followed by a time function. This causes COXPH to run the Extended Cox procedure.
  • The <time function> represents a numeric expression involving the time variable.
  • The <censor variable> indicates whether the event is a failure or a censor.
  • The <value> indicates which value of the CensorVar represents failure.
  • The <strata variable(s)> represents a list of variables indicating the different levels of strata.
  • The <weight variable> represents a variable to specify the contribution each data row has on the output.
  • The <time unit> represents a value for labeling the time axis.
  • The <tablename> represents a valid table name.

The <graph type> generates one of the indicated graphs:

  1. Survival Probability shows the adjusted survival curves.
  2. Observed shows the observed survival curves.
  3. Survival-Observed shows the adjusted and observed survival curves.
  4. Log-log Survival shows the logarithm of the negative of the logarithm of the adjusted survival curve.
  5. Log-log Observed shows the logarithm of the negative of the logarithm of the observed survival curve.
  6. Hazard Function shows the adjusted hazard function.
  7. None
  • The <graph variable(s)> represent a list of variables used to generate survival curves. Graph variables that are covariates or strata variables create curves adjusted by the covariates at all possible combinations of these graph variables. If a variable is numeric, it is plotted at its average value. Otherwise the graph variable splits the data into separate groups, each with its own curve.

Comments
COXPH uses the Breslow method to handle ties in the data.

Example
In this example, we will use the Anderson dataset from a clinical trial of leukemia patients to compare the treatment and placebo group survival.

READ {.\Projects\Sample\Sample.prj}:Anderson 
COXPH STIME = (Rx) * Status ( 1 ) TIMEUNIT="Weeks" PVALUE=95%  GRAPH=Rx GRAPHTYPE="Survival Probability"
Page last reviewed: September 16, 2022, 12:00 pm