Home > chronux_1_50 > locfit > Book > fig2_5.m

fig2_5

PURPOSE ^

Local Regression and Likelihood, Figure 2.3.

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

 Local Regression and Likelihood, Figure 2.3.

 Using different smoothing parameters.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % Local Regression and Likelihood, Figure 2.3.
0002 %
0003 % Using different smoothing parameters.
0004 
0005 load ethanol;
0006 
0007 alp = [0.2 0.4 0.6 0.8];
0008 for i=1:4
0009   figure(i);
0010   fit = locfit(E,NOx,'alpha',alp(i));
0011   res = residuals(fit);
0012   fit2 = locfit(E,res,'alpha',0.2);
0013   lfplot(fit2);
0014   title(strcat('a = ',num2str(alp(i))));
0015   ylabel('Residual');
0016   hold on;
0017   plot([min(E) max(E)], [0 0], ':');
0018   hold off;
0019 end;

Generated on Mon 09-Oct-2006 00:54:52 by m2html © 2003