Description Usage Arguments Details Value Author(s) References Examples
Simulate a time series containing specified calendar effects
1 2 3 4 5 6 7 8 9 10 11 12 |
n |
Time series length |
which |
Holidays to be used, functions from timeDate package used |
from |
days before the Holiday to include |
to |
days after the Holiday to include |
freq |
Frequency of the time series |
effect_size |
Mean size of calendar effect |
start |
Start Date of output time series |
multiplicative |
Boolean. Is multiplicative time series model assumed? |
time_dynamic |
Should the calendar effect change over time |
center |
Should calendar variable be center, i.e. mean=0 |
If multiplicative is true, the effect size is measured in percentage. If is not true, the effect size is unit less and thus adopts the unit of the time series the calendars are added to. The time_dynamic parameter controls the change of the calendar effect. The effect of the previous year is multiplied by the time_dynamic factor.
The function returns a time series of class xts
Daniel Ollech
Ollech, D. (2021). Seasonal adjustment of daily time series. Journal of Time Series Econometrics. doi: 10.1515/jtse-2020-0028
1 | plot(sim_calendar(60, from=0, to=4, freq=12))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.