Home > chronux > locfit > Book > fig6_6.m

fig6_6

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, estimating jump size using left and
 right smooths.

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, estimating jump size using left and
0005 % right smooths.
0006 %
0007 
0008 load penny;
0009 midp = (1945:1988)'+0.5;
0010 fitl = locfit(year,thickness,'style','l','alpha',[0 10],'ev',midp,'deg',1);
0011 fitr = locfit(year,thickness,'style','r','alpha',[0 10],'ev',midp,'deg',1);
0012 pl = predict(fitl);
0013 pr = predict(fitr);
0014 figure('Name','fig6_6: Estimating jump size' );
0015 plot(midp,(pr-pl).*(pr-pl),'.-');
0016 xlabel('Year');
0017 ylabel('\Delta^2(Year)');

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