如题。Matlab 中所提供的“空间滞后模型+固定效应”的程序模块如下。第三行的粗体部分:“不显示常数项、空间固定效应”。但我想知道常数项、空间固定效应的估计结果的话,如何修改程序。求高手指教,不胜感激!info.lflag=0; % required for exact results
info.model=1;
info.fe=0; % no print intercept and spatial fixed effects
results=sar_panel_FE(y,x,W,T,info);
vnames=strvcat('logcit','logp','logpn','logy');
prt(results,vnames,1);
blagfe=[results.beta;results.rho];
covblagfe=results.cov;
% LR-test for joint significance spatial fixed effects
logliklagfe=results.lik;
info.model=0;
results=sar_panel_FE(y,x,W,T,info);
logliklag=results.lik;
LR=-2*(logliklag-logliklagfe);
dof=N;
probability=1-chis_prb(LR,dof);
% Note: probability > 0.05 implies rejection of spatial fixed effects
fprintf(1,'LR-test joint significance spatial fixed effects, degrees of freedom and probability = %9.4f,%6d,%9.4f \n',LR,dof,probability);