[Scilab-users] Grocer - Markov Switching model estimation

2015-06-15 Thread Cristian
Hello everyone, I try to estimate a MS with Grocer . I have *annual data*. I
have read the chapter 23 (manual), where I found an perfect example for
quartely data. Even though, I have alredy a doubt. 

The chapter 23 gives us an example to etimate a MS-AR(3). The specification
is the following:

r=ms_reg('100*(lpbi-lagts(2,lpbi))',['100*(lagts(1,lpbi)-lagts(3,lpbi))';...
--'100*(lagts(2,lpbi)-lagts(4,lpbi))';'100*(lagts(3,lpbi)-lagts(5,lpbi))'],'cte',nb_states,switch_var,var_opt,'transf=stud',...
--'prt=initial;final')

So, the question is: How should I modify that expression in order to
estimate a MS-AR(1) with anual data? 

Thanks in advance

Cristian



--
View this message in context: 
http://mailinglists.scilab.org/Grocer-Markov-Switching-model-estimation-tp4032440.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at 
Nabble.com.
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Grocer / Markov Switching Model

2013-01-11 Thread ericdoblas
Thank you Éric!

Tha last consulting: Could you give me a example (or routine) to load my
data (the first mail)?

Best Regards

Eric Doblas




--
View this message in context: 
http://mailinglists.scilab.org/Grocer-Markov-Switching-Model-tp4025635p4025653.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at 
Nabble.com.
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Grocer / Markov Switching Model

2013-01-11 Thread ericdoblas
Hello Éric, 

I need only one step, because I was able to replicate your example.

I can load the data:

Dates;LnPBI
1993q1;12,2847456986185
1993q2;12,3961633542544
1993q3;12,3993569016157 .. so on.

Then, I used impexc2bd, and after that, I loaded .dat file. But, I can´t run
LnPBI.

Thank you!

Eric



--
View this message in context: 
http://mailinglists.scilab.org/Grocer-Markov-Switching-Model-tp4025635p4025656.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at 
Nabble.com.
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Grocer / Markov Switching Model

2013-01-11 Thread Eric Dubois
What if you change the comma in your file into a dot (the dot is the
decimal separator in Scilab)?

Éric.

PS:
1) if you use the file I have sent to you, then LPIB is equivalent to LnPBI
you want to load into Scilab
2) and log(GDP) too!

2013/1/11 ericdoblas ericdoblasargent...@yahoo.com.ar

 Hello Éric,

 I need only one step, because I was able to replicate your example.

 I can load the data:

 Dates;LnPBI
 1993q1;12,2847456986185
 1993q2;12,3961633542544
 1993q3;12,3993569016157 .. so on.

 Then, I used impexc2bd, and after that, I loaded .dat file. But, I can´t
 run
 LnPBI.

 Thank you!

 Eric



 --
 View this message in context:
 http://mailinglists.scilab.org/Grocer-Markov-Switching-Model-tp4025635p4025656.html
 Sent from the Scilab users - Mailing Lists Archives mailing list archive
 at Nabble.com.
 ___
 users mailing list
 users@lists.scilab.org
 http://lists.scilab.org/mailman/listinfo/users

___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Grocer / Markov Switching Model

2013-01-11 Thread ericdoblas
Dear Éric, 
I appreciate your great help.

I can load the data!!

I just need the last step. When I run

r=ms_reg('100*lpbi-lagts(2,lpbi))','['100*(lagts(1,lpbi)-lagts(3,lpbi))';'100*(lagts(2,lpbi)-lagts(4,lpbi))';'100*(lagts(3,lpbi)-lagts(5,lpbi))'],'cte',nb_states,switch_var,var_opt,'transf=stud','prt=initial;final')


I have

  !--error 276 
Falta operador, coma o punto y coma. (English: missing operator, comma or
dot and comma)

Thank you!

Best regards 
Eric




--
View this message in context: 
http://mailinglists.scilab.org/Grocer-Markov-Switching-Model-tp4025635p4025659.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at 
Nabble.com.
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Grocer / Markov Switching Model

2013-01-11 Thread ericdoblas
Dear Éric,

I can solve all

Thank you so much for your help, and thank you for Grocer!!! It´s a
fantastic toolbox!!

Best regards from Argentina

Eric Doblas



--
View this message in context: 
http://mailinglists.scilab.org/Grocer-Markov-Switching-Model-tp4025635p4025666.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at 
Nabble.com.
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Grocer / Markov Switching Model

2013-01-11 Thread ericdoblas
Thank you very much Éric!!

Best regards 
Eric



--
View this message in context: 
http://mailinglists.scilab.org/Grocer-Markov-Switching-Model-tp4025635p4025675.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at 
Nabble.com.
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] Grocer / Markov Switching Model

2013-01-10 Thread ericdoblas
Hello all,

I am using Markov Switching Model (MSM) to detect turning points. I can´t
use Bry Boschan or Harding Pagan. I must use MSM. I don´t understand the
manual´s instructions for Grocer. Specifically, I don´t understand all steps
of the routine on grocer. So, I need a routine for MSM on Grocer.

Thank you very much who can help me
Eric Doblas
Argentina


This is the data:

DateGDP LGDP
I 93216370,1113 12,2847457
II 93   241871,8584 12,39616335
III 93  242645,5224 12,3993569
IV 93   245132,4288 12,40955387
I 94232945,3257 12,35855905
II 94   257476,8946 12,45868527
III 94  253467,7781 12,44299199
IV 94   257341,5437 12,45815945
I 95237968,1031 12,37989192
II 95   248093,6393 12,42156153
III 95  242214,6991 12,3975798
IV 95   244467,9646 12,40683956
I 96236566,0366 12,37398267
II 96   260751,9252 12,47132476
III 96  262166,9638 12,47673685
IV 96   267020,0467 12,49507902
I 97256387,8567 12,45444664
II 97   281769,8008 12,54884571
III 97  284092,2675 12,55705435
IV 97   287515,3456 12,56903151
I 98271702,3677 12,51246251
II 98   301207,5978 12,61
III 98  293315,4036 12,58900377
IV 98   286267,8493 12,56468319
I 99265024,6359 12,48757807
II 99   286412,3269 12,56518775
III 99  278472,6935 12,53707528
IV 99   283566,3992 12,55520159
I 00264555,9181 12,48580792
II 00   285275,1759 12,56120952
III 00  276767,971  12,53093478
IV 00   278091,6764 12,53570611
I 01259199,8739 12,46535476
II 01   284795,7629 12,55952758
III 01  263126,5054 12,4803902
IV 01   248864,5552 12,42466407
I 02216849,495  12,28695882
II 02   246314,6332 12,41436499
III 02  237416,8668 12,37757281
IV 02   240361,3921 12,38989887
I 03228595,8824 12,33971102
II 03   265402,4777 12,48900274
III 03  261534,5226 12,47432157
IV 03   268560,9668 12,50083323
I 04254330,4234 12,44638958
II 04   284375,6106 12,55805122
III 04  284392,0599 12,55810906
IV 04   293467,0606 12,58952068
I 05274594,5026 12,52305075
II 05   313927,2903 12,65691668
III 05  310593,0805 12,64623891
IV 05   319939,2408 12,67588638
I 06298695,5617 12,60718015
II 06   338243,7275 12,731522
III 06  337741,8852 12,73003723
IV 06   347578,7074 12,75874641
I 07322448,8712 12,68369986
II 07   367492,3517 12,81445779
III 07  367538,7276 12,81458397
IV 07   379199,6613 12,84581816
I 08349945,3229 12,7655322
II 08   396227,2401 12,88974316
III 08  393039,23   12,88166471
IV 08   394564,9401 12,88553902
I 09357096,4155 12,7857611
II 09   393181,2789 12,88202605
III 09  391678,8883 12,87819762
IV 09   404860,9562 12,91129897
I 10381221,6341 12,8511362
II 10   439766,5937 12,9939994
III 10  425323,1724 12,96060456
IV 10   442208,8085 12,99953747
I 11419023,1666 12,94568149
II 11   479963,6782 13,08146571
III 11  464882,753  13,04954051
IV 11   474414,821  13,06983737
I 12440884,2806 12,99653772



--
View this message in context: 
http://mailinglists.scilab.org/Grocer-Markov-Switching-Model-tp4025635.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at 
Nabble.com.
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Grocer / Markov Switching Model

2013-01-10 Thread ericdoblas
Dear Éric,

Thank you for your answer. Specifically, I need estimate a MSM as in
Hamilton (1989), as follows:

  (page 7).

Thank you very much!

Greetings from Argentina!

Eric Doblas http://www.hnb.hr/publikac/istrazivanja/w-029.pdf  



--
View this message in context: 
http://mailinglists.scilab.org/Grocer-Markov-Switching-Model-tp4025635p4025642.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at 
Nabble.com.
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Grocer / Markov Switching Model

2013-01-10 Thread Eric Dubois
Sorry, but maybe you could be a little bit more explicit: I have not the
paper immediately available and Hamilton (1989) page 7 does not as such
speak very much...

Éric.

2013/1/10 ericdoblas ericdoblasargent...@yahoo.com.ar

 Dear Éric,

 Thank you for your answer. Specifically, I need estimate a MSM as in
 Hamilton (1989), as follows:

   (page 7).

 Thank you very much!

 Greetings from Argentina!

 Eric Doblas http://www.hnb.hr/publikac/istrazivanja/w-029.pdf 



 --
 View this message in context:
 http://mailinglists.scilab.org/Grocer-Markov-Switching-Model-tp4025635p4025642.html
 Sent from the Scilab users - Mailing Lists Archives mailing list archive
 at Nabble.com.
 ___
 users mailing list
 users@lists.scilab.org
 http://lists.scilab.org/mailman/listinfo/users

___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Grocer / Markov Switching Model

2013-01-10 Thread Eric Dubois
Dear Eric.

I have done my best to make Grocer ms programs use easy (help files, manual
and demos: did you have a look at the ms_reg_d.sci, ms_var_d.sci demos?).

So tell me what you do not understand?

Éric.

2013/1/10 ericdoblas ericdoblasargent...@yahoo.com.ar

 That´s ok Éric. Thank you!

 I will try to be more specific. In the chapter 23 (Grocer´s Manual) you
 wrote about MSM. I need estimate the most general model (ms_reg) and the
 two
 particulars cases: ms_mean and ms_var, for data sent in the first mail...

 Excuse me if the consultation is very elemental, but recently I am starting
 with Grocer MSM. I think that is a excellent tool for Scilab. Rigth now, I
 am investing time to learn .

 Thank you very much!

 Eric Doblas
 CONICET - Argentina



 --
 View this message in context:
 http://mailinglists.scilab.org/Grocer-Markov-Switching-Model-tp4025635p4025645.html
 Sent from the Scilab users - Mailing Lists Archives mailing list archive
 at Nabble.com.
 ___
 users mailing list
 users@lists.scilab.org
 http://lists.scilab.org/mailman/listinfo/users

___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Grocer / Markov Switching Model

2013-01-10 Thread ericdoblas
Dear Éric,

Thank you so much!

Any doubts, I will write again.

Best regards

Eric Doblas 



--
View this message in context: 
http://mailinglists.scilab.org/Grocer-Markov-Switching-Model-tp4025635p4025647.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at 
Nabble.com.
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Grocer / Markov Switching Model

2013-01-10 Thread ericdoblas
function r=ms_reg_d()
 
global GROCERDIR;
 
// demo of ms_reg

I sorry Éric, this is the routine.

How I can conditioning the var-cov matrix??

Thank you!!
Eric 


load(GROCERDIR+'\data\us_revu.dat')
 
bounds('1967m4','2004m2')
 
nb_states=2
switch_var=2 // variances are switching
var_opt=3 // unrestricted var-cov matrix
 
r=ms_reg('100*(log(us_revu)-lagts(2,log(us_revu)))',['100*(lagts(1,log(us_revu))-lagts(3,log(us_revu)))';...
'100*(lagts(2,log(us_revu))-lagts(4,log(us_revu)))';'100*(lagts(3,log(us_revu))-lagts(5,log(us_revu)))'],'cte',nb_states,switch_var,var_opt,'transf=stud',...
'prt=initial;final')
endfunction




--
View this message in context: 
http://mailinglists.scilab.org/Grocer-Markov-Switching-Model-tp4025635p4025650.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at 
Nabble.com.
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users