Computes prewhitened nonlinear trends on CSV files or data frames with 0 to n columns of
metadata, with 1 row per location and each column containing data for
a particular time (day, month, year). 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.
csv.header
whether the input CSV file has a header.
Details
These routines compute prewhitened nonlinear trends on either CSV
files with or without a header or data frames with 0 to n columns of
metadata (which is preserved in the output). Each row is expected to
contain metadata followed by a timeseries, and all rows are expected
to have the same length of timeseries. NA values are handled
correctly, so if you have several timeseries of unequal length you can
pad them with NA values to provide valid input.
The prewhitened trend computation methods used are either Zhang's
method (described in Wang and Swail, 2001) or Yue and Pilon's method
(described in Yue and Pilon, 2002).
Value
A data frame containing the trends, in the case of
zyp.trend.dataframe. Columns of the output are as follows.
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.