tsEvaTransformSeriesToStationaryTrendOnly {RtsEva}R Documentation

tsEvaTransformSeriesToStationaryTrendOnly

Description

tsEvaTransformSeriesToStationaryTrendOnly is the original detrending function implemented in Mentaschi et al.(2016). It takes a time series and transforms it into a stationary one. It computes the trend as a running average of the time series, the slowly varying amplitude as its standard deviation, and other statistical measures.

Usage

tsEvaTransformSeriesToStationaryTrendOnly(timeStamps, series, timeWindow)

Arguments

timeStamps

A vector of time stamps for the time series.

series

The original time series.

timeWindow

The size of the time window used for detrending.

Value

A list containing the following elements:

runningStatsMulteplicity

The running statistics multiplicity.

stationarySeries

The transformed stationary series.

trendSeries

The trend series.

trendSeriesNonSeasonal

The non-seasonal trend series.

trendError

The error on the trend.

stdDevSeries

The slowly varying standard deviation series.

stdDevSeriesNonSeasonal

The non-seasonal slowly varying standard deviation series.

stdDevError

The error on the standard deviation.

timeStamps

The time stamps.

nonStatSeries

The original non-stationary series.

statSer3Mom

The third moment of the transformed stationary series.

statSer4Mom

The fourth moment of the transformed stationary series.

Examples

timeAndSeries <- ArdecheStMartin
timeStamps <- ArdecheStMartin[,1]
series <- ArdecheStMartin[,2]
timeWindow <- 30*365 # 30 years
#select only the 5 latest years
yrs <- as.integer(format(timeStamps, "%Y"))
tokeep <- which(yrs>=2015)
timeStamps <- timeStamps[tokeep]
series <- series[tokeep]
timeWindow <- 365 # 1 year
result <- tsEvaTransformSeriesToStationaryTrendOnly(timeStamps, series, timeWindow)
plot(result$trendSeries)

[Package RtsEva version 1.0.0 Index]