Please enable JavaScript to view this site.

Features and functionality described on this page are available with our new Pro and Enterprise plans. Learn More...

When you run Kaplan-Meier survival analysis from a Multiple Variables data table, the first tab of the analysis parameters dialog is the Data tab. This is where you tell Prism which columns contain your survival times, which indicate censoring, and which define groups you want to compare.

Overview of Variable Assignment

The Data tab has two main sections. On the left, you'll see all the variables available in your data table. On the right are three assignment boxes where you drag variables to assign their roles in the analysis.

To assign a variable, you can either drag it from the left side into the appropriate box on the right, or click the "+ Add variable..." button in each assignment box and select from the list. Once assigned, you can remove a variable by hovering over it and clicking the X button that appears.

Status (censoring) Variable(s)

The status variable for survival analysis is also known as your censoring indicator. This is the variable that tells Prism whether each subject experienced the event you're tracking or was censored (lost to follow-up, still alive at study end, etc.).

This variable typically contains values like 0 and 1, where one value indicates the event happened and the other indicates censoring. Common coding schemes are:

1 = Event occurred, 0 = Censored (most common)

0 = Event occurred, 1 = Censored (sometimes used in older clinical trial databases)

You'll specify which coding scheme your data uses on the Method tab later. For now, just assign the variable that contains these event/censoring indicators.

However, you may also choose to assign a categorical variable here. In this case, you may choose which level of your chosen categorical variable corresponds to a censored observation and which corresponds to an event. This could be something as straightforward as "Censored" and "Event" as the levels of the categorical variable, or using any other experiment-specific indicator that makes the most sense to you.

Assigning multiple status variables

One powerful feature of Multiple Variables tables is that you can assign multiple status variables in a single analysis. This is useful when you're tracking multiple types of events and want to create separate survival curves for each one.

For example, in a cancer trial you might have separate status variables for:

Death (overall survival)

Disease progression (progression-free survival)

Treatment discontinuation

You can assign all of these as status variables, and Prism will analyze each one separately. If you also assign grouping variables, you'll get survival curves for every combination of status variable and group. So with 2 status variables and 2 groups, you'd get 4 survival curves.

Requirements for status variables:

Can be numeric (0/1, 1/2, etc.) or text ("Event"/"Censored", "Yes"/"No", etc.)

Should have exactly two unique values (one for event, one for censored)

All status variables you assign must use the same coding scheme

Good examples of response variables:

Death (1 = died, 0 = alive/censored)

Event (1 = occurred, 0 = censored)

Status (Event/Censored)

Progression (1 = progressed, 0 = no progression/censored)

Failure (Yes/No)

Time Variable

The time variable contains the survival times or follow-up durations for each subject. This tells Prism when each event occurred or when each subject was censored.

The time variable must be continuous and numeric. Common time units include days, weeks, months, or years, depending on your study. All values should be in the same units, and the unit you use will appear on your survival curve axes.

Requirements for the time variable:

Must be continuous numeric data

All values should be zero or positive (negative survival times don't make sense)

All values must be in the same units

You can only assign one time variable per analysis

Good examples of time variables:

Survival_Days

Follow_up_Months

Time_to_Event_Years

Days_to_Progression

Weeks_on_Study

The name you give this variable will automatically appear as the X-axis label on your survival curves, so use a descriptive name that includes the units.

Grouping Variable(s)

Grouping variables are optional, but they're what let you compare survival curves between different groups in your study: treatment arms, disease stages, risk categories, demographic groups, and so on. If you don't assign any grouping variables, Prism will create a single survival curve for all your data.

When you assign one or more grouping variables, Prism creates separate survival curves for each unique combination of group levels and performs log-rank tests to compare them. This is the primary way to test whether survival differs between groups.

Assigning multiple grouping variables

You can assign multiple grouping variables to look at combinations of factors. For example, you might group by both Treatment (Control vs Drug) and Stage (Early vs Advanced). Prism will create survival curves for all four combinations: Control-Early, Control-Advanced, Drug-Early, and Drug-Advanced.

This is powerful for exploratory analysis, but keep a few things in mind:

More grouping variables means more survival curves and more comparisons

You need adequate sample sizes in each combination for meaningful results

With many groups, survival curves can become difficult to interpret visually

Consider whether you need multivariable Cox regression instead for complex analyses

Requirements for grouping variables:

Must be categorical variables

Can have two or more levels

Use consistent spelling and capitalization for group labels

Can be text or numeric codes (but numeric codes will be treated as categories)

Good examples of grouping variables:

Treatment (Control, Drug_A, Drug_B, Combination)

Stage (I, II, III, IV)

Risk_Group (Low, Intermediate, High)

Age_Category (Under_50, 50_to_65, Over_65)

Sex (Male, Female)

Response (Complete_Response, Partial_Response, No_Response)

Genotype (Wild_Type, Mutation_Present)

Example Variable Assignments

Let's look at a few common scenarios and how you'd assign variables for each.

Scenario 1: Simple survival curve (no groups)

You just want to see the overall survival curve for your entire cohort without comparing groups.

Variable assignment:

Status (censoring): Event_Status

Time: Survival_Days

Grouping: None

Result: One survival curve showing the probability of survival over time for all subjects combined.

Scenario 2: Comparing two treatment groups

You want to compare survival between a control group and a treatment group.

Variable assignment:

Status (censoring): Death

Time: Follow_up_Months

Grouping: Treatment with values "Control" and "Treatment"

Result: Two survival curves (one for each treatment) with log-rank test comparing them.

Scenario 3: Multiple outcomes in the same analysis

You're tracking both death and disease progression, and want to see both types of survival curves for each treatment group.

Variable assignment:

Status (censoring): Death AND Progression (both assigned)

Time: Follow_up_Months

Grouping: Treatment with values "Control" and "Treatment"

Result: Four survival curves:

Death-Control

Death-Treatment

Progression-Control

Progression-Treatment

with separate log-rank tests for each outcome.

Scenario 4: Stratified analysis with multiple factors

You want to see how survival differs across combinations of treatment and disease stage.

Variable assignment:

Status (censoring): Event_Status

Time: Survival_Days

Grouping: Treatment AND Stage (both assigned)

Result: If Treatment has 2 levels and Stage has 3 levels, you get 6 survival curves (2 × 3 = 6) representing all possible combinations.

How to Assign Variables

There are two ways to assign variables to their roles:

Method 1: Drag and drop

1.Click and hold on a variable name in the Available variables list

2.Drag it to the appropriate assignment box on the right

3.Release to drop it into the box

Method 2: Add button

1.Click the "+ Add variable..." button in any assignment box

2.Select or search for the variable you want to assign from the list that appears

To remove a variable:

Hover over the variable, then click the X button next to the variable name in the assignment box

The variable will return to the Available variables list

Common Questions

Q: What if my event indicator uses different codes like "Dead"/"Alive" instead of 1/0?

A: That's fine - Prism can work with text codes. Just make sure your variable is designated as categorical in the data table, and you'll specify which code means "event occurred" on the Method tab.

Q: Can I assign multiple time variables?

A: No, you can only assign one time variable per analysis. All your subjects must be measured on the same time scale, and these time values must be recorded in a single variable on the data table. If you have different time units for different outcomes, you'll need to run separate analyses.

Q: What happens if I assign both multiple status variables AND multiple grouping variables?

A: Prism will create survival curves for every combination. With 2 status variables and 3 groups, you'll get 6 curves (2 × 3 = 6). This can be useful for comprehensive exploratory analysis, but make sure you have enough events in each combination.

Q: How does Prism handle rows with missing values?

A: Prism automatically excludes any row that has a missing value in the response variable, predictor variable, or any assigned grouping variable. Only complete cases are included in the analysis.

Q: My data has time-varying covariates or competing risks. Can I analyze that here?

A: Kaplan-Meier analysis assumes time-independent covariates and a single type of event. For time-varying covariates, you'll need Cox regression. For competing risks, you'll need specialized survival analysis methods not currently available in Prism.

Q: Do I need to sort my data in any particular order?

A: No, row order doesn't matter. Prism will internally sort by time and group as needed for the analysis and plots.

© 1995-2019 GraphPad Software, LLC. All rights reserved.