Local Regression and Likelihood, Figure 2.4. Bivariate Local Regression.
0001 % Local Regression and Likelihood, Figure 2.4. 0002 % 0003 % Bivariate Local Regression. 0004 0005 load ethanol; 0006 0007 alp = [0.25 0.3 0.49 0.59]; 0008 lab = {'Local Constant' 'Local Linear' 'Local Quadratic' 'Local Cubic'}; 0009 f=['a','b','c','d']; 0010 for (i=1:4) 0011 figure('Name', sprintf( 'figure2_4%c: Bivariate local regression', f(i) ) ); 0012 fit = locfit(E,NOx,'deg',i-1,'alpha',alp(i)); 0013 lfplot(fit); 0014 title(lab(i)); 0015 end;