TrendSample: Compute trend statistics by sampling a time series according...

Description Usage Arguments Value Author(s) See Also Examples

Description

The function computes an ensemble of trend statistics (linear trend slope, Mann-Kendall tau and p-value) on a time series by sampling different start and end dates of the time series. This ensemble can be used to compute uncertainties in trend statistics. Results can be plotted using the function plot.TrendSample.

Usage

1
2
3
4
5
TrendSample(Yt, sample.method = c("all", 
    "sample", "none"), 
    sample.min.length = 0.7, 
    sample.size = 30, 
    trend = TrendAAT)

Arguments

Yt

univariate time series of class ts

sample.method

Sampling method for combinations of start and end dates to compute uncertainties in trends. If "sample" (default), trend statistics are computed for a sample of combinations of start and end dates according to sample.size. If "all", trend statistics are computed for all combinations of start and end dates longer than sample.min.length. If "none", trend statistics will be only computed for the entire time series (i.e. no sampling of different start and end dates).

sample.min.length

Minimum length of the time series (as a fraction of total length) that should be used to compute trend statistics. Time windows between start and end that are shorter than min.length will be not used for trend computation.

sample.size

sample size (number of combinations of start and end dates) to be used if method is sample.

trend

method that should be used to compute the trend

Value

The function returns a data.frame with the start date, end date and length of the sample from the time series and the correspondig Mann-Kendall tau, p-value, slope, intercept, and percentage slope of a linear trend.

Author(s)

Matthias Forkel <matthias.forkel@tu-dresden.de> [aut, cre]

See Also

Trend, plot.TrendSample

Examples

1
2
3
4
5
6
7
# calculate uncertainty of trend dependent on start and end dates
trd.ens <- TrendSample(ndvi, trend=TrendAAT)
plot(trd.ens)
plot(trd.ens, "tau")

trd.ens <- TrendSample(ndvi, trend=TrendRQ)
plot(trd.ens)

greenbrown documentation built on Dec. 18, 2020, 3:02 p.m.