Exercise: Survival analysis in Prism

From BITS wiki
Jump to: navigation, search
Go to parent GraphPad Prism statistical analyses

To answer my question I took 30 middle-aged men at a very high risk on a heart attack.
Half of the men were given the drug while the other half received a placebo.
I monitored them every month to check if they suffered a heart attack.

The data are available as a csv file.
Open the file in WordPad. Prism expects survival data in a very specific format:

  • Each row represents a distinct subject (man in our case).
  • The first column will become the X-column in Prism and contains elapsed time in days, weeks or months.
    You have to enter numbers representing elapsed time instead of dates since Prism does not accept dates.
  • Each next column will become a Y-column in Prism and represents a treatment (placebo and drug in our case).
    In these Y-columns, you have to enter a code for each subject:
    • Enter 1 for a subject if the event (heart attack) occurred at the time entered into X.
    • Enter 0 if the data are censored, i.e. you don’t know what happened to the subject after that time or you do know but can’t use the information.
      For instance, the man moved away, you lost contact or he died of an unrelated cause...
      Also people who survived the study are censored at the time of the last monitoring.

Prism is really picky about survival data: this is the only format that is accepted. So you are for instance not allowed to enter percent survival at various times nor starting and ending dates.

The first thing we will do is take a look at the graph of the data.
A graph of survival data is called a survival curve. The most used method for generating these curves was developed by Kaplan and Meier, hence the curves are called Kaplan-Meier curves. For each X-value (months after the start of the trial), you plot the fraction or percentage of men that did not have a heart attack.

Although the curves look simple, the method to generate them is not so easy as it looks. Because of censorship (subjects leaving the study), the total number of subjects changes over time.

Just like comparing groups, you can compare two Kaplan-Meier curves. It is the only type of analysis you can do in Prism on survival data. Moreover, when you enter data on an survival table, Prism automatically performs this analysis. You don't need to click Analyze.

From the results, you can click the analysis parameters button to bring up the parameters dialog, if you want to make any changes


In general, Prism advises to report the logrank test if the two test do not agree. Choose the Gehan-Breslow-Wilcoxon test only if you have a strong reason to do so.