全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 MATLAB等数学软件专版
5565 9
2014-05-02
我在空间面板计量程序中,demopanelscompare程序试行出错于prt_sp, 出错提示如下:
??? Error using ==> prt_sp at 77
results structure not known by prt_sp function

Error in ==> demopanelscompare at 61
prt_sp(results,vnames,1);


根据提示查错,demopanelscompare 61行为以下程序红色部分:
% 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('logcit','intercept','logp','logy');
% Print out coefficient estimates
prt_sp(results,vnames,1);
% Print out effects estimates


prt_sp 77 行是以下程序红色部分:

switch results.meth
case {'sem'}
fprintf(fid,'Pooled model with spatial error autocorrelation, no fixed effects \n');
case {'semsfe'}
fprintf(fid,'Pooled model with spatial error autocorrelation and spatial fixed effects \n');
case {'semtfe'}
fprintf(fid,'Pooled model with spatial error autocorrelation and time period fixed effects \n');
case {'semstfe'}
fprintf(fid,'Pooled model with spatial error autocorrelation, spatial and time period fixed effects \n');
case {'sar'}
fprintf(fid,'Pooled model with spatially lagged dependent variable, no fixed effects \n');
case {'sarsfe'}
fprintf(fid,'Pooled model with spatially lagged dependent variable and spatial fixed effects \n');
case {'sartfe'}
fprintf(fid,'Pooled model with spatially lagged dependent variable and time period fixed effects \n');
case {'sarstfe'}
fprintf(fid,'Pooled model with spatially lagged dependent variable, spatial and time period fixed effects \n');
otherwise
error('results structure not known by prt_sp function');
end % switch statement

根据提示的意思是,results.meth里没有上面的任何结果。我找到result.meth,里面只有一个结果是 psar。这是什么?psar是那种类型的空间面板回归??还是之前的程序有误?


https://bbs.pinggu.org/thread-1575198-1-1.html中有提到,ELHORST的代码集成和其它空间计量程序有冲突,我想是不是prt_sp 的问题。找了好几个prt_sp,目前用的这个是程序跑的最远的了!

如今连demo都跑不出来,更不要提试自己的数据了!求高手解救!
附件的程序是我在 http://www.regroningen.nl/elhorst/software.shtml 下载的,要试行还缺少其它空间计量函数。我从另外一个kongjian 计量包里补充。所以附上的程序是补充过的。


另外,https://bbs.pinggu.org/thread-1575198-1-1.html 有另一版的Elhorst code。由于不能重复就不上传了。







附件列表

Spat-Sym-US.xls

大小:36.5 KB

 马上下载

权重

cigarette.xls

大小:212 KB

 马上下载

面板数据

SPSEModel.rar

大小:7.7 MB

 马上下载

kongjian.rar

大小:3.55 MB

 马上下载

二维码

扫码加我 拉你入群

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

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

全部回复
2014-6-1 02:59:38
亲 可以执行的  运行后 会有提示 请选择 add path
二维码

扫码加我 拉你入群

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

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

2014-11-12 10:10:59
我也有同样的问题呢,楼主解决了么?
二维码

扫码加我 拉你入群

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

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

2014-11-12 10:12:34
我也有同样的问题呢,楼主解决了么?@laura914
本文来自: 人大经济论坛 MATLAB等数学软件专版 版,详细出处参考: https://bbs.pinggu.org/forum.php?mod=viewthread&tid=3025104&page=1&from^^uid=5044700
二维码

扫码加我 拉你入群

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

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

2014-12-31 16:49:45
非常感谢楼主分享这么好的资料!
二维码

扫码加我 拉你入群

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

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

2016-5-21 17:20:05
xiangnideyu 发表于 2014-6-1 02:59
亲 可以执行的  运行后 会有提示 请选择 add path
不太明白,可否详细说一下。
二维码

扫码加我 拉你入群

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

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

点击查看更多内容…
相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

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