daily_sim {dsa}R Documentation

Create a simple, exemplary, seasonal, daily time series

Description

Create a seasonal daily time series and its seasonal and non-seasonal components

Usage

daily_sim(
  n = 8,
  week_effect = 1,
  month_effect = 1,
  year_effect = 1,
  model = c(3, 1, 1),
  ar = c(-0.2, 0.5, 0.1),
  ma = -0.4,
  moving = T,
  week_cycles = 2,
  month_cycles = 3,
  year_cycles = 8
)

Arguments

n

length of time series in years

week_effect

increase size of seasonal factor for day-of-the-week

month_effect

increase size of seasonal factor for day-of-the-month

year_effect

increase size of seasonal factor for day-of-the-year

model

ARIMA model for trend and irregular component of series

ar

coefficients for AR terms

ma

coefficients for MA terms

moving

should seasonal factors be moving (=T) or constant (=F)

week_cycles

number of cycles per week

month_cycles

number of cycles per month

year_cycles

number of cycles per year

Details

The output is an xts time series containing the time series, the true seasonally adjusted series,

the day-of-the-week seasonal component, the day-of-the-month seasonal component and the

day-of-the-year seasonal component.

Author(s)

Daniel Ollech

Examples

time_series <- daily_sim(n=4, year_effect=3)
xtsplot(time_series[,1]) # Plot of the time series
xtsplot(time_series[,3:5]) # Plot of the seasonal factors

[Package dsa version 1.0.12 Index]