AmpPred: Seasonal amplitude and predictability within time-series...

Description Usage Arguments Details Value Author(s) Examples

View source: R/FourSeasons.R

Description

Function that helps to define the seasonality (periodicity) of the time-series.

Usage

1
2
AmpPred(data, info.periods = 4, forecast.periods = 1, cuttoff = 70,
  amp.probs = c(0.975, 0.025), plot = TRUE)

Arguments

data

data.frame as produced by defineSeasons

info.periods

the number of periods used as prior inforamtion to generate predictions

forecast.period

the number of periods to be forecasted within each step

cuttoff

exlude incomplete periods (in the beginning and the end); the cuttoff defines a percetnage of the complete periods.

amp.probs

the qunatiles used to define the seasonal amplitude.

plot

logical, of TRUE a plot will be drawn.

Details

Based on time-series analysis, this function first decomposes the data into the following components; seasonal, trend and remainder. Next, the periodicity of the time-series will be defined by using a cosine function fitted to the seasonal component (using least-square). The minima of the cosine curve can then be used to separate the periods (nessesary in other functions of the DOSeasons package).

Value

A list with 2 data frames:

summary

data frame with amplitude and predictability for each seasonal period

output

data frame with all output variables

Author(s)

Simeon Lisovski

Examples

1
2
3
data(tempYNP)
sTab <- defineSeasons(tempYNP$Date, tempYNP$Tmin, frequency = "daily")
seas <- AmpPred(sTab)

slisovski/FourSeasons documentation built on July 30, 2019, 11:08 p.m.