全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 MATLAB等数学软件专版
51865 67
2013-11-04
俺学习了TVP-VAR,并仿照编写了code,然后跑出了结果,喜悦之余,就粘贴上来,自娱的同时,也和坛子里的各位朋友分享。

       1 Introduction

TVP-VAR(Time-VaryingParameter Vector AutoRegression) is the package for a Bayesian analysis of thetime-varying parameter VAR models. It implements the Markov chain Monte Carlo(MCMC) algorithm to generate sample from the posterior distribution of theTVP-VAR models.

2 Model formulation andcreating objects


3俺参照编写的第一个code/***  MCMC estimation for Time-Varying ParameterVAR model**  with stochastic volatility**                           **  tvpvar_ex*.ox illustrates the MCMC estimation**  using TVP-VAR class**  writing by Chao Zhou**  My qq number is 529820052**  E-mail:gssdzc@126.com**  For my first TVP-VAR model**  For my working paper about LiKeQiangindex  */ #include<oxstd.h>#include<oxprob.h>#include<oxfloat.h>#include<oxdraw.h>#include<TVPVAR.ox>  //TVP-VAR class main(){                                                                            decl nlag, my, asvar, iyear, iperiod,ifreq;        nlag = 2;      //#of lag        /*--- data load ---*/        my = loadmat("tvpvar_ex.xls");  //data        /*--- some options (not required) ---*/              asvar = {"p", "x","i"};  //variable name        iyear = 1977;      //year of the first observation       iperiod = 3;  //period of the first observation       ifreq = 4;            //frequency of data                                   //(periods ineach year)                                         /*--- MCMC estimation ---*/        decl tvpvar = new TVPVAR();//TVP-VARclass        tvpvar.SetRanseed(3);        tvpvar.SetData(my, nlag);      //set data and lag              tvpvar.SetVarName(asvar);  //set variable name(*)       tvpvar.SetPeriod(iyear, iperiod, ifreq);                                                        //setinitial period(*)        tvpvar.SetFastImp(1);            //set fast computing of                                                        //impulseresponse(*)                                                               tvpvar.MCMC(10000);                 //MCMC estimation        tvpvar.DrawImp(<4, 8, 12>, 1);          //draw impulse(1)                              //trajectories of (4,8,12)-period horizon                                     tvpvar.DrawImp(<30, 70, 100>, 0);    //draw impulse(2)                              //response at t = 30, 70, 100                     delete tvpvar;}/***(*): options, not required for estimation*/       // enter code


tvpvar_vol_看图王.jpg tvpvar_mcmc_看图王.jpg


附件列表
tvpvar_imp2_看图王.jpg

原图尺寸 638.05 KB

tvpvar_imp2_看图王.jpg

tvpvar_imp1_看图王.jpg

原图尺寸 629.18 KB

tvpvar_imp1_看图王.jpg

tvpvar_aj_看图王.jpg

原图尺寸 534.43 KB

tvpvar_aj_看图王.jpg

tvpvar_a_看图王.jpg

原图尺寸 517.82 KB

tvpvar_a_看图王.jpg

TVP07_看图王.jpg

原图尺寸 444.59 KB

TVP07_看图王.jpg

TVP02_看图王.jpg

原图尺寸 364.63 KB

TVP02_看图王.jpg

TVP01_看图王.jpg

原图尺寸 731.11 KB

TVP01_看图王.jpg

二维码

扫码加我 拉你入群

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

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

全部回复
2013-11-4 09:43:08
排版技术太差了。。。。。。。
二维码

扫码加我 拉你入群

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

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

2013-11-4 09:46:02
为图方便,数据用OX自带的exlce数据,只需要更换成自己想要建模的数据就OK了。so easy。。。。。。
俺的论文已经在写了……
二维码

扫码加我 拉你入群

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

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

2013-11-4 09:48:31
Nakajima有现成的数据包,你觉得之前的不好吗?
二维码

扫码加我 拉你入群

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

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

2014-3-6 18:07:30
crystal8832 发表于 2013-11-4 09:48
Nakajima有现成的数据包,你觉得之前的不好吗?
您好!我想学学TVP-VAR模型,可不可以发一些资料给我呢?在软件里面的操作程序是如何的呢?谢谢哦!邮箱592324313@qq.com
二维码

扫码加我 拉你入群

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

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

2014-3-7 09:51:25
正在学习啊!!
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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