2.13.5.1 kaplanmeier(Pro)

Menu Information

Statistics: Survival Analysis: Kaplan-Meier Estimator

Brief Information

Perform a Kaplan-Meier (product-limit) analysis

Additional Information

This feature is for OriginPro only.

Command Line Usage

1. kaplanmeier irng:=(1,2) censor:=0 
2. kaplanmeier irng:=(1,2,3) censor:=0 hazard:=1 

Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
Input irng

Input

Range

Specify data range for analysis, including time data range, censor data range and grouping range.

Time data range

Specify time data column

Censor data range

Specify censor data column

Grouping range

Specify group data range.

Censoring Value(s) censor

Input

vector

Specify the censor subject value, that identifies which time values in the observation data set are censored

Event and Censor Values Summary summary

Input

int

1

Check box for output the summary of event and censored value result.

Survival Estimates survfunc

Input

int

1

Check box for output the survival estimates result.

Quartile Estimates quartile

Input

int

0

Check box for output the quantile estimates result.

Mean Estimate mean

Input

int

0

Check box for the mean estimates result.

Confidence Level in % for Quartile/Mean Estimate conf

Input

double

95

Text box to enter a confidence level to be used when computing errors for the survival function and upper and lower limits of the quartile estimates.

Survival sf

Input

int

1

Check box for output survival curve.

Add confidence intervals sfci

Input

int

0

Add confidence intervals to the survival curve.

One Minus Survival omsf

Input

int

0

Check box for output of one minus survival curve, i.e. the cumulative distribution curve.

Hazard hazard

Input

int

0

Check box for output of the hazard curve.

Log Survival lsf

Input

int

0

Check box for output of the log survival curve.

Mark Censored Points cmark

Input

int

1

Check to mark censored points.

Plot all survival curves in one graph plotinone

Input

int

1

Check to plot all the survival curves in one graph window

Log Rank logrank

Input

int

0

Use the Log rank method to test the equality of the survival distributions for different groups.

Breslow breslow

Input

int

0

Use the Breslow method to test the equality of the survival distributions for different groups.

Tarone-Ware tarone

Input

int

0

Use the Tarone-Ware method to test the equality of the survival distributions for different groups.

Survival Functions rd

Output

ReportData

[<input>]<new>

Specify the survival function data destination

Output Results rt

Output

ReportTree

[<input>]<new>

Specify the report worksheet destination

Examples

  • Sample Code
/*
This example is used to show how to use product-limit method to estimate the survival rate.
The sample data used is in
  OriginPath\Samples\Statistics folder.
1. Import the sample data into a book in Origin
2. use kaplanmeier XF to calculate the values of survival function.
3. put the result into a new sheet
4. Plot the survival function into a new graph.
*/
/*Import the sample data into a new book*/
String fname$=system.path.program$+"Samples\Statistics\Kaplan-Meier.dat";
newbook;
impASC;
string bkn$=%H;

/*Use kaplanmeier XF to calculate the values of survival function*/
kaplanmeier irng:=[bkn$]1!(col(1),col(2)) censor:=0 quartile:=1 mean:=1 rt:=<new name:="KaplanMeier">;

/*Plot the survival function in a new graph named "Survival Function Plot"*/
plotxy iy:=[bkn$]2!(col(1),col(2)) plot:=202 ogl:=<new name:="Survival Function Plot">;
/*New a sheet to store the results of the Kaplan-Meier estimator*/
newsheet book:=bkn$ name:="Result" label:="Parameter|Estimate|95% CI_Lower|95% CI_Upper";
wcolwidth [bkn$]"Result"!1 12;
range Para=[bkn$]Result!col(1);
range Est=[bkn$]Result!col(2);
range Lower=[bkn$]Result!col(3);
range Upper=[bkn$]Result!col(4);
getresults iw:=[bkn$]3 tr:=mytree;
Para[1]$="25% of survival time";
Para[2]$="50% of survival time";
Para[3]$="75% of survival time";
Para[4]$="mean of survival time";
Est[1]=mytree.sa.quan.Quan1.Estim;
Est[2]=mytree.sa.quan.Quan2.Estim;
Est[3]=mytree.sa.quan.Quan3.Estim;
Est[4]=mytree.sa.mean.Mean.Estim;
Lower[1]=mytree.sa.quan.Quan1.LCI;
Lower[2]=mytree.sa.quan.Quan2.LCI;
Lower[3]=mytree.sa.quan.Quan3.LCI;
Lower[4]=mytree.sa.mean.Mean.LCI;
Upper[1]=mytree.sa.quan.Quan1.UCI;
Upper[2]=mytree.sa.quan.Quan2.UCI;
Upper[3]=mytree.sa.quan.Quan3.UCI;
Upper[4]=mytree.sa.mean.Mean.UCI;

More Information

For more information, please refer to our User Guide.

Related X-Functions

phm_Cox, weibullfit