# fig6_2

## PURPOSE

Local Regression and Likelihood, Figure 6.2.

## SYNOPSIS

This is a script file.

## DESCRIPTION

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

     Local smooth of CO2 dataset, main trend.

## 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 6.2.
    0002 % Author: Catherine Loader
    0003 %
    0004 % Local smooth of CO2 dataset, main trend.
    0005
    0006 load co2;
    0007 fit = locfit(year+month/12,co2,'alpha',0.5,'deg',1);
    0008 figure('Name','fig6_2: CO2 Dataset: Local smoothing, main trend' );
    0009 lfplot(fit);
    0010 xlabel('Date');
    0011 ylabel('CO2')