TrendUncertainty {greenbrown}R Documentation

Compute uncertainties in trend statistics according to different start and end dates

Description

The function computes trend statistics (linear trend slope and intercept, Mann-Kendall tau and p-value) with associated uncertainties (standard deviation) by sampling the time series according to different start and end dates using the function TrendSample

Usage

TrendUncertainty(Yt, seg = NULL, bp = NoBP(), sample.method = c("sample", 
    "all", "none"), sample.min.length = 0.75, sample.size = 30, 
    fun.unc = NULL, trend = TrendAAT)

Arguments

Yt

univariate time series of class ts

seg

a vector indicating segments of a time series. If NULL, provide bp

bp

detected breakpoints in the time series as returned by breakpoints

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.

fun.unc

function to summarize the uncertainty of the trend (default: quantile 0.025 and 0.975). Can be also 'sd' or other functions.

trend

method that should be used to compute the trend

Value

The function returns a data.frame with the estimated Mann-Kendall tau, p-value and slope and intercept of a linear trend with uncertainties defined as the standard deviation of these estimates dependent on different start and end dates.

Author(s)

Matthias Forkel <matthias.forkel@geo.tuwien.ac.at> [aut, cre]

See Also

Trend

Examples

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

# aggregate time series to annual time steps
ndvi <- aggregate(ndvi, FUN=mean, na.rm=TRUE)
plot(ndvi)

# compute trend statistics dependent on start and end of the time series
trd.ens <- TrendSample(ndvi)
plot(trd.ens)

# compute statistics for trend
TrendUncertainty(ndvi)

# compute trend statistics with uncertainties by considering breakpoints
bp <- breakpoints(ndvi ~ time(ndvi))
trd.unc <- TrendUncertainty(ndvi, bp=bp)
trd.unc
trd.unc[[1]]$slope_unc



[Package greenbrown version 2.4.3 Index]