theil_sen: Theil Sen Slope Estimator

View source: R/stats.R

theil_senR Documentation

Theil Sen Slope Estimator

Description

Theil Sen Slope Estimator

Usage

theil_sen(x, y, ...)

## S3 method for class 'theil_sen'
slope(x, ...)

## S3 method for class 'theil_sen'
intercept(x, ...)

Arguments

x

time vector (numeric, or Date).

y

numeric value.

...

further arguments passed to or from other methods.

Value

object of class Theil_Sen.

Methods (by generic)

  • slope(theil_sen): Extract slope.

  • intercept(theil_sen): Extract intercept.

References

https://en.wikipedia.org/wiki/Theil-Sen_estimator

Examples


# create theil_sen object
ts <- theil_sen(1:5, c(1, 2, 3, 5, 9))

# get slope
slope(ts)

# get intercept
intercept(ts)

litteR documentation built on Aug. 27, 2022, 1:05 a.m.