做空间计量,怎么会出现这种问题啊
未定义与 'double' 类型的输入参数相对应的函数 'mean'。
出错 sar_panel_FE (line 215)
meanny(i)=mean(ym);
下面是程序
clear all
load weight_10.mat
load date.mat
T=19;
N=31;
W=normw(wi);
y=date(:,3);
x=date(:,4); % 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);
% ----------------------------------------------------------------------------------------
% Spatial and time period fixed effects + spatially lagged dependent variable
info.lflag=0; % required for exact results
info.model=3;
info.fe=0; % no print intercept and spatial fixed effects
% New routines to calculate effects estimates
results=sar_panel_FE(y,x,W,T,info);
vnames=char('logcit','logp','logy');
% Print out coefficient estimates
prt_sp(results,vnames,1);
% Print out effects estimates
panel_effects_sar(results,vnames,W);
pause