tsEvaTransformSeriesToStationaryTrendOnly_ciPercentile {RtsEva} | R Documentation |
tsEvaTransformSeriesToStationaryTrendOnly_ciPercentile
Description
tsEvaTransformSeriesToStationaryTrendOnly_ciPercentile
transforms a
time series to a stationary ones using a moving average as the trend and
a running percentiles to represent the slowly varying amplitude of the distribution
Usage
tsEvaTransformSeriesToStationaryTrendOnly_ciPercentile(
timeStamps,
series,
timeWindow,
percentile
)
Arguments
timeStamps |
A vector of time stamps for the time series. |
series |
The original time series. |
timeWindow |
The size of the moving window used for detrending. |
percentile |
The percentile value used to compute the extreme trend of the stationary series. |
Value
A list containing the following elements:
runningStatsMulteplicity
The running statistics multiplicity
stationarySeries
The transformed stationary trend only series
trendSeries
The trend series
trendSeriesNonSeasonal
The non-seasonal trend series
trendError
The error on the trend
stdDevSeries
The standard deviation series
stdDevSeriesNonSeasonal
The non-seasonal standard deviation series
stdDevError
The error on the standard deviation
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
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
percentile <- 90
result <- tsEvaTransformSeriesToStationaryTrendOnly_ciPercentile(timeStamps,
series, timeWindow, percentile)
plot(result$trendSeries)