For help ,i have three questions when using eviews 8 to estimate Markov Switching Regime model ：
1、how can i calculate the mean μ（m）？
2、why do it must enter constant C followed the dependent variable in the first edit field ？
3、if i only enter constant C followed the dependent variable in the first edit field， “c” in the estimation output is the estimation of μ（m）？
THX in advance, looking forward to your reply.
Markov Switching Regime
Moderators: EViews Gareth, EViews Moderator

 EViews Developer
 Posts: 2604
 Joined: Wed Oct 15, 2008 9:17 am
Re: Markov Switching Regime
I don't understand the questions. What do you mean calculate the mean mu(m)? For every observation and state?
What is the specification of your mean equation?
In the first edit field you enter the dependent variable followed by regime specific variables.
I don't understand the third question.
What is the specification of your mean equation?
In the first edit field you enter the dependent variable followed by regime specific variables.
I don't understand the third question.
Re: Markov Switching Regime
Hello Eviews,
another inquiry about the Markov Switching regimes Hamilton (1989) model. How eviews handle the issue of the μ because in the example we only put AR(p) term as a non switching regressor. however, when checking the equation in the eviews manual in pg 395 it is seems clearer. please, how to connect Hamilton Model with the eviews input?
best regards,
another inquiry about the Markov Switching regimes Hamilton (1989) model. How eviews handle the issue of the μ because in the example we only put AR(p) term as a non switching regressor. however, when checking the equation in the eviews manual in pg 395 it is seems clearer. please, how to connect Hamilton Model with the eviews input?
best regards,

 EViews Developer
 Posts: 2604
 Joined: Wed Oct 15, 2008 9:17 am
Re: Markov Switching Regime
The example workfile that we provide estimates Hamilton's exact specification with a varying intercept and common ARs. The C that you put in the varying box is for the regime specific intercept.
Re: Markov Switching Regime
Sorry, i didn't describe it clearly.
1、For the first question，i mean calculate the mean mu(m) for every state? Because in Hamilton‘s example，it gave the mean of every state.
2、"in the first edit field you enter the dependent variable followed by regime specific variables",this was picked up from the guide book, i mean input variable into varying box. So,the second question : why do it must enter constant C followed the dependent variable in varying box?
3、The third question is what you discussed. What’s the meaning of the estimation of varying intercept？ It's the mean of every state？
1、For the first question，i mean calculate the mean mu(m) for every state? Because in Hamilton‘s example，it gave the mean of every state.
2、"in the first edit field you enter the dependent variable followed by regime specific variables",this was picked up from the guide book, i mean input variable into varying box. So,the second question : why do it must enter constant C followed the dependent variable in varying box?
3、The third question is what you discussed. What’s the meaning of the estimation of varying intercept？ It's the mean of every state？

 EViews Developer
 Posts: 2604
 Joined: Wed Oct 15, 2008 9:17 am
Re: Markov Switching Regime
1. We give the specifications for the conditional means in each state in the representations view. You'll have to grab them from there and compute them. In Hamilton's example, the mean equations are simple intercepts so that the coefficients on C in each state are the means.
2. I'm afraid that I still don't understand the question. There's a dependent variable/switching box and a nonswitching box. The former holds the dependent variable followed by the variables that are used in the state specific conditional means. The second box holds variables that do not vary across states. I don't understand what you mean by "why do it must enter constant C followed the dependent variable in varying box". Perhaps you mean why is C entered in this box after the dependent. That's because C represents the intercept in the model and we are allowing for state specific intercepts in the Hamilton model.
3. It is the mean of every state only if there are no additional regressors. If not, then it is simply the intercept in the state specific conditional mean.
2. I'm afraid that I still don't understand the question. There's a dependent variable/switching box and a nonswitching box. The former holds the dependent variable followed by the variables that are used in the state specific conditional means. The second box holds variables that do not vary across states. I don't understand what you mean by "why do it must enter constant C followed the dependent variable in varying box". Perhaps you mean why is C entered in this box after the dependent. That's because C represents the intercept in the model and we are allowing for state specific intercepts in the Hamilton model.
3. It is the mean of every state only if there are no additional regressors. If not, then it is simply the intercept in the state specific conditional mean.
Re: Markov Switching Regime
Thank you very much for your detailed reply，most of my doubt has been solved，except the following：
you have said “We give the specifications for the conditional means in each state in the representations view. You'll have to grab them from there and compute them.”，but i see the representation and didn't know how to compute.Maybe an example can be a best explanation. The following is the first example in Guide Book :
Output:
Variable Coefficient Std. Error zStatistic Prob.
Regime 1
C 0.951308 0.138535 6.866909 0.0000
G(1) 0.272286 0.090156 3.020159 0.0025
Regime 2
C 0.769095 0.232932 3.301796 0.0010
G(1) 0.493470 0.140620 3.509247 0.0004
Common
G(2) 0.012519 0.077722 0.161074 0.8720
LOG(SIGMA) 0.342579 0.117529 2.914851
Representation
Estimation Equation:
=========================
1: G = C(1) + C(2)*G(1) + C(5)*G(2)
2: G = C(3) + C(4)*G(1) + C(5)*G(2)
SIGMA = @EXP(C(6))
Substituted Coefficients:
=========================
1: G = 0.951307656491 + 0.272285505252*G(1)  0.0125190229875*G(2)
2: G = 0.769095374023 + 0.493469800025*G(1)  0.0125190229875*G(2)
SIGMA = @EXP(0.342579426545)
The question：how can i calculate the mean for each state?
Looking forward to your reply, best wishes for you!
you have said “We give the specifications for the conditional means in each state in the representations view. You'll have to grab them from there and compute them.”，but i see the representation and didn't know how to compute.Maybe an example can be a best explanation. The following is the first example in Guide Book :
Output:
Variable Coefficient Std. Error zStatistic Prob.
Regime 1
C 0.951308 0.138535 6.866909 0.0000
G(1) 0.272286 0.090156 3.020159 0.0025
Regime 2
C 0.769095 0.232932 3.301796 0.0010
G(1) 0.493470 0.140620 3.509247 0.0004
Common
G(2) 0.012519 0.077722 0.161074 0.8720
LOG(SIGMA) 0.342579 0.117529 2.914851
Representation
Estimation Equation:
=========================
1: G = C(1) + C(2)*G(1) + C(5)*G(2)
2: G = C(3) + C(4)*G(1) + C(5)*G(2)
SIGMA = @EXP(C(6))
Substituted Coefficients:
=========================
1: G = 0.951307656491 + 0.272285505252*G(1)  0.0125190229875*G(2)
2: G = 0.769095374023 + 0.493469800025*G(1)  0.0125190229875*G(2)
SIGMA = @EXP(0.342579426545)
The question：how can i calculate the mean for each state?
Looking forward to your reply, best wishes for you!

 EViews Developer
 Posts: 2604
 Joined: Wed Oct 15, 2008 9:17 am
Re: Markov Switching Regime
For static conditional mean fits, you can use the following commands
series G1 = 0.951307656491 + 0.272285505252*G(1)  0.0125190229875*G(2)
series G2 = 0.769095374023 + 0.493469800025*G(1)  0.0125190229875*G(2)
Re: Markov Switching Regime
Sorry，i didn‘t catch it completely.
You mean using the following commands to generate series G1 for state 1 and G2 for state 2,then calculate the mean of G1 and G2？
For example, supposed the series G1 may be 1，4，9 and 10，then the mean for state 1 is:（1+4+9+10）/4=6, Is it right ?
You mean using the following commands to generate series G1 for state 1 and G2 for state 2,then calculate the mean of G1 and G2？
For example, supposed the series G1 may be 1，4，9 and 10，then the mean for state 1 is:（1+4+9+10）/4=6, Is it right ?

 EViews Developer
 Posts: 2604
 Joined: Wed Oct 15, 2008 9:17 am
Re: Markov Switching Regime
Your last question suggests that you want to compute the insample mean of the fitted dependent variable assuming your are in each state. In that case, you can take the means of the G1 and G2 series as computed above to give you those means as in your example.
I must admit that these numbers are not the first thing that I would have thought one would want, so I recommend that you think carefully about what they represent. This is especially true since your equation is dynamic.
I must admit that these numbers are not the first thing that I would have thought one would want, so I recommend that you think carefully about what they represent. This is especially true since your equation is dynamic.
Who is online
Users browsing this forum: No registered users and 2 guests