Logrank

Comparing survival curves of two groups using the log rank test
5.4K Downloads
Updated 26 Jun 2018

Comparing survival curves of two groups using the log rank test.
Comparison of two survival curves can be done using a statistical hypothesis test called the log rank test. It is used to test the null hypothesis that there is no difference between the population survival curves (i.e. the probability of an event occurring at any time point is the same for each population). This function uses the Kaplan-Meier procedure to estimate the survival function (KMPLOT), so if it misses, logrank will try to download it from FEX.
Created by Giuseppe Cardillo
giuseppe.cardillo-edta@poste.it

To cite this file, this would be an appropriate format: Cardillo G. (2008). LogRank: Comparing survival curves of two groups using the log rank test http://www.mathworks.com/matlabcentral/fileexchange/22317

Cite As

Giuseppe Cardillo (2024). Logrank (https://github.com/dnafinder/logrank), GitHub. Retrieved .

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

Inspired: MatSurv

Community Treasure Hunt

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

Start Hunting!

Versions that use the GitHub default branch cannot be downloaded

Version Published Release Notes
2.0.0.0

inputparser; table implementation; github link

1.13.0.0

bug fixed on input data checkpoint section

1.12.0.0

Mantel-Haenszel Hazard ratio was added

1.11.0.0

It is better clarified that this is a 2-tailed test

1.10.0.0

function was adapted to the new kmplot function

1.9.0.0

hazard ratio added

1.7.0.0

correction in p-value computation (thanks to Prof. Brani Vidakovic)

1.6.0.0

Changes in code to solve an incompatibility with Mac (Thanks to Tim the cyclist)

1.5.0.0

Changes in description

1.4.0.0

Correction of a bug that occurs when data are not censored

1.3.0.0

Correction to avoid NaN in Standard error computation

1.2.0.0

correction when the first value is censored

1.1.0.0

changes in help section for correct citation

1.0.0.0

To view or report issues in this GitHub add-on, visit the GitHub Repository.
To view or report issues in this GitHub add-on, visit the GitHub Repository.