Learn R Programming

tidychangepoint (version 1.0.0)

exceedances: Compute exceedances of a threshold for a time series

Description

Compute exceedances of a threshold for a time series

Usage

exceedances(x, ...)

# S3 method for default exceedances(x, ...)

# S3 method for nhpp exceedances(x, ...)

# S3 method for ts exceedances(x, ...)

# S3 method for double exceedances(x, threshold = mean(x, na.rm = TRUE), ...)

Value

An ordered integer vector giving the indices of the values of x

that exceed the threshold.

Arguments

x

a numeric vector coercible into a stats::ts object

...

arguments passed to methods

threshold

A value above which to exceed. Default is the mean()

Examples

Run this code
# Retrieve exceedances of the series mean
fit_nhpp(DataCPSim, tau = 826) |> 
  exceedances()

# Retrieve exceedances of a supplied threshold
fit_nhpp(DataCPSim, tau = 826, threshold = 200) |> 
  exceedances()

Run the code above in your browser using DataLab