TrendSample {greenbrown} R Documentation

## Compute trend statistics by sampling a time series according to different start and end dates

### 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

```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@geo.tuwien.ac.at> [aut, cre]

`Trend`, `plot.TrendSample`

### Examples

```# load a time series of NDVI (normalized difference vegetation index)
data(ndvi)

# 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)

# plot relations between start, end dates, length and trend statistics

```

[Package greenbrown version 2.4.3 Index]