Skip to content

RtsEva

1.2.0Package record

Performs the Transformed-Stationary Extreme Values Analysis

0packages depend
4.7Kdownloads / year
47.1%test coverage
11/13flavors OK

Overview

About

Adaptation of the 'Matlab' 'tsEVA' toolbox developed by Lorenzo Mentaschi available here: https://github.com/menta78/tsEva. It contains an implementation of the Transformed-Stationary (TS) methodology for non-stationary extreme value Analysis (EVA) as described in Mentaschi et al. (2016) doi:10.5194/hess-20-3527-2016. In synthesis this approach consists in: (i) transforming a non-stationary time series into a stationary one to which the stationary extreme value theory can be applied; and (ii) reverse-transforming the result into a non-stationary extreme value distribution. 'RtsEva' offers several options for trend estimation (mean, extremes, seasonal) and contains multiple plotting functions displaying different aspects of the non-stationarity of extremes.

Changes in 1.2.0

Changed

  • 'tsGetPOT' now selects the optimal POT threshold using a continuous

penalty on the deviance (based on the deficit from 'minEventsPerYear') together

with a shape-parameter boundary/normalized-distance fallback score, replacing

the previous AIC + skip/penalty scheme. It now fits the GPD with 'L-BFGS-B'

constrained by 'shape_bnd' (std.err.type = "observed") and returns the full fit

object in 'pars'.

  • 'tsGetPOT' uses a finer grid of candidate percentiles above the 95th

percentile and cleans NA/Inf values before peak detection.

  • 'shape_bnd' is now a user-facing argument of 'tsGetPOT', 'tsEvaSampleData'

and 'TsEvaNs'. In 'TsEvaNs' it defaults automatically to c(-0.5, 1) for the

high tail and c(-1, 0) for the low tail when left as NA.

Show all changes in 1.2.0Hide the rest of the changes in 1.2.0
  • 'tsEVstatistics' now reuses the GPD fit computed during POT threshold

selection (stored in 'pointData$POT$pars') instead of re-fitting the GPD.

  • 'TsEvaNs' gained additional robustness in the 'trendPeaks' case when the

automatic trend threshold cannot be estimated, and guards the low-flow

transformation against a NULL 'trans'.

  • 'tsEvaFindTrendThreshold' keeps the stability, negative-flow and percentile

vectors aligned and guards the breaking-point detection against short series.

  • 'tsEvaNanRunningMean' was reimplemented with cumulative sums for a large

speed-up on long time series; results are unchanged. Package byte-compilation

was enabled ('ByteCompile: true').

Fixed

  • 'tsEvaNanRunningVariance' returned a slightly incorrect running variance: in

the previous incremental implementation the count of valid points could drift

out of sync with the summed squared values (the removal used index

'minindx - 1' while the addition used 'maxindx + 1'). It has been reimplemented

with cumulative sums to compute the correct centered-window mean of squares.

The correction to the variance is small: on the bundled ArdecheStMartin series,

the relative change is of the order of 1-2% (median ~1.7% at a one-year window),

so fitted GEV/GPD standard-deviation-dependent parameters shift only slightly.

  • 'tsEvaNanRunningStatistics' contained more serious errors: the same

valid-point count desynchronisation and, in addition, each incoming value was

centered by the running mean at an incorrect index. This produced third and

fourth running moments that were substantially wrong (median relative errors of

several hundred percent on the bundled ArdecheStMartin series). It has been

reimplemented with cumulative sums to compute the correct centered-window

moments (validated to machine precision against a direct definition). Diagnostic

quantities derived from these moments therefore change from previously incorrect

values to correct ones.

  • As a consequence of the running-variance fix,

'tsEvaTransformSeriesToStatSeasonal_ciPercentile' no longer returns an all-NA

'trendSeries' on short series. Previously the incorrect running variance could

yield negative values whose square root produced NaNs that propagated through

the seasonal standard-deviation estimation; this is now resolved.

From NEWS.md in the release

Install

Health

CRAN checks
2ERROR11OK
Check messages
ERRORexamplesr-oldrel-macos-arm64, r-release-macos-arm64
Running examples in ‘RtsEva-Ex.R’ failed
The error most likely occurred in:

> ### Name: tsEvaTransformSeriesToStatSeasonal_ciPercentile
> ### Title: tsEvaTransformSeriesToStatSeasonal_ciPercentile
> ### Aliases: tsEvaTransformSeriesToStatSeasonal_ciPercentile
> 
> ### ** 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 <- tsEvaTransformSeriesToStatSeasonal_ciPercentile(timeStamps,
+ series, timeWindow, percentile)
computing trend...
trend on the 90 percentile
computing trend seasonality...
Warning in pracma::interp1(avgTmStamp, monthAvgVec, timeStampsN, method = "spline") :
  Points in argument in 'x' unsorted; will be sorted.
Warning in pracma::interp1(avgTmStamp, monthAvgVex, timeStampsN, method = "spline") :
  Points in argument in 'x' unsorted; will be sorted.
computing the slowly varying 90th percentile...
computing standard deviation seasonality...
Warning in pracma::interp1(avgTmStamp, monthAvgVec, timeStampsN, method = "spline") :
  Points in argument in 'x' unsorted; will be sorted.
Warning in pracma::interp1(avgTmStamp, monthAvgVex, timeStampsN, method = "spline") :
  Points in argument in 'x' unsorted; will be sorted.
> plot(result$trendSeries)
Warning in min(x) : no non-missing arguments to min; returning Inf
Warning in max(x) : no non-missing arguments to max; returning -Inf
Error in plot.window(...) : need finite 'ylim' values
Calls: plot -> plot.default -> localWindow -> plot.window
Execution halted

CRAN check page ↗

Slowest check: 6.2 min · r-oldrel-windows-x86_64
Status changes
  • ERROR11 OK, 2 ERRORNow
  • ERROR11 OK, 3 ERROR2026-03-10
Advisories

none known

Documentation

In release 1.2.0
READMEYes · 260 wordsVignettesYes · 1 · dynamicNEWSYes · 100% structured · mentions 1.2.0Citation fileNo
Help pages
59
Examples that run
98%50 run in a plain check · 1 only when donttest examples are enabled (R CMD check --as-cran)
Exported functions with examples
98%
Documented parameters
100%
Return-value docs
100%
Help pages citing references
5%
Vignettes (1)

Downloads

4.7K
CRAN downloads in the past year
Rank #7,136 · ~13/day · ~395/mo
Daily download trend is not available in this view yet.
61830 days
1.2K90 days
4.7K1 year
Compare downloads with other packages →
Also on84 r2u3 autocran

Repository

5Stars
0Forks
2Open issues
0Open PRs
3Releases
70Commits
1Commit identities
extreme-value-statisticsnon-stationary-environment
License file reads as GPL-3.0 · 70 commits · Last activity 2026-09-25 · 0% stars, 30d
Responsiveness
How these are sampled
PRs merged (all time)
not measured
Median days to close, 50 most recently updated closed issues
6
Median days to close, 50 most recently updated closed PRs
not measured

Stars over time

2025-10-15 · 42026-07-07 · 5
PracticesBeta

9 development-tooling and community-health practices detected across 5 families in the upstream repository

Checks run against github.com/alowis/rtseva on 2026-10-18.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Docs source (2)
README.Rmd

GitHub Pages site

Coverage (1)
Coverage reporting
CRAN release process (2)
cran-comments.mdCRAN-SUBMISSION
Show all practicesHide 1 practice
Lint, format, editor (2)
VS CodeRStudio project
How this is detected·Detection ruleset v3 (2026-09-26)

Dependencies

Declared dependencies
19 external dependencies (excludes base and recommended)

Installing RtsEva adds 40 packages (23 with compiled code, 39 MB of source tarballs). Heaviest: BH 14 MB, ggplot2 6.0 MB, Rcpp 1.8 MB.

Depends (1)
R >= 2.10
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

Datasets

People & History

People (1)
Author, Maintainer since 1.0.0 (2024)
Releases (3)

Pick two releases to compare their code metrics.

  • 1.2.0Latest
    record
    2026-09-25 · current release · diff ↗
  • R
    R 4.6.0 released · 2026-04-24
  • 1.1.0
    record
    2025-06-10 · diff ↗ ·
    added 1 export
    tsEvaTransformSeriesToStationaryMMXTrend
  • R
    R 4.5.0 released · 2025-04-11
  • 1.0.0
    record
    2024-06-24
  • R
    R 4.4.0 released · 2024-04-24

Package metadata

First published
2024-06-24
Total releases
3 / 2 yrs
License
GPL (>= 3) OSI
Minimum R
≥ 2.10
Bundled data
2.8 MB / 4 files
Download size
3.1 MB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("RtsEva")
Tilloy, A. (2026). RtsEva: Performs the Transformed-Stationary Extreme Values Analysis (Version 1.2.0) [Computer software]. https://doi.org/10.32614/CRAN.package.RtsEva

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for RtsEva version 1.2.0 [Data set]. HJJB, LLC. Data release v2026-10-22. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-22, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy