add.season: Add seasonality

Description Usage Arguments Value Examples

Description

Add seasonality to the series regarding the parameters

Usage

1
add.season(tser, s.mean=1, s.sd=0.1, add=FALSE)

Arguments

tser

time series which seasonality will be added

s.mean

mean of the seasonality. If it's not additive, i.e., it's multiplicative, it's recommended to be 1.

s.sd

standard deviation of seasonality.

add

TRUE or FALSE depending on whether the seasonality is additive or not. If it's not additive, it will be multiplicative.

Value

returns the time series with seasonality

Examples

1
2
3
4
5
6
set.seed(123)
kp <- c(100,110,140,120,90)
bs <- basic.series(kp, start=c(2008,1))
add.season(bs)
add.season(bs, s.sd=0.3)
add.season(bs, s.mean=0,s.sd=10,add=TRUE)

jdanielnd/tsgen documentation built on May 18, 2019, 10:26 p.m.