MSSysRegression
Posted: Sun May 27, 2012 9:33 am
Hello,
I am trying to fit a fixed-tansition-probability Markov-switching model with one exogenous variable:
Y_t = b0_st + b1_st * X_t + epsilon_t , and st is either 1 or 0 .
I think that the procedure MSSysRegression.src is what I need, but some errors occur when I apply this procedure.
(In fact, I just modified some code from msvarsetup.src to use @MSSysRegression.)
In short, my questions are:
1.
When I applied the code above, I got the message like:
## SX11. Identifier %MSSYSREGPROB is Not Recognizable. Incorrect Option Field or Parameter Order?
>>>> log(%MSSysRegProb(<<<<
and
## CP18. MSSYSREGINIT is not the Name of a PROCEDURE. (Did you forget to SOURCE?)
>>>>@MSSysReginit<<<<
How to modifiy the code in order to fit the FTP-MS model with one exogenous variable?
2.
Is that possible to fit the model with @msvarsetup?
I would really appreciate your help~~
Regards,
Samson
I am trying to fit a fixed-tansition-probability Markov-switching model with one exogenous variable:
Y_t = b0_st + b1_st * X_t + epsilon_t , and st is either 1 or 0 .
I think that the procedure MSSysRegression.src is what I need, but some errors occur when I apply this procedure.
(In fact, I just modified some code from msvarsetup.src to use @MSSysRegression.)
Code: Select all
@MSSysRegression(states =2,switch=CH)
# Y
# X
frml MSSysRegf = log(%MSSysRegProb(t))
nonlin(parmset=msparms) p
nonlin(parmset=varparms) mu betasys sigmav
@MSSysReginit
maximize(parmset=varparms+msparms, $
start= (pstar=%MSSysRegInit()), $
reject = %MSSysRegInitTransition()==0.0, $
method=bfgs, iters=300) MSSysRegf1.
When I applied the code above, I got the message like:
## SX11. Identifier %MSSYSREGPROB is Not Recognizable. Incorrect Option Field or Parameter Order?
>>>> log(%MSSysRegProb(<<<<
and
## CP18. MSSYSREGINIT is not the Name of a PROCEDURE. (Did you forget to SOURCE?)
>>>>@MSSysReginit<<<<
How to modifiy the code in order to fit the FTP-MS model with one exogenous variable?
2.
Is that possible to fit the model with @msvarsetup?
I would really appreciate your help~~
Regards,
Samson