# fig1_1

## PURPOSE

Local Regression and Likelihood, Figure 1.1.

## SYNOPSIS

This is a script file.

## DESCRIPTION

     Local Regression and Likelihood, Figure 1.1.

     A linear regression and plot for Spencer's mortality
     data. Unlike the book, I use locfit for this!

     Setting 'ev','none' means that locfit computes only
     the parametric fit. In this case, 'deg',1; i.e. linear.

## 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 1.1.
    0002 %
    0003 % A linear regression and plot for Spencer's mortality
    0004 % data. Unlike the book, I use locfit for this!
    0005 %
    0006 % Setting 'ev','none' means that locfit computes only
    0007 % the parametric fit. In this case, 'deg',1; i.e. linear.
    0008
    0009 load spencer;
    0010 fit = locfit(age,mortality,'deg',1,'ev','none');
    0011 figure('Name','fig1_1: locfit linear regression');
    0012 lfplot(fit);