
%This example program estimates a SAR model using the data from:
%Pace, R. Kelley, and Ronald Barry, Quick Computation of Regressions with a Spatially Autoregressive Dependent Variable,
%Geographical Analysis, Volume 29, Number 3, July 1997, p. 232-247. 

%Written by Kelley Pace, 6/23/97



%This example uses Delaunay weights


load xsub;
load y;
load wwsdel;
wws=wwsdel;
load detvalzdel;
detvalz=detvalzdel;

tic;
[alphamax,loglik,emax,bmax,likratios,prhigher]=fsar1(xsub,y,detvalz,wws);
toc;

elapsed_time =

    1.9130


alphamax

alphamax =

    0.7200


[bmax likratios prhigher]

ans =

  1.0e+003 *

   -0.0008    1.0180         0
    0.0003    0.1322         0
    0.0004    0.7254         0
    0.0000    0.0002    0.0006
    0.0005    0.0829         0


diary off;
