Logrank

Version 1.0.0.0 (2.66 KB) by Fan Lin
Compare the survival distributions of two samples by performing Log-rank test
1.2K Downloads
Updated 26 Jun 2008

View License

Log-rank test(Approximate)
The logrank test is a hypothesis test to compare the survival distributions of two samples. It is a nonparametric test and appropriate to use when the data are right censored (technically, the censoring must be non-informative).
logrank(x,y,2)
return p value and graph K-M curves

Cite As

Fan Lin (2026). Logrank (https://www.mathworks.com/matlabcentral/fileexchange/20388-logrank), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2007a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Version Published Release Notes
1.0.0.0

fix bugs