Examples (KM command)
KM LENGTH BY SEXRACE
/STATUS=EMPLOY EVENT (1) LOST (2)
/STRATA=LOCATION.
- Survival analysis is used to examine the length of unemployment. The survival variable LENGTH contains the number of months a subject is unemployed. The factor variable SEXRACE combines sex and race factors.
- A value of 1 on the variable EMPLOY indicates the occurrence of the event (employment). All other observed cases are censored.
- A value of 2 on EMPLOY indicates cases lost to follow-up. Cases with other values for EMPLOY are known to have remained unemployed during the course of the study. KM separates the two types of censored cases in the KM table if LOST is specified.
- For each combination of SEXRACE and LOCATION, one KM table is produced, followed by the mean and median survival times with standard errors and confidence intervals.
- Using Kaplan-Meier to Test Competing Pain Relief Treatments
KM
time BY treatment /STATUS=status(1)
/PRINT TABLE MEAN
/PERCENTILES
/PLOT SURVIVAL
/TEST LOGRANK BRESLOW TARONE
/COMPARE OVERALL POOLED .
- Survival analysis is used to examine the time until the drug takes effect. The survival variable time is the time until effect. The factor variable treatment marks whether the experimental drug or the existing drug was administered.
- A value of 1 on the variable status indicates the occurrence of the event (drug takes effect). All other observed cases are censored.
- The PRINT subcommand produces a KM table for each value of treatment, followed by the mean and median survival times with standard errors and confidence intervals.
- The PERCENTILES subcommand, specified without keywords, requests the quartiles of the survival times for each value of treatment.
- The PLOT subcommand requests the cumulative survival distribution for each value of treatment.
- The TEST subcommand requests that the log rank, Breslow, and Tarone-Ware statistics be used to test the equality of the survival curves defined by the values of treatment. Per the COMPARE subcommand, all factor levels are compared in a single test.
- For discussion of output from this syntax and to place the example in context, see Using Kaplan-Meier Survival Analysis to Test Competing Pain Relief Treatments.