Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

scrollbar

...

Contents of check for Mann-Kendall Check

Overwrites the flag of the timeseries with unreliable or doubtful when there are at least ten observations and the Mann-Kendall detects a trend but the value does not follow the trend for the specified confidence balance. This check uses tiedValues and sameYearValues for the calculation.

The purpose of this check is to test for trends in each of the input time series. Once a trend is detected the check will alter the flags of the timeseries concerned to the specified output flag and the specified log message will be generated. One of the strengths of the Mann-Kendall check is that it can also be used when there are lots of missing values. If there are less than 10 non-missing values, the test will be skipped. During the check, the threshold criteria for the check are first sorted so that the most severe log message is processed first. When the log message is generated the less serious log message will not be generated. The trend analysis is done using the formula below. Every value is compared with all the other values in the series and the signs of the differences are counted as 1 or -1.

General information on Mann-Kendall trend test

The MannKendall algorithm first calculates several statistics on the timeseries. Missing values are ignored.

Mann-Kendall statistic S

...

Image Added

 

Variance S

Wiki Markup
{latex}
\(VAR(S)=\frac{1}{18}(n(n-1)(2n+5)-\sum\limits_{p=1}^{g}t_p(t_p-1)(2t_p+5)-\sum\limits_{q=1}^{h}u_q(u_q-1)(2u_q+5)+
\frac{\sum\limits_{p=1}^{g}t_p(t_p-1)(2t_p-2)-\sum\limits_{q=1}^{h}u_q(u_q-1)(2u_q-2)}{9n(n-1)(n-2)}+\frac{\sum\limits_{p=1}^{g}t_p(t_p-1)\sum\limits_{q=1}^{h}u_q(u_q-1)}{2n(n-1)})\)
{latex}

Image Added

 

where

  • g

 where
Wiki Markup{latex}g{latex}

is the number of groups of tied data
unmigrated-inline-wiki-markup{latex}

  • tp

 \_p{latex}

the number of tied data in the p-th group

  • h

  Wiki Markup{latex}h{latex}

the number of sampling times that contain multiple data Wiki Markup{latex}

  • up

 \_p{latex}

the number of multiple data in the qth time period

Z statistic
Z=

Wiki Markup{latex} \( \frac{S-1}{\sqrt{VAR(S)}}\) {latex}Image Added

, if S > 0, Wiki Markup{latex}

  • Z = 0

...

, if S = 0

Image Added

Wiki Markup
{latex}
Z=\( \frac{S+1}{\sqrt{VAR(S)}}\)
{latex}
, if S < 0,

Slope

In classical MannKendall tests Slope is the median of the slopes which is a very reliable estimator of the slope even when there are lots of missing values. The calculation of this value is expensive in terms of memory and requires N * (N-1) / 2 memory where N is the number of non-missing input values. In order to prevent memory problems, it is recommended that a limited amount of input values is used. If the option logSensSlope is set to false, the average slope is used to estimate the slope which is less accurate than the median but requires N memory.

...

where delta is defined as

  • Wiki Markup{latex}
    delta = inverseCDF(1 - confidenceCoefficient) if two-tailed
    {latex}
  • Wiki Markup{latex}
    delta = inverseCDF(1 - confidenceCoefficient / 2) if upward or downward
    {latex}

Configuration

  • id: identifier of the check.
  • checkRelativePeriod: The period to run the trend test for.
  • variableDefinition: Definition of time series. Each time series is processed independently.
  • inputVariable:Identifier of a variable of which timeseries the flags will be used as input (neighbouring locations). Refers to a time series set defined in the variableDefinitions.
  • outputVariable: Identifier of a variable for which timeseries the outputFlag has to be updated in case the thresholds are exceeded (observed values). Refers to a time series set defined in the variableDefinitions.
  • logSensSlope: Includes Sen's slope in the logging (default true). For large number of steps the algorithm for determining Sen's slope requires lots of memory. To resolve out of memory problems, set this option to false. The difference is that no longer the median of the slopes is used to estimate the slope (classical mann kendall), but instead the average of the slopes is used as slope estimator.
  • onErrorResumeNext When true, makes the secondary validation continue when an error logging is applied.

For each threshold,

  • testTrend: either two-tailed, upward or downward (two-tailed is default)
  • logLevel: Log level for the log message that is logged if a trend is detected. Can be DEBUG, INFO, WARN, ERROR or FATAL. If level is error or fatal, then the module will stop running after logging the first log message. Fatal should never be used actually.
  • outputFlag Either unreliable or doubtful.
  • outputMode By default the flags that need updating are updated and log events are generated for the updated flags. When this option is set to 'logs_only', the log events are generated but the flags will not be updated.
  • logEventCode: Event code for the log message that is logged if a trend is detected. This event code has to contain a dot, e.g. "TimeSeries.Check", because the log message is only visible to the master controller if the event code contains a dot.
  • logMessage: Log message that is logged if a trend is detected.

...