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.
whether to compute a 95 percent confidence
interval based on all possible slopes.
preserve.range.for.sig.test
whether to re-inflate values by
dividing by (1 - ac) following removal of autocorrelation prior to
computation of significance.
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), method="yuepilon", conf.intervals=FALSE)
# With confidence intervals, using the wrapper routine
d <- zyp.trend.vector(c(0, 1, 3, 4, 2, 5), method="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))
# With confidence intervals, with time data.
t.dat <- c(0, 0.3, 1, 3, 3.4, 6)
d <- zyp.trend.vector(c(0, 1, 3, 4, 2, 5), t.dat, method="yuepilon")
d.zhang <- zyp.zhang(c(0, 1, 3, 4, 2, 5), t.dat)
d.yuepilon <- zyp.yuepilon(c(0, 1, 3, 4, 2, 5), t.dat)