tsEvaDetrendTimeSeries {RtsEva} | R Documentation |
Detrend a Time Series
Description
This function detrends a time series by subtracting the trend component from the original series.
Usage
tsEvaDetrendTimeSeries(
timeStamps,
series,
timeWindow,
percent = NA,
fast = TRUE
)
Arguments
timeStamps |
A vector of time stamps for the time series. |
series |
The original time series. |
timeWindow |
The size of the moving window used to calculate the trend. |
percent |
The percentile value used to calculate the trend for extreme values. Default is NA. |
fast |
A logical value indicating whether to print additional information. Default is FALSE. |
Value
An object of class "tsTrend" with the following components:
originSeries
The original time series
detrendSeries
The detrended time series
trendSeries
The trend component of the time series
nRunMn
The number of data points in the moving window used to calculate the trend
Examples
timeAndSeries <- ArdecheStMartin
timeStamps <- ArdecheStMartin[,1]
series <- ArdecheStMartin[,2]
timeWindow <- 365*30
detrended <- tsEvaDetrendTimeSeries(timeStamps, series, timeWindow)
[Package RtsEva version 1.0.0 Index]