Home > chronux > locfit > Book > fig5_6.m

fig5_6

PURPOSE ^

Local Regression and Likelihood, Figure 5.6.

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

 Local Regression and Likelihood, Figure 5.6.
 Author: Catherine Loader

 Cumulative Distribution Function

 This function uses cdfplot() from Matlab's add-on statistics toolbox.

 NEED:
   predict should backtr by default?

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % Local Regression and Likelihood, Figure 5.6.
0002 % Author: Catherine Loader
0003 %
0004 % Cumulative Distribution Function
0005 %
0006 % This function uses cdfplot() from Matlab's add-on statistics toolbox.
0007 %
0008 % NEED:
0009 %   predict should backtr by default?
0010 
0011 load geyser;
0012 fit = locfit(geyser,'nn',0.1,'h',1.2,'renorm',1);
0013 x = (1:0.01:6)';
0014 z = predict(fit,x);
0015 figure('Name','fig5_6: Cumulative distribution function' );
0016 plot(x,0.01*cumsum(exp(z)));
0017 xlabel('Eruption Duration (Minutes)');
0018 ylabel('Cumulative Distribution Function');
0019 hold on;
0020 cdfplot(geyser);
0021 hold off;

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