File Exchange

image thumbnail

SCOPE: kstest2 extended to allow censoring

version (19 KB) by Rex Cheung
Extends Matlab 2-sample Kolmogorov-Smirnov test to test "censored" survival data

1 Download

Updated 12 Nov 2012

View License

This download should include this code, a randomly generated excel data file for testing purposes, and the example output.
%This program expects to have at least three excel columns 1. follow up time and 2. failure indicator (1=failure has occured and 0=no failure has occurred and 3.predictor (1=present, 0=absent).
A randomly generated excel data file example is included for testing.

Type this at the command line to run: [h,p,k]= xlsSeerComputeSurvivalFuntionKSTest2('survivalPreditorsTestData.xls')

Cite As

Rex Cheung (2021). SCOPE: kstest2 extended to allow censoring (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (1)

Rex Cheung

Note that the two curves could also be normalized to the max value of each curve before applying the kstest2().

MATLAB Release Compatibility
Created with R2012a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!