全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 MATLAB等数学软件专版
2274 2
2015-05-31
悬赏 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);

二维码

扫码加我 拉你入群

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

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

全部回复
2015-5-31 20:16:32
系统找不到norm_prb函数, 你是用了别人的工具包吧? 确定有这个函数?
二维码

扫码加我 拉你入群

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

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

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

扫码加我 拉你入群

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

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

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

说点什么

分享

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