clear all
close all
 disp('Lemon Increases Road Safety')
  lw = 3; 
  set(0, 'DefaultAxesFontSize', 16);
  fs = 16;
  msize = 12;

lemon=[...
1996  230    15.86 ;...
1997  280    15.69; ...
1998 365     15.36; ...
1999  435    15.30; ...
2000  527    14.86];
%2001 14.80 


year = lemon(:,1); import= lemon(:,2); fatality=lemon(:,3);
 [B,BINT,R,RINT,STATS]=regress(fatality, [ones(size(import)) import]);
cc=corr(import, fatality)
cc^2

xx=230:1:527;
yy = @(x) B(1) + B(2).*x;
plot( import, fatality, 'ko', 'MarkerSize', msize,  'MarkerEdgeColor','k',...
                'MarkerFaceColor','g')
hold on
plot(xx, yy(xx), 'r-','LineWidth',lw)
xlabel('Import of fresh lemons (metric tons)')
ylabel('Highway fatality rate (per 100,000)')
text(245,15.88, '1996')
text(295,15.7, '1997')
text(350,15.28, '1998')
text(450,15.3, '1999')
text(485,14.87, '2000')
axis square
print -depsc 'C:\Springer\Corr\Correps\lemon.eps'
