tsEvaTransformSeriesToStationaryMMXTrend {RtsEva}R Documentation

tsEvaTransformSeriesToStationaryMMXTrend

Description

tsEvaTransformSeriesToStationaryMMXTrend transforms a time series to a stationary one by focusing on the monthly maximum values. The trend and slowly varying amplitude are computed on the monthly maximum values.

Usage

tsEvaTransformSeriesToStationaryMMXTrend(timeStamps, series, timeWindow)

Arguments

timeStamps

A vector of time stamps corresponding to the observations in the series.

series

A vector of the time series data.

timeWindow

The size of the time window used for detrending.

Value

A list containing the following components:

runningStatsMulteplicity

The multiplicity of running statistics.

stationarySeries

The stationary series after removing the trend.

trendSeries

The trend component of the series.

trendSeriesNonSeasonal

NULL (not used).

trendError

The error on the trend component.

stdDevSeries

The standard deviation series.

stdDevSeriesNonSeasonal

NULL (not used).

stdDevError

The error on the standard deviation series.

timeStamps

The time stamps.

nonStatSeries

The original non-stationary series.

statSer3Mom

The running mean of the third moment of the stationary series.

statSer4Mom

The running mean of the fourth moment of the stationary series.

See Also

tsEvaDetrendTimeSeries(), tsEvaNanRunningVariance(), tsEvaNanRunningMean(), tsEvaNanRunningStatistics()

Examples

timeAndSeries <- ArdecheStMartin
timeStamps <- ArdecheStMartin[,1]
series <- ArdecheStMartin[,2]
# 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 <- tsEvaTransformSeriesToStationaryMMXTrend(timeStamps, series, timeWindow)
plot(result$trendSeries)


[Package RtsEva version 1.1.0 Index]