Home > chronux > locfit > Book > fig6_7.m

fig6_7

PURPOSE ^

Local Regression and Likelihood, Figure 6.6.

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

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

 Penny data, piecewise smoothing.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % Local Regression and Likelihood, Figure 6.6.
0002 % Author: Catherine Loader
0003 %
0004 % Penny data, piecewise smoothing.
0005 %
0006 
0007 load penny;
0008 u = find(year <= 1958);
0009 fit1 = locfit(year(u),thickness(u),'alpha',[0 10],'deg',1);
0010 u = find((year>1958) & (year <= 1974));
0011 fit2 = locfit(year(u),thickness(u),'alpha',[0 10],'deg',1);
0012 u = find(year > 1974);
0013 fit3 = locfit(year(u),thickness(u),'alpha',[0 10],'deg',1);
0014 figure('Name','fig6_7: Piecewise smoothing of penny data' );
0015 lfplot(fit1);
0016 hold on;
0017 lfplot(fit2);
0018 hold on;
0019 lfplot(fit3);

Generated on Fri 28-Sep-2012 12:34:30 by m2html © 2005