Empirical CDF with data containing left censored, exact and right censored failures.

6 views (last 30 days)
My data consists of left censored, exact failures and right censored points. I am trying ecdf by considering data in two different forms.:
  1. I create data as two column matrix. for left censored i use [-Inf, observed value], for exact failures i use [observed value, observed value] and for right censored i use [observed value, Inf] as per the documentation. and now I do [f,x] = ecdf[Data]
  2. Next I create a single column vector of my Data, and I create a second vector as censoring data and use -1 for left censored, 0 for exact and 1 for right censored. I calculate the cdf using [f,x] = ecdf[Data1,'Censoring',censoring_data_vector;
According to documention, ecdf ignores if the data is two colum matrix and performs cdf calculations, other wise uses the censoring information. Both should be exactly same but i get totally different answers and i believe the first one is giving more reasonable answers than the second one. Please help what am I doing wrong in my second method? Thanks in advance. I can provide the data if someone wants to try it.

Answers (0)

Community Treasure Hunt

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

Start Hunting!