fig5_3.m 415 B

1234567891011121314
  1. % Local Regression and Likelihood, Figure 5.3.
  2. % Author: Catherine Loader
  3. %
  4. % Density Estimation using poisson regression.
  5. % Stamp thickness data.
  6. load stamp;
  7. n = sum(count);
  8. w = 0.001*n*ones(76,1);
  9. fit = locfit(thick,count,'weights',w,'family','poisson','alpha',[0 0.004]);
  10. figure('Name','fig5_3: Poisson regression density estimation' );
  11. lfplot(fit);
  12. xlabel('Thickness (m.m.)');
  13. ylabel('Density');