- Hello. I am trying to do error correction model with rolling regression.
here. I want to change the first step as yt= bo + xt (no beta1, with rolling regression way t=1~40, 2~41, ..... 128~167)Basically, the b0 is the average of yt-xt (t=1~40, 2~41, ... 128~167). - Can you please give me some advice on this issue?
Thank you in advance!
-------------------------------------------------------------------------------------------------------------------------------------------------------
1. first step
forval i=1/167{
reg y x if t<`=39+`i'' & t>`=`i'-1'
predict uhat`i' if t<`=39+`i'' & t>`=`i'-1', res
}
2. second step
forval i=1/167{
reg D.y L.uhat`i' D.x if t<`=39+`i'' & t>`=`i'-1'
ereturn list
mat coef`i'=e(b)
}
mat comb = (coef1 \ coef2 \ coef3 \ coef4 \ coef5 \ coef6 \ coef7 \ coef8 \ coef9 \ coef10 \ coef11 \ coef12 \ coef13 \ coef14 \ coef15 \ coef16 \ coef17 \ coef18 \ coef19 \ coef20 \ coef21 \ coef22 \ coef23 \ coef24 \ coef25 \ coef26 \ coef27 \ coef28 \ coef29 \ coef30 \ coef31 \ coef32 \ coef33 \ coef34 \ coef35 \ coef36 \ coef37 \ coef38 \ coef39 \ coef40 \ coef41 \ coef42 \ coef43 \ coef44 \ coef45 \ coef46 \ coef47 \ coef48 \ coef49 \ coef50 \ coef51 \ coef52 \ coef53 \ coef54 \ coef55 \ coef56 \ coef57 \ coef58 \ coef59 \ coef60 \ coef61 \ coef62 \ coef63 \ coef64 \ coef65 \ coef66 \ coef67 \ coef68 \ coef69 \ coef70 \ coef71 \ coef72 \ coef73 \ coef74 \ coef75 \ coef76 \ coef77 \ coef78 \ coef79 \ coef80 \ coef81 \ coef82 \ coef83 \ coef84 \ coef85 \ coef86 \ coef87 \ coef88 \ coef89 \ coef90 \ coef91 \ coef92 \ coef93 \ coef94 \ coef95 \ coef96 \ coef97 \ coef98 \ coef99 \ coef100 \ coef101 \ coef102 \ coef103 \ coef104 \ coef105 \ coef106 \ coef107 \ coef108 \ coef109 \ coef110 \ coef111 \ coef112 \ coef113 \ coef114 \ coef115 \ coef116 \ coef117 \ coef118 \ coef119 \ coef120 \ coef121 \ coef122 \ coef123 \ coef124 \ coef125 \ coef126 \ coef127 \ coef128 \ coef129)
mat list comb
svmat comb
mat list comb
svmat comb
Specialized on Data processing, Data management Implementation plan, Data Collection tools - electronic and paper base, Data cleaning specifications, Data extraction, Data transformation, Data load, Analytical Datasets, and Data analysis. BJ Data Tech Solutions teaches on design and developing Electronic Data Collection Tools using CSPro, and STATA commands for data manipulation. Setting up Data Management systems using modern data technologies such as Relational Databases, C#, PHP and Android.
No comments:
Post a Comment