fig7_2.m 686 B

123456789101112131415161718
  1. % Local Regression and Likelihood, Figure 7.2.
  2. %
  3. % Conditional Hazard Rate Estimation.
  4. % When hazard rate estimation is performed with multiple x variables,
  5. % the result is an estimate of the conditional hazard rate for the
  6. % first variable, given the levels of the remaining variables.
  7. %
  8. % The surface plot looks more dramatic than the contour plot in the book!
  9. %
  10. % Author: Catherine Loader
  11. load livmet;
  12. fit = locfit([t dm],'cens',1-z,'scale',0,'deg',1,'family','hazard','alpha',0.5,'xlim',[0 1;10000 20]);
  13. figure('Name','fig7_2: Conditional hazard rate estimation' );
  14. lfplot(fit);
  15. xlabel('Survival Time (Months)');
  16. ylabel('Diameter (c.m.)');
  17. zlabel('Hazard Rate');