图片传不上来,只好复制代码了:
load cl.mat
T=1; % number of time periods
N=30; % number of regions
% row-normalize W
W=normw(W1); % function of LeSage
y=A(:,[9]); % column number in the data matrix that corresponds to the dependent variable
x=A(:,[1,2]); % 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,:);
以下是错误提示:
??? Undefined function or method 'mtimes' for input arguments of type 'cell'.
Error in ==> demopanelscompare at 47
wx(t1:t2,:)=W*x(t1:t2,:);
end