You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 29 Next »

Contents of check for Mann-Kendall Check

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. The most severe log message is processed first and when the log message is generated the less serious log message will not be generated.

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

Unknown macro: {latex}

(S=\sum\limits_

Unknown macro: {k=1}

^

Unknown macro: {N-1}

\sum\limits_

Unknown macro: {l=k+1}

^

Unknown macro: {N}

sign(x_l-x_k))

Variance S

Unknown macro: {latex}

(VAR(S)=\frac

Unknown macro: {1}
Unknown macro: {18}

(n(n-1)(2n+5)-\sum\limits_

Unknown macro: {p=1}

^

Unknown macro: {g}

t_p(t_p-1)(2t_p+5)-\sum\limits_

Unknown macro: {q=1}

^

Unknown macro: {h}

u_q(u_q-1)(2u_q+5)+
\frac{\sum\limits_

^

Unknown macro: {g}

t_p(t_p-1)(2t_p-2)-\sum\limits_

Unknown macro: {q=1}

^

Unknown macro: {h}

u_q(u_q-1)(2u_q-2)}

Unknown macro: {9n(n-1)(n-2)}

+\frac{\sum\limits_

Unknown macro: {p=1}

^

t_p(t_p-1)\sum\limits_

Unknown macro: {q=1}

^

Unknown macro: {h}

u_q(u_q-1)}

Unknown macro: {2n(n-1)}

))

where

Unknown macro: {latex}

g

is the number of groups of tied data

Unknown macro: {latex}

t_p

the number of tied data in the p-th group

Unknown macro: {latex}

h

the number of sampling times that contain multiple data

Unknown macro: {latex}

u_p

the number of multiple data in the qth time period

Z statistic
Z=

Unknown macro: {latex}

( \frac

Unknown macro: {S-1}

{\sqrt{VAR(S)}})

, if S > 0,

Unknown macro: {latex}

Z=0

, if S = 0

Unknown macro: {latex}

Z=( \frac

Unknown macro: {S+1}

{\sqrt{VAR(S)}})

, if S < 0,

Conditions for rejecting H0 (that there is no trend)

After the statistics have been calculated and it has been established that there are at least 10 nonmissing values, the following conditions are used to trigger logmessages for the configured trend tests

  • there is a two-tailed trend if zStatistic <= -delta or zStatistic >= delta
  • there is a downward trend if zStatistic <= -delta
  • there is an upward trend if zStatistic >= delta

where delta is defined as

  • Unknown macro: {latex}

    delta = inverseCDF(1 - confidenceCoefficient) if two-tailed

  • Unknown macro: {latex}

    delta = inverseCDF(1 - confidenceCoefficient / 2) if upward or downward

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.

For each threshold,

  • testTrend: either two-tailed, upward or downward (two-tailed is default)
  • confidenceCoefficient: the confidence coefficient, also known as alpha, which is typically between 0 and 0.5, i.e. 0.05 (one-tailed) and 0.025 (two-tailed) correspond to a confidence level of 95%.
  • 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.
  • 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.

Tag

Replacement

%CHECK_ID%

The id of the check that caused the flags to be altered.

%LOCATION_NAME%

The name of the locations where the alterations took place.

%PARAMETER_NAME%

The name of the parameter where the alterations took place.

Configuration examples for MannKendallCheck

A configuration example for the MannKendallCheck is given below:

<secondaryValidation xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.wldelft.nl/fews http://fews.wldelft.nl/schemas/version1.0/secondaryValidation.xsd">
	<mannKendallCheck id="MannKendallCheck1">
		<variable>
			<timeSeriesSet>
				<moduleInstanceId>MannKendallCheckTest</moduleInstanceId>
				<valueType>scalar</valueType>
				<parameterId>H.meting</parameterId>
				<locationId>Nue_0015_01_01</locationId>
				<timeSeriesType>simulated forecasting</timeSeriesType>
				<timeStep unit="hour" multiplier="1"/>
				<readWriteMode>read only</readWriteMode>
			</timeSeriesSet>
		</variable>
		<checkRelativePeriod unit="day" start="100" end="0"/>
		<threshold>
			<testTrend>two-tailed</testTrend>
			<confidenceCoefficient>0.01</confidenceCoefficient>
			<logLevel>WARN</logLevel>
			<logEventCode>SecondaryValidation.MannKendallCheck</logEventCode>
			<logMessage>trend detected in %HEADER% by %CHECK_ID%.</logMessage>
		</threshold>
	</mannKendallCheck>
</secondaryValidation>

Further reading

The algorithms frim the Mann-Kendall test can be read in [205.pdf:Statistical Methods for Environmental Pollution Monitoring by Richard O. Gilbert].

  • No labels