## Kaplan Meier for right and/or left and/or interval censored data

Versión 1.0.0.0 (3,79 KB) por
Provides the Product Limit Estimator (Kaplan Meier) for left/right/interval censored data through R
720 descargas

Ver licencia

% INPUT ARGUMENTS:
% times: An n by 2 matrix which refer to the time data. The two columns
% define the interval in which the event occured. If in one row the two
% "times" elements are equal then this corresponds to an event time. If the
% left column time point is finite and the right column time point is Inf
% then we have right censoring. If the left time point is -Inf and the
% right time point is finite then we have left censoring. For example:
%
%
% 5 Inf -> right censored observation
% -Inf 8 -> left censored observation
% 8 11 -> interval censoring
% 9 9 -> fully (exactly) observed
%
% Note that, since negative time values are also allowed, for left censored
% values you need to specify the left limit as -Inf. To be clear, Infs and
% -Infs are replaced as "NA" in the corresponding survfit R function.
%
%OUTPUT ARGUMENTS:
%time: the time points for which the survival is evaluated
%S : the survival estimate
%SE : the standard error of the estimate
%L : the lower limit of the corresponding 95% confidence interval for the
% survival
%U : the upper limit of the corresponding 95% confidence interval for the
% survival
%
%
%If only right censoring is present then the usual Kaplan Meier is employed
%and there is no need to use this code since MATLAB has already the built
%in function "ecdf" which will be faster. If left/interval censoring is
%present the Turnbull algorithm is employed. This algorithm is also
%described in detail in:
%
%"Klein and Moeschberger (2003), Survival Analysis (Techniques for censored
%and truncated data), Springer-Verlag, New York."
%
%This program does nothing more than calling the corresponding R functions.
%described therein:
%
%
%
%
%This works for both 32bit and 64bit machines.
%Please try to also run the demo included in the MATLAB R-link package, and
%make sure that everything works before trying this code.
%and "matlab" in R. The analysis provided by this code is in fact the
%output as provided by the corresponding survival package (survfit)
%provided by prof. Terry Therneau.
%
%
%
%References:
%
%Turnbull, B. W. Nonparametric Estimation of a Survivorship Function with Doubly
%Censored Data. Journal of the American Statistical Association 69 (1974): 169–173.
%
%Turnbull, B. W. The Empirical Distribution Function with Arbitrarily Grouped, Censored
%and Truncated Data. Journal of the Royal Statistical Society B 38 (1976): 290–295.
%
%Klein and Moeschberger (2003), Survival Analysis (Techniques for censored
%and truncated data), Springer-Verlag, New York."
%
%http://cran.r-project.org/web/packages/survival/survival.pdf
%
%

### Citar como

Leonidas Bantis (2024). Kaplan Meier for right and/or left and/or interval censored data (https://www.mathworks.com/matlabcentral/fileexchange/41325-kaplan-meier-for-right-and-or-left-and-or-interval-censored-data), MATLAB Central File Exchange. Recuperado .

##### Compatibilidad con la versión de MATLAB
Se creó con R2010a
Compatible con cualquier versión
Windows macOS Linux