FUNCTION REFERENCE

ecdf

Empirical cumulative distribution function (Kaplan-Meier).

Empirical cumulative distribution function (Kaplan-Meier).

Syntax

[f, x] = ecdf(y)

Syntax

[f, x, flo, fup] = ecdf(y, Name, Value)

Syntax

ecdf(y, Name, Value)

x is [min(y); the distinct uncensored values] and f the estimate at them, starting with 0. Options: 'Censoring' (1 = right-censored), 'Frequency', 'Alpha' (0.05), 'Function' ('cdf', 'survivor' or 'cumulative hazard') and 'Bounds' ('on' draws the bounds in the plot form). flo and fup are Greenwood confidence bounds (NaN at the first point and where the variance is undefined). Without outputs it draws a stairstep plot.

Example

[f, x] = ecdf([3 1 4 1 5 9 2 6])

Example

[f, x, flo, fup] = ecdf([3 1 4 1 5 9 2 6], 'Censoring', [0 0 0 1 0 1 0 0]);

Differences from MATLAB: left and interval censoring and the fifth output D are not supported.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.