全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 MATLAB等数学软件专版
2330 0
2018-09-02
做空间计量,怎么会出现这种问题啊
未定义与 '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

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群