forecastCovWRTtrue           package:dse2           R Documentation

_C_o_m_p_a_r_e _F_o_r_e_c_a_s_t_s _t_o _T_r_u_e _M_o_d_e_l _O_u_t_p_u_t

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

     Generate forecasts and compare them against the output of a true
     model.

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

         forecastCovWRTtrue(models, true.model, 
             pred.replications=1, simulation.args=NULL, quiet=FALSE, rng=NULL, 
             compiled=.DSECOMPILED,
             horizons=1:12, discard.before=10, trend=NULL, zero=NULL, 
             Spawn=if (exists(".SPAWN")) .SPAWN else FALSE)
         is.forecastCovWRTdata(obj)

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

  models: A list of objects of class TSmodel.

true.model: An object of class TSmodel or TSestModel.

discard.before: An integer indicating the number of points in the
          beginning of forecasts to discard for calculating
          covariances.

    zero: If TRUE then forecastCov is also calculated for a forecast of
          zero.

   trend: If TRUE then forecastCov is also calculated for a forecast of
          a linear trend.

pred.replications: integer indicating the number of times simulated
          data is generated.

simulation.args: A list of any arguments which should be passed to
          simulate in order to simulate the true model.

horizons: Horizons for which forecast covariance should be calculated.

     rng: If specified then it is used to set RNG.

   Spawn: If TRUE then Splus For loops are used.

   quiet: If TRUE then some messages are not printed.

compiled: a logical indicating if compiled code should be used.
          (Usually true except for debugging.)

     obj: an object.

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

     The true model is used to generate data and for each generated
     data set the forecasts of the  models are evaluated against the
     simulated data. If trend is not null it is treated as a model
     output (forecast) and should be the same dimension as a simulation
     of the models with  simulation.args. If zero is not null a zero
     forecast is also evaluated. If  simulating the true model requires
     input data then a convenient way to do this is for true.model to
     be a TSestModel. Otherwise, input data should be passed in
     simulation.args

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

     A list with the forecast covariance for supplied models on samples
     generated by the given true model. This is in the element
     'forecastCov' of the result. Other elements contain information in
     the arguments.

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

     'forecastCovEstimatorsWRTdata' 'simulate' 'EstEval' 'distribution'
     'MonteCarloSimulations'

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

     if(is.R()) data("eg1.DSE.data.diff", package="dse1")
     true.model <- estVARXls(eg1.DSE.data.diff) # A starting model TSestModel
     data <- simulate(true.model)
     models <- list(TSmodel(estVARXar(data)),TSmodel(estVARXls(data)))
     z <-  forecastCovWRTtrue( models, true.model)

