Local Regression and Likelihood, Figure 1.1. A linear regression and plot for Spencer's mortality data. Unlike the book, I use locfit for this! Setting 'ev','none' means that locfit computes only the parametric fit. In this case, 'deg',1; i.e. linear.
0001 % Local Regression and Likelihood, Figure 1.1. 0002 % 0003 % A linear regression and plot for Spencer's mortality 0004 % data. Unlike the book, I use locfit for this! 0005 % 0006 % Setting 'ev','none' means that locfit computes only 0007 % the parametric fit. In this case, 'deg',1; i.e. linear. 0008 0009 load spencer; 0010 fit = locfit(age,mortality,'deg',1,'ev','none'); 0011 figure('Name','fig1_1: locfit linear regression'); 0012 lfplot(fit);