Skip to contents

Computes out of sample forecasts of a given state space model. Unlike ssm_lm it can manage dummies.

Usage

ssm_lm_oos(
  x,
  trend = FALSE,
  var_intercept = 0,
  var_slope = 0,
  var_variables = 0,
  fixed_var_intercept = TRUE,
  fixed_var_trend = TRUE,
  fixed_var_variables = TRUE,
  date = 28,
  ...
)

Arguments

x

a lm or dynlm model

trend

boolean indicating if the model should have a trend.

var_intercept, var_slope

variance of the intercept (used if ìntercept = TRUE) and the slope (used if trend = TRUE).

var_variables

variance of the other variables: can be either a single value (same variance for all the variables) or a vector specifying each variance.

fixed_var_intercept, fixed_var_trend, fixed_var_variables

logical indicating if the variance are fixed or estimated.

date

choose when we want to start the revision process after the start date. By default set to 28 periods.

...

other arguments used in rjd3sts::estimate().

Value

Returns all coefficients of all variables and the residual