horizonForecasts            package:dse2            R Documentation

_C_a_l_c_u_l_a_t_e _f_o_r_e_c_a_s_t_s _a_t _s_p_e_c_i_f_i_e_d _h_o_r_i_z_o_n_s

_D_e_s_c_r_i_p_t_i_o_n:

     Calculate forecasts at specified horizons.

_U_s_a_g_e:

         is.horizonForecasts(obj)
         horizonForecasts(obj, ...)
         ## S3 method for class 'TSmodel':
         horizonForecasts(obj, data, horizons=1:4,
              discard.before=minimumStartupLag(obj), compiled=.DSECOMPILED, ...)
         ## S3 method for class 'TSestModel':
         horizonForecasts(obj, data=NULL, ...)
         ## S3 method for class 'TSdata':
         horizonForecasts(obj, model, ...)
         ## S3 method for class 'forecastCov':
         horizonForecasts(obj,horizons=NULL, 
              discard.before=NULL, ...)

_A_r_g_u_m_e_n_t_s:

     obj: an object of class TSmodel, TSdata, or TSestModel.

   model: an object of class TSmodel.

    data: an object of class TSdata

horizons: a vector of integers indicating the horizon at which
          forecasts should be  produced.

discard.before: period before which forecasts are not calculated.

compiled: if TRUE compiled code is called.

     ...: arguments passed to other methods.

_D_e_t_a_i_l_s:

     Calculate multiple 'horizon'-step ahead forecasts  ie. calculate
     forecasts but return only those indicated by horizons. Thus, for
     example, the result of horizonForecasts(model, data
     horizons=c(1,5))     would be the one-step ahead and five step
     ahead forecasts.

_V_a_l_u_e:

     The result is a list of class horizonForecasts with elements model
     (a  TSmodel), data, horizons, discard.before, and
     horizonForecasts. horizonForecasts is an array with three
     dimension:  'c(length(horizons), dim(model$data))'. Projections
     are not calculated before discard.before or after the end of
     outputData(data). Each horizon is aligned so that
     horizonForecasts[h,t,] contains the forecast for the data point
     outputData(data)[t,] (from horizon[h] periods prior).

_S_e_e _A_l_s_o:

     'featherForecasts'

_E_x_a_m_p_l_e_s:

     if(is.R()) data("eg1.DSE.data.diff", package="dse1")
     model <- estVARXls(eg1.DSE.data.diff)
     z <-  horizonForecasts(model, eg1.DSE.data.diff)

