请大侠帮忙:
T=12; % number of time periods
N=31; % number of regions
% row-normalize W
y=K0; % column number in the data matrix that corresponds to the dependent variable
x=X ; % column numbers in the data matrix that correspond to the independent variables
for t=1:T
t1=(t-1)*N+1;t2=t*N;
wx(t1:t2,:)=W*x(t1:t2,:);
end
xconstant=ones(N*T,1);
[nobs K]=size(x);
上面是我程序中一段,运行时就出错了,不知如何解决,因为基本是原文从elhorst中抄过来的!
Subscripted assignment dimension mismatch.
Error in sar_effect (line 68)
wx(t1:t2,:)=W*x(t1:t2,:);
>> wx(t1:t2,:)=W*x(t1:t2,:);
Subscripted assignment dimension mismatch
是程序设置出错还是,W权重有问题?


雷达卡




京公网安备 11010802022788号







