Local Regression and Likelihood, Figure 6.6. Author: Catherine Loader Penny data, estimating jump size using left and right smooths.
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)');