楼主: laura914
4969 9

[问答] 空间面板计量程序中,demopanelscompare程序试行出错于prt_sp,求教!附程序包! [推广有奖]

  • 2关注
  • 3粉丝

本科生

83%

还不是VIP/贵宾

-

威望
0
论坛币
2452 个
通用积分
1.9603
学术水平
2 点
热心指数
2 点
信用等级
2 点
经验
2430 点
帖子
101
精华
0
在线时间
101 小时
注册时间
2012-1-17
最后登录
2021-8-25

相似文件 换一批

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
我在空间面板计量程序中,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。由于不能重复就不上传了。







二维码

扫码加我 拉你入群

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

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

关键词:Compare Panels Panel pane 空间面板 程序 空间

Spat-Sym-US.xls

36.5 KB

权重

cigarette.xls

212 KB

面板数据

SPSEModel.rar

7.7 MB

kongjian.rar

3.55 MB

沙发
xiangnideyu 在职认证  发表于 2014-6-1 02:59:38 |只看作者 |坛友微信交流群
亲 可以执行的  运行后 会有提示 请选择 add path

使用道具

藤椅
shilinhongs 发表于 2014-11-12 10:10:59 |只看作者 |坛友微信交流群
我也有同样的问题呢,楼主解决了么?

使用道具

板凳
shilinhongs 发表于 2014-11-12 10:12:34 |只看作者 |坛友微信交流群
我也有同样的问题呢,楼主解决了么?@laura914
本文来自: 人大经济论坛 MATLAB等数学软件专版 版,详细出处参考: https://bbs.pinggu.org/forum.php?mod=viewthread&tid=3025104&page=1&from^^uid=5044700

使用道具

报纸
haoyuking 在职认证  发表于 2014-12-31 16:49:45 |只看作者 |坛友微信交流群
非常感谢楼主分享这么好的资料!

使用道具

地板
渲染离别 发表于 2016-5-21 17:20:05 |只看作者 |坛友微信交流群
xiangnideyu 发表于 2014-6-1 02:59
亲 可以执行的  运行后 会有提示 请选择 add path
不太明白,可否详细说一下。

使用道具

7
沙允 发表于 2016-8-24 14:58:02 |只看作者 |坛友微信交流群
谢谢 请问后续怎么做啊?痛苦恼

使用道具

8
zhaoxiaojunpku 发表于 2016-10-4 21:56:04 |只看作者 |坛友微信交流群
请问楼主解决了吗?我在demo包里,并没有找到prt_sp的function啊

使用道具

9
徐子墨 发表于 2019-5-28 11:23:29 |只看作者 |坛友微信交流群
zhaoxiaojunpku 发表于 2016-10-4 21:56
请问楼主解决了吗?我在demo包里,并没有找到prt_sp的function啊
https://spatial-panels.com/software/

使用道具

10
zizigang 发表于 2021-4-29 10:41:34 |只看作者 |坛友微信交流群
请问楼主解决“函数或变量 'prt_sp' 无法识别”的问题了吗?

使用道具

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

本版微信群
加好友,备注cda
拉您进交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-5-2 10:57