Local Regression and Likelihood, Figure 7.3. Censored local regression. Author: Catherine Loader NEEDS: Kaplan-Meier based estimate. Identify curves and cens/uncens. data
0001 % Local Regression and Likelihood, Figure 7.3. 0002 % 0003 % Censored local regression. 0004 % 0005 % Author: Catherine Loader 0006 % 0007 % NEEDS: Kaplan-Meier based estimate. Identify curves and cens/uncens. data 0008 0009 load heart; 0010 fit = locfit(age,log(0.5+surv)); 0011 figure('Name','fig7_3: censored local regression Kaplan-Meier based;' ); 0012 lfplot(fit); 0013 xlabel('Age at Transplant (years)'); 0014 ylabel('0.5+Survival Time (Days)'); 0015 0016 fit = lf_censor(age,log(0.5+surv),cens); 0017 hold on; 0018 lfplot(fit,'nodata'); 0019 hold off;