

%This example program program estimates a CAR 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

%For more on maximum likelihood CAR computations see Pace and Barry (1998) "Fast CARS," Journal of Statistical Computation
%and Simulation, 1998




%This example uses Delaunay weights
%It uses the symmetric weighting matrix wsw



load xsub;
load y;
load wswdel;
wsw=wswdel;
load detvalzdel;
detvalz=detvalzdel;


tic;
[alphamax,loglik,emax,bmax,likratios,prhigher]=fcar1(xsub,y,detvalz,wsw);

toc;

elapsed_time =

    1.7130


alphamax

alphamax =

    0.9900


[bmax likratios prhigher]

ans =

   -0.7489  973.3213         0
    0.2131   92.8234         0
    0.4571  769.9047         0
    0.0313    2.1448    0.1431
    0.4449   59.0797    0.0000


diary off;
