# fig5_3

## PURPOSE

Local Regression and Likelihood, Figure 5.3.

## SYNOPSIS

This is a script file.

## DESCRIPTION

     Local Regression and Likelihood, Figure 5.3.
     Author: Catherine Loader

     Density Estimation using poisson regression.
     Stamp thickness data.

## CROSS-REFERENCE INFORMATION

This function calls:

- lfplot Plot (for one or two dimensions) a locfit() fit.
- locfit Smoothing noisy data using Local Regression and Likelihood.

This function is called by:

- runbook

## SOURCE CODE

    0001 % Local Regression and Likelihood, Figure 5.3.
    0002 % Author: Catherine Loader
    0003 %
    0004 % Density Estimation using poisson regression.
    0005 % Stamp thickness data.
    0006
    0007 load stamp;
    0008 n = sum(count);
    0009 w = 0.001*n*ones(76,1);
    0010 fit = locfit(thick,count,'weights',w,'family','poisson','alpha',[0 0.004]);
    0011 figure('Name','fig5_3: Poisson regression density estimation' );
    0012 lfplot(fit);
    0013 xlabel('Thickness (m.m.)');
    0014 ylabel('Density');