I try to estimate a growth model with Markov-switching models with AR(1) with both expansion and recession states for multiple models with one step-ahead prediction. That is two states: recession and expansion. All variables in the model are endogenous with a single lag. The theoretical background is a model with a latent unit root (AR(1)).
State1 is recession and state2 is expansion.
While I can easily estimate the models, I cannot generate the publication-level table.
I need to collect several statistics for each model, gathering them all in a publication-level table.
I have four models to present.
For the first model named Alternative 1,
I run
Var1 is labeled as alternative 1.
For model 2, named Alternative 2,
Var2 is labeled as alternative 2.
For model 3 named Alternative 3,
]Var3 is labeled as alternative 3.
For model 4, named Alternative 4,
Var4 is labeled as alternative4
So, I need to gather statistics to create a publication-level table with the following statistics:
Those are
0 (Recession Expected Duration,
1 (Expansion Expected Duration, )
2 (AR(1) Coefficient, )
3 (AR(1) Standard Error, )
4 (Log-Likelihood, )
5 (AIC, )
6 (BIC, )
7 (Recession Mean, )
8 (Recession Std Dev, )
9 (Expansion Mean, )
10 (Expansion Std Dev,)
11 (Transition Matrix (Recession), )
12 (Transition Matrix (Expansion),)
13 (RMSE, )
14 (R^2, )
15 (Directional Accuracy,)
16 (Recession Coefficient)
17 (Recession Standard Error, )
18 (Recession T-value, )
19 (Recession P-value, )
20 (Expansion Coefficient,)
21 (Expansion Standard Error, )
22 (Expansion T-value, )
23 (Expansion P-value, )
24 (Cov(p[0->0], p[0->0]), )
25 (Cov(p[0->1], p[0->1]), )
26 (Cov(p[1->1], p[1->1]), )
27 (p[2->0], )
28 (p[2->1], )
29 (const[0], )
30 (const[2], )
31 (x1[0], )
32 (x1[1],
33 (sigma2, )
34 (p[0->0], )
35 (p[0->1], )
36 (p[1->1], )
Data sample is below..
On the layout , Variables -models should be on the Columns and statistics on the rows.
Thanks for any help!
Mario
cc @Justin Niakamal @Scott Merryman @Jeff PitbladoEnable GingerCannot connect to Ginger Check your internet connection
or reload the browserDisable in this text fieldRephraseRephrase current sentence2Edit in Ginger×Enable GingerCannot connect to Ginger Check your internet connection
or reload the browserDisable in this text fieldRephraseRephrase current sentence2Edit in Ginger×
State1 is recession and state2 is expansion.
While I can easily estimate the models, I cannot generate the publication-level table.
I need to collect several statistics for each model, gathering them all in a publication-level table.
I have four models to present.
For the first model named Alternative 1,
I run
Code:
mswitch ar gdp_g var1, switch(var1) arswitch ar(1) varswitch difficult technique(dfp) iterate(5000) estat duration estat duration /// to calculate the average length of recession periods and expansion periods
Var1 is labeled as alternative 1.
For model 2, named Alternative 2,
Code:
mswitch ar gdp_g var2 ,switch(var2) arswitch ar(1) varswitch difficult technique(dfp) iterate(5000) estat duration /// to calculate the average length of recession periods and expansion periods
For model 3 named Alternative 3,
Code:
mswitch ar gdp_g var3 , switch(var3) arswitch ar(1) varswitch difficult technique(dfp) iterate(5000) estat duration estat duration /// to calculate the average length of recession periods and expansion periods
For model 4, named Alternative 4,
Code:
mswitch ar gdp_g var4 ,switch(var4) arswitch ar(1) varswitch difficult technique(dfp) iterate(5000) estat duration /// to calculate the average length of recession periods and expansion periods
So, I need to gather statistics to create a publication-level table with the following statistics:
Those are
0 (Recession Expected Duration,
1 (Expansion Expected Duration, )
2 (AR(1) Coefficient, )
3 (AR(1) Standard Error, )
4 (Log-Likelihood, )
5 (AIC, )
6 (BIC, )
7 (Recession Mean, )
8 (Recession Std Dev, )
9 (Expansion Mean, )
10 (Expansion Std Dev,)
11 (Transition Matrix (Recession), )
12 (Transition Matrix (Expansion),)
13 (RMSE, )
14 (R^2, )
15 (Directional Accuracy,)
16 (Recession Coefficient)
17 (Recession Standard Error, )
18 (Recession T-value, )
19 (Recession P-value, )
20 (Expansion Coefficient,)
21 (Expansion Standard Error, )
22 (Expansion T-value, )
23 (Expansion P-value, )
24 (Cov(p[0->0], p[0->0]), )
25 (Cov(p[0->1], p[0->1]), )
26 (Cov(p[1->1], p[1->1]), )
27 (p[2->0], )
28 (p[2->1], )
29 (const[0], )
30 (const[2], )
31 (x1[0], )
32 (x1[1],
33 (sigma2, )
34 (p[0->0], )
35 (p[0->1], )
36 (p[1->1], )
Data sample is below..
On the layout , Variables -models should be on the Columns and statistics on the rows.
Thanks for any help!
Mario
Code:
* Example generated by -dataex-. For more info, type help dataex clear input float(year gdp_g var1 var2 var3 var4) 1990 .25382978 .05228972 -.3444368 .27984852 .7201515 1991 -.2125532 .935702 .3012117 .3284199 .6465201 1992 .317234 4.1132245 3.1708634 .3083437 .691594 1993 1.3534043 5.108476 2.5406225 .24354993 .7332776 1994 2.612128 3.425388 1.768389 .23602992 .7400631 1995 3.358936 3.972118 2.3609061 .27747253 .7225274 1996 2.3597872 6.033151 4.661421 .325723 .674277 1997 3.0414894 3.793532 3.347975 .30558395 .6757603 1998 1.793617 3.7508705 3.940954 .29313186 .6818681 1999 1.8717022 2.980336 3.343685 .28042582 .7138736 2000 3.385532 2.734389 1.775652 .2688356 .7311644 2001 2.0512767 .7556655 1.75466 .2554258 .7445742 2002 2.913404 1.386648 2.0334747 .2105769 .789423 2003 3.017021 1.5340753 1.0089021 .1955357 .8044643 2004 3.321915 1.81795 .5531137 .2408904 .7591096 2005 2.6668086 -.29726213 -.7515011 .2480769 .7519231 2006 2.732766 -2.838431 -2.9404194 .2673077 .7326923 2007 2.8740425 -1.5961655 -1.8205668 .26824456 .7317554 2008 .04914893 -1.881141 -3.931049 .2303533 .7696467 2009 -.9074468 -.8101007 -1.919522 .23055235 .7694477 2010 2.887234 -2.2245317 -1.8109186 .29588655 .7041135 2011 1.4131914 -1.431529 -1.4509507 .3009355 .6958717 2012 .9474468 -2.6042926 -3.2060516 .25005552 .7229174 2013 1.3274468 -.8640846 -2.6833265 .20782596 .7834868 2014 .8512766 -.6784925 -2.421195 .22527473 .7747253 end
cc @Justin Niakamal @Scott Merryman @Jeff PitbladoEnable GingerCannot connect to Ginger Check your internet connection
or reload the browserDisable in this text fieldRephraseRephrase current sentence2Edit in Ginger×Enable GingerCannot connect to Ginger Check your internet connection
or reload the browserDisable in this text fieldRephraseRephrase current sentence2Edit in Ginger×
Comment