| tsEvaSampleData {RtsEva} | R Documentation |
tsEvaSampleData Function
Description
tsEvaSampleData is a function that calculates various statistics
and data for time series evaluation.
Usage
tsEvaSampleData(
ms,
meanEventsPerYear,
minEventsPerYear,
minPeakDistanceInDays,
tail = NA
)
Arguments
ms |
A matrix containing the time series data. |
meanEventsPerYear |
The mean number of events per year. |
minEventsPerYear |
The minimum number of events per year. |
minPeakDistanceInDays |
The minimum peak distance in days. |
tail |
The tail to be studied for POT selection, either 'high' or 'low'. |
Value
A list containing the following elements:
completeSeriesThe complete time series data.
POTThe data for Peaks Over Threshold (POT) analysis.
yearsThe years in the time series data.
PercentilesThe desired percentiles and their corresponding values.
annualMaxThe annual maximum values.
annualMaxDateThe dates corresponding to the annual maximum values.
annualMaxIndxThe indices of the annual maximum values.
monthlyMaxThe monthly maximum values.
monthlyMaxDateThe dates corresponding to the monthly maximum values.
monthlyMaxIndxThe indices of the monthly maximum values.
See Also
Examples
# Generate sample data
data <- ArdecheStMartin
colnames(data) <- c("Date", "Value")
#select only the 5 latest years
yrs <- as.integer(format(data$Date, "%Y"))
tokeep <- which(yrs>=2015)
data <- data[tokeep,]
timeWindow <- 365 # 1 year
# Calculate statistics and data
result <- tsEvaSampleData(data, meanEventsPerYear=3, minEventsPerYear=0,
minPeakDistanceInDays=7, "high")
# View the result
print(result)