# fig5_5

## PURPOSE

Local Regression and Likelihood, Figure 5.5.

## SYNOPSIS

This is a script file.

## DESCRIPTION

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

     Bivariate Density Estimation.

## CROSS-REFERENCE INFORMATION

This function calls:

- fitted Fitted values from a locfit object.
- 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.5.
    0002 % Author: Catherine Loader
    0003 %
    0004 % Bivariate Density Estimation.
    0005
    0006 load trimod;
    0007 fit = locfit([x0 x1],'nn',0.35);
    0008 emp = sort(fitted(fit));
    0009 v = emp(floor([0.05 0.5]*225));
    0010 figure('Name','fig5_5: Bivariate density estimation' );
    0011 lfplot(fit,'contour',v);