Skip to contents

Draw i.i.d. innovations from a Normal distribution with non-zero mean

Usage

draw_normal_with_drift(n, errors, ...)

Arguments

n

The number of innovations to draw

errors

The residual errors that are used to define the distribution from which the innovations are drawn

...

Additional arguments passed from predict.threedx(), ignored

Value

A vector of same type as errors and of length n

Examples

model <- learn_weights(
  y = 1:50,
  period_length = 12L,
  alphas_grid = list_sampled_alphas(n_target = 25),
  loss_function = loss_mae
)

forecast <- predict(
  object = model,
  horizon = 12L,
  n_samples = 1000L,
  observation_driven = FALSE,
  innovation_function = draw_normal_with_drift,
)