Home > chronux > locfit > Book > fig10_1.m

fig10_1

PURPOSE ^

Local Regression and Likelihood, Figure 10.1.

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

 Local Regression and Likelihood, Figure 10.1.

 uses 'module','allcf' rather than 'deriv',[1 1] to get the
 second derivative coefficient

 Author: Catherine Loader

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % Local Regression and Likelihood, Figure 10.1.
0002 %
0003 % uses 'module','allcf' rather than 'deriv',[1 1] to get the
0004 % second derivative coefficient
0005 %
0006 % Author: Catherine Loader
0007 
0008 load geyser;
0009 a = [0.5 0.75 1];
0010 
0011 f=['a','b','c','d'];
0012 for (i=1:3)
0013   figure('Name', sprintf( 'figure10_1%c', f(i) ) );
0014 
0015   fit = locfit(geyser,'deg',2,'link','ident','kern','gauss','ev','grid','mg',501,'ll',1,'ur',6,'module','allcf','h',a(i));
0016   x = fit.fit_points.evaluation_points;
0017   y = lfknots(fit);
0018   y = y(:,3);
0019   plot(x,y.^2);
0020   itgl = [0.5 ones(1,499) 0.5] * (y.^2) / 100
0021 end;
0022

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