楼主: figo1416
2313 2

[问答] 用MATLAB做空间计量总是出现以下程序错误,求解答 [推广有奖]

  • 0关注
  • 1粉丝

VIP1

初中生

61%

还不是VIP/贵宾

-

威望
0
论坛币
2101 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
51 点
帖子
5
精华
0
在线时间
26 小时
注册时间
2005-12-2
最后登录
2016-12-2

楼主
figo1416 发表于 2015-5-31 11:13:36 |AI写论文
5论坛币
错误显示如下:
??? Undefined function or method 'norm_prb' for input arguments of type 'double'.

Error in ==> prt_sp at 271
tout = norm_prb(results.tstat); % find asymptotic z (normal) probabilities, function of LeSage
程序是% dimensions of the problem
load('pc.mat')
load('wl.mat')
T=10; % number of time periods
N=29; % number of regions
% row-normalize W
W=normw(wl); % function of LeSage
y=pc(:,[1]); % column number in the data matrix that corresponds to the dependent variable
x=pc(:,[2,3,4,5,6,7,8]); % 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);
% ----------------------------------------------------------------------------------------
% No fixed effects + spatially lagged dependent variable
info.lflag=0; % required for exact results
info.model=0;
info.fe=0; % Do not print intercept and fixed effects; use info.fe=1 to turn on
% New routines to calculate effects estimates
results=sar_panel_FE(y,[xconstant x],W,T,info);
vnames=strvcat('topsis','intercept','gdp','gdp2','gdp3','fdi','regulation','coal','structure')
% Print out coefficient estimates
prt_sp(results,vnames,1);
% Print out effects estimates
spat_model=0;
direct_indirect_effects_estimates(results,W,spat_model);
panel_effects_sar(results,vnames,W);
% ----------------------------------------------------------------------------------------
% No fixed effects + spatially lagged dependent variable + spatially
% independent variables
info.lflag=0; % required for exact results
info.model=0;
info.fe=0; % Do not print intercept and fixed effects; use info.fe=1 to turn on
% New routines to calculate effects estimates
results=sar_panel_FE(y,[xconstant x wx],W,T,info);
vnames=strvcat('topsis','intercept','gdp','gdp2','gdp3','fdi','regulation','coal','structure');
% Print out coefficient estimates
prt_sp(results,vnames,1);
% Print out effects estimates
spat_model=1;
direct_indirect_effects_estimates(results,W,spat_model);
panel_effects_sdm(results,vnames,W);

关键词:MATLAB atlab matla 程序错误 空间计量 程序 空间

沙发
enxizheng 发表于 2015-5-31 20:16:32
系统找不到norm_prb函数, 你是用了别人的工具包吧? 确定有这个函数?

藤椅
figo1416 发表于 2015-6-2 13:58:33
是的下载的网上的空间计量工具箱,怎么办?有无误的程序代码吗?

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2026-1-3 03:46