Generate synthetic time series via model-based residual bootstrap

generate_synthetic_ts(
  y,
  model_type = "auto",
  model_func = NULL,
  formula = NULL,
  order = NULL,
  seasonal = list(order = c(0, 0, 0), period = NA),
  length_out = NULL,
  n_sim = 1000,
  seed = NULL,
  ...
)

Arguments

y

Time series data (ts or mts object)

model_type

One of "auto", "auto.arima", "tslm", "ets", "arima", "custom"

model_func

Custom model function (required if model_type = "custom")

formula

Formula for tslm (default: trend + season)

order

ARIMA order (p,d,q) for model_type = "arima"

seasonal

List with order and period for seasonal ARIMA

length_out

Length of synthetic series to generate (default = length of y)

n_sim

Number of synthetic series to generate

seed

Random seed for reproducibility (optional)

...

Extra arguments passed to the modelling function

Value

A list with synthetic series and model information