楼主: 真正的小明
699 2

[统计软件] 空间状态模型 [推广有奖]

  • 0关注
  • 0粉丝

等待验证会员

初中生

80%

还不是VIP/贵宾

-

威望
0
论坛币
1 个
通用积分
0.0600
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
76 点
帖子
4
精华
0
在线时间
31 小时
注册时间
2019-7-24
最后登录
2020-1-12

相似文件 换一批

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
我做的是空间状态模型预测结合State space in Stata.pdf来做的,但是出现了一点问题。
原始数据如下:
data.dta (91.92 KB)
代码如下

[LaTex]tsset t   *趋势 constraint 1 [trend]L.trend = 1 constraint 2 [trend]L.slope = 1 constraint 3 [slope]L.slope = 1 constraint 4 [Y]A = 1 constraint 5 [Y]B = 1 constraint 6 [Y]C = 1 constraint 7 [Y]trend = 1  sspace (trend L.trend L.slope, state noconstant)(slope L.slope, state noerror noconstant)(Y A B C trend,noconstant), constraints(1/7) covstate(diagonal)  predict D1  predict trend, state equation(trend)  predict res, residuals  local n = floor(3*_N/4)  generate int q = quarter(t)        twoway (scatter Y t in `n'/L, msymbol(none) mlabel(q) mlabposition(0) ytitle(上感) ylabel(#3)) (tsline D1 trend in `n'/L), nodraw name(G1)  tsline res in `n'/L, nodraw name(RES) yline(0)  graph combine G1 RES, name(G2) rows(2)  graph drop G1 RES  tsappend, add(60)  predict D1, dynamic(td(12apr2018)) rmse(rftp)  scalar z = invnormal(0.95)  gen lb = D2 + z*rftp if t>=td(11apr2018)  gen ub = D2 - z*rftp if t>=td(11apr2018)  tsline D2 if t>=td(11apr2018) || tsrline lb ub if t>=td(11apr2018),xline(`=td(11apr2018)') legend(label(2 "90 \% CI")) name(DYN)[/LaTex]
问题在于我的dynamic()函数更本不能运行出结果,大佬帮帮忙啊   小萌新上路翻车了


二维码

扫码加我 拉你入群

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

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

关键词:stata dynamic 空间状态模型

大佬帮帮忙啊!

使用道具

在线等  急!!!

使用道具

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

本版微信群
加JingGuanBbs
拉您进交流群

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

GMT+8, 2024-10-5 19:13