sens_slope: Pre-withened nonlinear Sen´s slope.

Description Usage Arguments Value Examples

View source: R/method_analys.R

Description

Calculation of nonlinear pre-whitened Theil-Sen´s slope using zyp.trend.vector. To remove lag-1 autocorrelation, the input series is pre-withened using the Zhang approach. Trend magnitude only is calculated when percentage of NAs in input vector does not exceed a pre-defined threshold.

Usage

1
sens_slope(data_in, cover_thresh = 0.9)

Arguments

data_in

vector of input data

cover_thresh

Trend only calculated when percentage of NAs in input vector does not exceed cover_thresh (0-1)

Value

Nonlinear pre-withened Theil-Sen´s slope.

Examples

1
2
3
data_slope <- c(2, 3, 5, 6 ,8, 5, 8, 12, NA, NA)
sens_slope(data_in, cover_thresh = 0.5)
sens_slope(data_in, cover_thresh = 0.9)

ERottler/alptempr documentation built on May 7, 2021, 1:12 a.m.