楼主: 海瑟巫婆
8500 10

[问答] 空间面板数据sar模型程序 [推广有奖]

  • 0关注
  • 4粉丝

高中生

60%

还不是VIP/贵宾

-

威望
0
论坛币
84 个
通用积分
0.0002
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
220 点
帖子
25
精华
0
在线时间
29 小时
注册时间
2012-6-12
最后登录
2012-8-15

相似文件 换一批

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
T=7; % number of time periods
N=11; % number of regions
% row-normalize W
W=normw(w11); % function of LeSage
y=shuju1(:,[1]); % column number in the data matrix that corresponds to the dependent variable
x=shuju1(:,[2,3,4,5,6]); % column numbers in the data matrix that correspond to the independent variables
xconstant=ones(N*T,1);
[nobs K]=size(x);
% ----------------------------------------------------------------------------------------
% spatial fixed effects + spatially lagged dependent variable无固定效应
info.lflag=0; % required for exact results
info.model=0;
results1=sar_panel_FE(y,[xconstant x],W,T,info);
vnames1=strvcat('y','intercept','zyfg','lq','rjgdp','gyh','tr');
prt_spnew(results1,vnames1,1);
%空间固定效应
info.lflag=0; % required for exact results
info.model=1;
info.fe=0; % no print intercept and spatial fixed effects
results2=sar_panel_FE(y,x,W,T,info);
vnames2=strvcat('y','zyfg','lq','rjgdp','gyh','tr');
prt_spnew(results2,vnames2,1);
T=7; % number of time periods
N=11; % number of regions
% row-normalize W
W=normw(w11); % function of LeSage
y=shuju1(:,[1]); % column number in the data matrix that corresponds to the dependent variable
x=shuju1(:,[2,3,4,5,6]); % column numbers in the data matrix that correspond to the independent variables
xconstant=ones(N*T,1);
[nobs K]=size(x);
% ----------------------------------------------------------------------------------------
% spatial fixed effects + spatially lagged dependent variable无固定效应
info.lflag=0; % required for exact results
info.model=0;
results1=sar_panel_FE(y,[xconstant x],W,T,info);
vnames1=strvcat('y','intercept','zyfg','lq','rjgdp','gyh','tr');
prt_spnew(results1,vnames1,1);
%空间固定效应
info.lflag=0; % required for exact results
info.model=1;
info.fe=0; % no print intercept and spatial fixed effects
results2=sar_panel_FE(y,x,W,T,info);
vnames2=strvcat('y','zyfg','lq','rjgdp','gyh','tr');
prt_spnew(results2,vnames2,1);
哪位大侠帮我看看这段程序对吗?运行时候总是出错: 出错.jpg
二维码

扫码加我 拉你入群

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

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

关键词:SAR模型 面板数据 空间面板 AR模型 SAR 程序 空间

沙发
panjiquan 发表于 2012-8-10 19:54:27 |只看作者 |坛友微信交流群
合一

使用道具

藤椅
洞庭古风 发表于 2012-8-10 19:54:58 |只看作者 |坛友微信交流群
不会啊,高深
从股市诞生之日起,预测股价顶部的言论就从未消停。但这些言论反而让一批又一批的投资人振奋精神。我告诉大家,只要我

使用道具

板凳
剑客之山 发表于 2012-8-10 20:11:06 |只看作者 |坛友微信交流群
强烈顶贴,大赞楼主

使用道具

报纸
zjzcs87@163.com 发表于 2012-9-14 12:32:05 |只看作者 |坛友微信交流群
请问楼主问题解决了吗

使用道具

地板
tulipsliu 在职认证  发表于 2012-9-14 17:06:51 |只看作者 |坛友微信交流群
https://bbs.pinggu.org/thread-1575198-1-1.html
现在那个压缩包;可以放在 jpl7/spatial 下;

你的这个的意思是,将一个脚本文件以 fuction (函数文件)来执行;
不知道你工具箱里有那几个函数文件没;
上传的这个就是;

劳动经济学

使用道具

7
rokre2tt 发表于 2012-12-12 23:01:36 |只看作者 |坛友微信交流群
请问你的SAR程序运行有没有出现这个错误:??? Operands to the || and && operators must be convertible to logical scalar values.

Error in ==> fminbnd at 280
        if ( (fu <= fw) || (w == xf) )

Error in ==> sar_panel_FE at 252
    [p,liktmp,exitflag,output] = fminbnd('f_sarpanel',rmin,rmax,options,detval,epe0,eped,epe0d,N,T);

Error in ==> demopanelscompare at 33
results=sar_panel_FE(y,x,W,T,info);
就是这个第280行的那个语句是不是有错啊?折腾好半天了

使用道具

8
snowsmile1211 发表于 2013-3-6 20:31:49 |只看作者 |坛友微信交流群
rokre2tt 发表于 2012-12-12 23:01
请问你的SAR程序运行有没有出现这个错误:??? Operands to the || and && operators must be convertible t ...
请问您是否知道如何进行SAR检验?我正在做一个空间面板模型,但是找不到相关资料,如果会的话,请帮我一下,谢谢!

使用道具

9
QINGTIAN607 发表于 2014-6-3 20:36:35 |只看作者 |坛友微信交流群
楼主 我把你的语句改成了自己 可以用 我想问一下 你的这个模型是什么,我是说具体的名称

使用道具

10
lk201368 发表于 2018-8-22 11:15:52 |只看作者 |坛友微信交流群
tulipsliu 发表于 2012-9-14 17:06
https://bbs.pinggu.org/thread-1575198-1-1.html
现在那个压缩包;可以放在 jpl7/spatial 下;
谢谢你,用了你的程序包解决多天困惑的问题!学者的情怀

使用道具

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

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

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

GMT+8, 2024-4-27 23:16