44.1 Calculating Hazards from Survival Data
Hazard functions provide flexibility to define disease progression in you model; however, you are more likely to have survival source data. This section shows how to convert that survival data to hazards.
To illustrate the process, we will use mortality survival data from the CDC in 2022. However, this technique could be used for survival data representing any process. The CDC data can be found in Healthcare Example Models > CDC Survival Data 2022.xlsx Excel document.
The original data was modified slightly to measure survival in fractions rather than counts in rows H-I. The data shows decline in survival over time from 1 (everyone) at time 0 to 0.1142 after 100 years.
Import the survival data into TreeAge Pro:
-
Copy the data from Excel range H4..I105 into the clipboard. Note this includes the column headings.
-
In TreeAge Pro, choose File > New Decision Tree from the menu.
-
Open the Tables View.
-
Click the + toolbar icon to create a new table.
-
Name the table KM_CDC.
-
Click the Paste icon above the empty table data to the right of the Tables View. The table will then be populated with the CDC data.
-
Click the "Convert Survival to Hazard Table" button in the Tables View toolbar.
-
The following converter dialog will appear.
The top pane shows the original survival data, while the bottom pane shows the calculated survival data. The Hazard data is generated using the following formula.
-
h(t) represents the instantaneous hazard over time.
-
S(t) represents the survival over time.
There are a few Conversion Parameter options that allow you to customize the conversion.
-
New table name: Enter the name of the new hazard table to be converted.
-
Time units per hazard calc: This determines how frequently the conversion process should calculate the hazard. Entering smaller values will produce a closer match to the original survival data. However, it can make the hazard data unrealistically unstable.
-
Interpolation of missing values: This determines how the hazard table will be used for times in between hazard values. Interpolation is the default and is most commonly used.
Click Save Hazard Table to save the hazard data in a new table.
Click Save Hazard/Edit Table to save the hazard data and open it in the Hazard Table Editor described in the next section.
You can then use the Hazard Table from this or other sources to model disease progression as described in later sections of this chapter.