悬赏 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);