Home > chronux_1_15 > 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 plot(midp,(pr-pl).*(pr-pl),'.-');
0015 xlabel('Year');
0016 ylabel('\Delta^2(Year)');

Generated on Tue 15-Aug-2006 22:51:57 by m2html © 2003