Home > chronux_1_1 > locfit > Book > fig4_3.m

fig4_3

PURPOSE ^

Local Regression and Likelihood, Figure 4.3.

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

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

 Residual plots for local likelihood.
 Henderson-Shepherd Mortality Data.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % Local Regression and Likelihood, Figure 4.3.
0002 % Author: Catherine Loader
0003 %
0004 % Residual plots for local likelihood.
0005 % Henderson-Shepherd Mortality Data.
0006 
0007 load morths;
0008 fit = locfit(age,deaths,'weights',n,'family','binomial','alpha',0.5);
0009 
0010 figure(1);
0011 plot(age,residuals(fit,'dev'),'.-');
0012 xlabel('Age');
0013 ylabel('Residual');
0014 title('Deviance Residuals');
0015 hold on;
0016 plot([min(age) max(age)],[0 0],':');
0017 hold off;
0018 
0019 figure(2);
0020 plot(age,residuals(fit,'pear'),'.-');
0021 xlabel('Age');
0022 ylabel('Residual');
0023 title('Pearson Residuals');
0024 hold on;
0025 plot([min(age) max(age)],[0 0],':');
0026 hold off;
0027 
0028 figure(3);
0029 plot(age,residuals(fit,'raw'),'.-');
0030 xlabel('Age');
0031 ylabel('Residual');
0032 title('Raw (response) Residuals');
0033 hold on;
0034 plot([min(age) max(age)],[0 0],':');
0035 hold off;
0036 
0037 figure(4);
0038 plot(age,residuals(fit,'ldot'),'.-');
0039 xlabel('Age');
0040 ylabel('Residual');
0041 title('ldot Residuals');
0042 hold on;
0043 plot([min(age) max(age)],[0 0],':');
0044 hold off;
0045

Generated on Sun 13-Aug-2006 11:49:44 by m2html © 2003