NOTES ON USING LESAGE MODELS LESAGE WEB SITE: www.spatial-econometrics.com PRELIMINARIES: - Open class directory: “sys502/matlab” - File Set Path Add with Subfolders “sys502/matlab/Lesage_7” Close PROCEDURE FOR SEM MODEL (My SAR Model) » u = ones(26,1); » X=[u,x]; » names = strvcat('Blood Group','const','Pale') » info.lflag = 0; %Full computation of log determinant » res = sem(y,X,W,info); » prt(res,names); OUTPUT OF SEM MODEL Dependent Variable = Blood Group R-squared = 0.7375 Rbar-squared = 0.7266 sigma^2 = 2.1259 log-likelihood = -40.866367 Nobs, Nvars = 26, 2 # iterations = 0 min and max rho = -0.9900, 0.9900 total time in secs = 1.2970 No lndet approximation used *************************************************************** Variable Coefficient Asymptot t-stat z-probability const 28.823975 20.697603 0.000000 pale 1.555392 1.760119 0.078388 lambda 0.788000 7.450881 0.000000PROCEDURE FOR SAR MODEL (My SP_LAG Model) » u = ones(26,1); » X=[u,x]; » vnames = strvcat('Blood Group','const','Pale') » info.lflag = 0; %Full computation of log determinant » res = sar(y,X,W,info); » prt(res,vnames); OUTPUT OF SAR MODEL Dependent Variable = Blood Group R-squared = 0.7336 Rbar-squared = 0.7225 sigma^2 = 1.6105 Nobs, Nvars = 26, 2 log-likelihood = -36.643481 # of iterations = 18 min and max rho = -1.0000, 1.0000 total time in secs = 0.2970 No lndet approximation used *************************************************************** Variable Coefficient Asymptot t-stat z-probability const 7.030062 2.204916 0.027460 pale 2.003214 3.461328 0.000538 rho 0.729977 6.549890 0.000000PROCEDURE FOR SAC MODEL (Combined Model) » u = ones(26,1); » X=[u,x]; » vnames = strvcat('Blood Group','const','Pale') » info.lflag = 0; %Full computation of log determinant » res = sac(y,X,W,W,info); %Use W for rho and lambda » prt(res,vnames); OUTPUT OF SAC MODEL Dependent Variable = Blood Group R-squared = 0.8471 Rbar-squared = 0.8408 sigma^2 = 1.2380 log-likelihood = -35.39645 Nobs, Nvars = 26, 2 # iterations = 39 total time in secs = 0.4840 *************************************************************** Variable Coefficient Asymptot t-stat z-probability const 3.810559 1.456900 0.145144 pale 1.788617 3.712680 0.000205 rho 0.841998 9.041680 0.000000 lambda -0.491913 -1.697374 0.089626 **************************************************************** NESTED TESTS: (Not in LeSage) 2*(L_sac – L_sem) = 2*(-35.396 + 40.866) = 10.94 1 – chi2cdf(10.94,1) = .0009 (very significant) 2*(L_sac – L_sar) = 2*(-35.396 + 36.643) = 2.49 1 – chi2cdf(2.49,1) = .1145 (not
View Full Document