Simulate a seasonal factor
sim_sfac(
n,
freq = 12,
sd = 1,
change_sd = sd/10,
moving = TRUE,
beta_1 = 0.6,
beta_tau = 0.4,
start = c(2020, 1),
multiplicative = TRUE,
ar = NULL,
ma = NULL,
model = c(1, 1, 1),
sc_model = list(order = c(1, 1, 1), ar = 0.65, ma = 0.25),
smooth = TRUE,
burnin = 7,
extra_smooth = FALSE
)
The function returns a time series of class ts
containing a seasonal or periodic effect.
Number of observations
Frequency of the time series
Standard deviation of the seasonal factor
Standard deviation of shock to seasonal factor
Is the seasonal pattern allowed to change over time
Persistence wrt to previous period of the seasonal change
Persistence wrt to one year/cycle of the seasonal change
Start date of output time series
Boolean. Should multiplicative seasonal factors be simulated
AR parameter
MA parameter
Model for initial seasonal factor
Model for the seasonal change
Boolean. Should initial seasonal factor be smoothed
(burnin*n-n) is the burn-in period
Boolean. Should the seasonal factor be smoothed on a period-by-period basis
Daniel Ollech
Standard deviation of the seasonal factor is in percent if a multiplicative time series model is assumed. Otherwise it is in unitless. Using a non-seasonal ARIMA model does not impact the seasonality of the time series. It can just make it easier for human eyes to grasp the seasonal nature of the series. The definition of the ar and ma parameter needs to be in line with the chosen model.
Ollech, D. (2021). Seasonal adjustment of daily time series. Journal of Time Series Econometrics. tools:::Rd_expr_doi("10.1515/jtse-2020-0028")