zyp.trend.vector {zyp}R Documentation

zyp.trend.vector

Description

Computes a prewhitened linear trend on a vector of data. The zyp package allows you to use either Zhang's method, or the Yue Pilon method of computing nonlinear prewhitened trends.

Usage

zyp.trend.vector(data, method=c("yuepilon", "zhang"), conf.intervals=TRUE)
zyp.zhang(data, conf.intervals=TRUE)
zyp.yuepilon(data, conf.intervals=TRUE)

Arguments

data the input vector.
method the prewhitened trend method to use.
conf.intervals whether to compute confidence intervals.

Details

This routine computes a prewhitened nonlinear trend on a vector of data, using either Zhang's (described in Wang and Swail, 2001) or Yue Pilon's (describe in Yue Pilon, 2002) method of prewhitening and Sen's slope, and use a Kendall test for significance.

Value

A vector containing the trend and associated data.

lbound the lower bound of the trend's confidence interval.
trend the Sen's slope (trend) per unit time.
trendp the Sen's slope (trend) over the time period.
ubound the upper bound of the trend's confidence interval.
tau Kendall's tau statistic computed on the final detrended timeseries.
sig Kendall's P-value computed for the final detrended timeseries.
nruns the number of runs required to converge upon a trend.
autocor the autocorrelation of the final detrended timeseries.
valid_frac the fraction of the data which is valid (not NA) once autocorrelation is removed.
linear the least squares fit trend on the same dat.
intercept the intercept of the Sen's slope (trend).

See Also

zyp.trend.csv, zyp-package, confint.zyp, zyp.sen.

Examples

# Without confidence intervals, using the wrapper routine
d <- zyp.trend.vector(c(0, 1, 3, 4, 2, 5), "yuepilon", FALSE)

# With confidence intervals, using the wrapper routine
d <- zyp.trend.vector(c(0, 1, 3, 4, 2, 5), "yuepilon")

# With confidence intervals, not using the wrapper routine
d.zhang <- zyp.zhang(c(0, 1, 3, 4, 2, 5))
d.yuepilon <- zyp.yuepilon(c(0, 1, 3, 4, 2, 5))

[Package zyp version 0.9-1 Index]