

%This example program computes OLS estimates with likelihood ratio tests

%Written by Kelley Pace,6/23/97

%This example data came from 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. 




load xsub;
load y;



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

elapsed_time =

    0.1700


alphamax

alphamax =

     0


bmax

bmax =

   -0.8464
    0.5167
    0.4291
   -0.1439
    0.9814


loglik

loglik =

  1.0e+003 *

   -6.3071   -6.9099   -6.7843   -6.5717   -6.3333   -6.5127


[ likratios prhigher]

ans =

  1.0e+003 *

    1.2056         0
    0.9544         0
    0.5293         0
    0.0524    0.0000
    0.4112         0




diary off;
