About EViews : How to store the rolling estimates coefficient by martix
发布:3qsir | 分类:Eviews软件培训
关于本站
人大经济论坛-经管之家:分享大学、考研、论文、会计、留学、数据、经济学、金融学、管理学、统计学、博弈论、统计年鉴、行业分析包括等相关资源。
经管之家是国内活跃的在线教育咨询平台!
获取电子版《CDA一级教材》
完整电子版已上线CDA网校,累计已有10万+在读~ 教材严格按考试大纲编写,适合CDA考生备考,也适合业务及数据分析岗位的从业者提升自我。
TOP热门关键词
免费学术公开课,扫码加入![]() |
Sir : Can you teach me how to store rolling estimates coefficient using matix ?
The codecopy from the Eview8 's sample programs (rollfcst1.prg), I wrote some lines myself (marked on red) on the original codes.I want to store all beta cofficient(coeff1 coeff2 coeff3 ) and statistics(coeff4 coeff5 coeff6) on every one looping, fromOLS estimate procedure, I hope result like below table:
nroll coeff1 coeff2 coeff3 coeff4 coeff5 coeff6
1 -13.5 8.6 4.3 -1.65 1.96 2.54
2 -3.6 7.2 2.1 - 3.01 2.04 1.89
3 . . . . . .
4
' create workfile
wfcreate rollfcst q 1968 1982
' fill data
series y
y.fill3.733,3.567,3.533,3.400,3.400,3.433,3.576,3.567,4.167,4.733,5.167,5.867,5.900,5.900,6.033,5.967,5.767,5.633,5.600,5.333,4.933,4.867,4.833,4.800,5.033,5.133,5.633,6.667,8.133,8.767,8.600,8.433,7.633,7.467,7.833,7.900,7.467,7.100,6.900,6.633,6.200,6.000,5.967,5.833,5.733,5.767,5.800,5.867,6.133,7.500,7.633,7.500,7.333,7.400,7.333,8.367,8.767,9.367,9.500,10.53
' set window size
!window = 20
' get size of workfile
!length = @obsrange
' declare equation for estimation
equation eq1
' declare series for final results
series yhat 'point estimates
series yhat_se ' forecast std.err.
' set step size
!step = 4
'calculate number of rolls
!nrolls = @floor((!length-!window)/!step)
'matrix to store coefficient estimates
matrix(!nrolls ,3) coeff' where 3 is the number of coefficients
' move sample !step obs at a time
for !i = 1 to!length-!window+1-!step step!step
'set sample to estimation period
smpl@first+!i-1 @first+!i+!window-2
'estimate equation
eq1.lsy c y(-1) y(-2)
coeff(!i,1)= eq1.@coef(1)
coeff(!i,2)=eq1.@coef(2)
coeff(!i,3)=eq1.@coef(3)
coeff(!i,4)=eq1.@coef(4)
coeff(!i,5)=eq1.@coef(5)
coeff(!i,6)=eq1.@coef(6)
'reset sample to forecast period
smpl@first+!i+!window-1 @first+!i+!window-2+!step
'make forecasts in temporary series first
eq1.forecast(f=na)tmp_yhat tmp_se
'copy data in current forecast sample
yhat= tmp_yhat
yhat_se= tmp_se
next
THS !
免流量费下载资料----在经管之家app可以下载论坛上的所有资源,并且不额外收取下载高峰期的论坛币。
涵盖所有经管领域的优秀内容----覆盖经济、管理、金融投资、计量统计、数据分析、国贸、财会等专业的学习宝库,各类资料应有尽有。
来自五湖四海的经管达人----已经有上千万的经管人来到这里,你可以找到任何学科方向、有共同话题的朋友。
经管之家(原人大经济论坛),跨越高校的围墙,带你走进经管知识的新世界。
扫描下方二维码下载并注册APP
您可能感兴趣的文章
- Eviews软件 ... | 如何在eviews 中输入全部股票交易 ...
- Eviews软件 ... | [版主推荐]高铁梅老师:计量经济 ...
- Eviews软件 ... | 【Eviews】跟张晓峒学Eviews,赠 ...
- Eviews软件 ... | eviews做无截距项二元线性模型回 ...
- Eviews软件 ... | eviews得到的DW值在1附近,加入A ...
- Eviews软件 ... | 【Eviews】EViews 7计量经济与时 ...
- Eviews软件 ... | [求助]使用EVIEWS做GARCH时的问题 ...
- Eviews软件 ... | 急!!eviews两次结果不同
人气文章
本文标题:About EViews : How to store the rolling estimates coefficient by martix
本文链接网址:https://bbs.pinggu.org/jg/ruanjianpeixun_eviewsruanjianpeixun_2960770_1.html
2.转载的文章仅代表原创作者观点,与本站无关。其原创性以及文中陈述文字和内容未经本站证实,本站对该文以及其中全部或者部分内容、文字的真实性、完整性、及时性,不作出任何保证或承若;
3.如本站转载稿涉及版权等问题,请作者及时联系本站,我们会及时处理。



