<< ms_estimate Markov-switching models ms_mean >>

Grocer >> Markov-switching models > ms_forecast

ms_forecast

forecast from a Markvov Switching regression model

CALLING SEQUENCE

res=ms_forecast(rms,hprev,exo_com,exo_idio)

PARAMETERS

Input

* rms = a tlist result from a ms switching estimation

* hprev = the prevision period which can be either:

  -  a [n1 n2] constant vector where n1 and n2 are the lead over the last period of the estimation (n1<=0 means that the forecast begins within the estimation period)

  -  a n constant which is equivalent to [1 n] (forecast begins just after the estimation period)

  -  a [n1 n2] string vector where n1 and n2 are the time periods for forecasting (a posibility open only if the MS regression has been performed with ts)

  -  a n string which is equivalent to [1 n] (forecast begins just after the estimation period)

* exo_com = the data on the forecast horizon for the non switching exogenous variables that can be:

  -  a (H x n_x) matrix with H the number of forecasts and n_x the number of non switching exogenous variables

  -  a list of ts available over the forecasting horizon

  -  a list of (H x 1) vectors and ts available over the forecasting horizon

  -  a (H x n_x) string matrix of names (note: when the ms tlist results comes from a ms-mean or a var estimation, the variables are useless and can  therefore be omitted)

* exo_idio = the data on the forecast horizon for the switching exogenous variables that can be:

  -  a (H x n_z) matrix with H the number of forecasts and n_z the number of switching exogenous variables

  -  a list of ts available over the forecasting horizon

  -  a list of (H x 1) vectors and ts available over the forecasting horizon

  -  a (H x n_x) string matrix of names (note: when the ms tlist results comes from a ms-mean or a var estimation, the variables are useless and can  therefore be omitted)

 

Output

* res = a results tlist with:

  - res('meth') = 'msf'

  - res('r_ms') = the tlist results from the MS estimation

  - res('pstates') = the (H x nb_states) matrix of the probabilities of the respective states over the forecasting horizon

  - res('prev_states') = the matrix of forecast of the endogenous variables accross the states

  - res('prev') = the matrix of forecast of the endogenous variables

  - res('hprev') = the forecast period

DESCRIPTION

Forecast with a MS regression model. Note that this only when the model has been estimated as a MS-VAR model that the dynamic of the model is taken into account.

EXAMPLE

bounds('1984m2','2003m1');
r=ms_mean(['delts(log(construc))';'delts(log(ipi))';'delts(log(helpwanted))';'delts(log(revu))'],3,1,1,'transf=stud','datation=datation_bb')
rf=ms_forecast(r,10)
f=ms_forecast(r,'2003m11')
rf=ms_forecast(r,['2003m2' ; '2003m11'])
// All these examples provide a forecast from 2003m2 to 2003m11 of the ms-mean example
//  provided in function ms_mean (second example is also in function ms_mean_d).

AUTHOR

Eric Dubois 2006

Report an issue
<< ms_estimate Markov-switching models ms_mean >>