楼主,麻烦你帮我看看,用空间面板SAR模型的代码哪里出错了,O(∩_∩)O谢谢!方便的话可否留下联系方式,我的
QQ429272494@qq.com
T=30; % number of time periods
N=30; % number of regions
% row-normalize W
W=normw(w1); % function of LeSage
y=consum1(:,[3]); % column number in the data matrix that corresponds to the dependent variable
x=consum1(:,[4,5,7,11,12,13,15]); % column numbers in the data matrix that correspond to the independent variables
xconstant=ones(N*T,1);
[nobs K]=size(x);
% ----------------------------------------------------------------------------------------
% spatial fixed effects + spatially lagged dependent variable无固定效应
info.lflag=0; % required for exact results
info.model=0;
results1=sar_panel_FE(y,[xconstant x],W,T,info);
-----------------------------------20
vnames1=strvcat('gy','intercept','lgy0','pc','gpc','emp','edu','inv','fir');
prt_spnew(results1,vnames1,1);
Error in SAR (line 20)
results=sar_panel_FE(y,x,W,T,info);