Escolar Documentos
Profissional Documentos
Cultura Documentos
www.toolkit.net.au/trend
USER GUIDE
Document History
Date Author Revision Description of Change
February 2004 Francis Chiew 0.1 Basic User Guide for Modelling School
June 2004 Robert Argent 1.0 Creation of User Guide from Notes
First version of User Guide. This applies to
July 2004 Francis Chiew 1.0.2b
version 1.02b (beta) of the Trend software
February 2005 Francis Chiew 1.0.2 Final release
Copyright notice
© CRC for Catchment Hydrology, Australia 2005
Legal Information
To the extent permitted by law, the CRC for Catchment Hydrology (including its employees and consultants)
accepts no responsibility and excludes all liability whatsoever in respect of any person's use or reliance on
this publication or any part of it.
Acknowledgements
TREND is a product from the CRC for Catchment Hydrology’s (CRCCH) Climate Variability Program. The
scientific development and testing were carried out by Francis Chiew1 and Lionel Siriwardena1 and the
software was developed by Sylvain Arene2 and Joel Rahman3.
1
University of Melbourne
2
University of Melbourne and Griffith University
3
CSIRO Land and Water
TREND – User Guide
CONTENTS
1 Introduction...........................................................1
1.1 The user guide.............................................................................................. 1
1.2 TREND......................................................................................................... 1
1.2.1 Overview .................................................................................... 1
1.2.2 Features ..................................................................................... 2
1.2.3 Audience .................................................................................... 2
1.2.4 Limitations and cautionary notes.................................................... 2
1.3 Related documents ........................................................................................ 2
1.4 Data requirements......................................................................................... 3
1.4.1 Input data................................................................................... 3
1.4.2 Calculated results ........................................................................ 3
1.5 References and training.................................................................................. 3
2 Installation ............................................................4
2.1 Technical specifications.................................................................................. 4
2.2 Licence agreement ........................................................................................ 4
2.3 Folders ........................................................................................................ 5
2.4 Installation ................................................................................................... 5
2.4.1 Framework installation ................................................................. 5
2.4.2 Stand-alone PC ........................................................................... 5
2.5 Uninstalling TREND ....................................................................................... 6
3 Using TREND.........................................................7
3.1 Getting started.............................................................................................. 7
3.2 Data Input screen.......................................................................................... 7
3.3 Options screen ............................................................................................. 9
3.3.1 Test selection panel...................................................................... 9
3.3.2 Resampling panel ........................................................................ 9
3.3.3 Period panel ............................................................................... 9
3.3.4 Display panel ............................................................................ 10
3.3.5 Running the tests........................................................................ 10
3.4 Results screen ............................................................................................. 10
3.4.1 Test display panel ...................................................................... 10
i
3.4.2 Summary statistics panel..............................................................10
3.4.3 Test result panel .........................................................................10
3.5 Saving test results.........................................................................................12
5 References...........................................................23
ii
Introduction
1 Introduction
TREND is designed to facilitate statistical testing for trend, change and randomness in
hydrological and other time series data. TREND has 12 statistical tests, based on the
WMO/UNESCO Expert Workshop on Trend/Change Detection and on the CRC for
Catchment Hydrology publication Hydrological Recipes.
1.2 TREND
1.2.1 Overview
TREND has 12 statistical tests that can be used to test for trend, change and randomness in
hydrological and other time series data:
• Mann-Kendall (non-parametric test for trend)
• Spearman’s Rho (non-parametric test for trend)
• Linear Regression (parametric test for trend)
• Distribution-Free CUSUM (non-parametric test for step jump in mean)
• Cumulative Deviation (parametric test for step jump in mean)
• Worsley Likelihood Ratio (parametric test for step jump in mean)
• Rank-Sum (non-parametric test for difference in median from two data periods)
• Student’s t (parametric test for difference in mean from two data periods)
• Median Crossing (non-parametric test for randomness)
• Turning Points (non-parametric test for randomness)
• Rank Difference (non-parametric test for randomness)
• Autocorrelation (parametric test for randomness).
1
Trend User Guide
1.2.2 Features
• TREND allows easy statistical testing using different tests
• TREND supports various time series data input formats
• TREND provides simple statement of test result
• TREND displays test statistic and critical values for various statistical significance levels
• TREND performs resampling analysis to determine critical test statistic values
• TREND allows easy retrieval of test results.
1.2.3 Audience
TREND is designed for hydrologists, environmental scientists, consultants and researchers to
facilitate statistical testing for trend, change and randomness in time series data.
TrendTests.xls
The statistical tests in TREND are relatively easy to understand and the user can gain a good
appreciation of the tests by following the descriptions in Chapter 4 and the examples in the
Excel spreadsheet TrendTests.xls. TrendTests.xls can be downloaded from Documentation in
the TREND homepage (www.toolkit.net.au/trend).
TrendWorkshop.ppt
TrendWorkshop.ppt is a powerpoint presentation used for the CRC for Catchment Hydrology
Modelling School. It presents an overview of the need for analysing data for trend/change,
exploratory data analysis, basic concepts in statistical testing and types of statistical tests.
2
Introduction
3
Trend User Guide
2 Installation
2.1 Technical specifications
Type of Machine Intel based PC with CD-ROM drive
Processor Minimum: 133 MHz Pentium class processor
Recommended: 400 MHz or faster (particularly when
resampling analysis is used)
Memory Minimum: 128 MB of RAM
Recommended: 512 MB
Disk Space Little (< 100 MB)
Operating System Windows 2000
Windows XP Professional
Windows NT®4.0 + Service Pack 6a
Windows® Server 2003
Other Supporting Software To run TREND, you will also need (see Section 2.4.1 on how
you can install these):
- .NET Framework 1.1 Redistributable or later; and
- Visual J#.NET Redistributable Package 1.1
The person installing the software must have local administrator access on the computer.
Ideally, you should also have the relevant permissions to install and uninstall software.
Note If you are using a networked computer, then inform your system
administrator before applying any service packs or updates, as there
may be other applications on your computer that could be affected by
these updates.
4
Installation
2.3 Folders
TREND can be downloaded from the toolkit website www.toolkit.net.au/trend.
The installation of TREND (see Section 2.4.2) will create a directory that contains:
• The TREND software (default path c:\Program Files\Toolkit\TREND)
• Sample data file (default path c: \Program Files\Toolkit\TREND\Data)
2.4 Installation
.NET Framework
The .NET Framework is a component of the Microsoft Windows® operating system used to
build and run Windows-based applications. TREND is built using the .NET Framework and
consequently requires that the .NET Framework Redistributable framework be installed prior
to running. The .NET Framework Redistributable will install the .NET Framework onto your
machine and is downloadable from
www.msdn.microsoft.com/netframework/downloads/redist.aspx.
You can check to see if you already have the .NET Framework installed by clicking Start on
your Windows desktop, selecting Settings > Control Panel, and then double clicking the
Add/Remove Programs icon. When that window appears, scroll through the list of
applications. If you see Microsoft .NET Framework 1.1 listed, the latest version is already
installed and you do not need to install it again.
Visual J#.NET
Visual J#.NET is an extension to .NET to allow the execution of components written in the J#
programming language. The Visual J#.NET Redistributable Package 1.1 must be installed
after the installation of the .NET Framework. It is available from
www.msdn.microsoft.com/vjsharp/downloads/howtoget/default.aspx.
You can check to see if you already have the Visual J#.NET Framework installed by clicking
Start on your Windows desktop, selecting Settings > Control Panel, and then double clicking
the Add/Remove Programs icon. When that window appears, scroll through the list of
applications. If you see Microsoft Visual J# .NET Redistributable Package 1.1 listed, the
latest version is already installed and you do not need to install it again.
2.4.2 Stand-alone PC
Unzipping the file downloaded from the Toolkit website (TREND_1.0.2.zip) would produce
three files. To install TREND, double-click Setup.Exe, which will initiate an install wizard,
which leads you through the install procedure. The TREND software and sample data file will
be installed to a default directory (c:\Program Files\Toolkit\TREND) or to a directory that you
specify.
When TREND is successfully installed, a TREND short-cut icon will appear on the Desktop.
You can run the TREND software by double clicking this icon.
5
Trend User Guide
6
Using TREND
3 Using TREND
3.1 Getting started
To run TREND, double click the TREND icon on the desktop.
The TREND introduction splash screen will appear for approximately 5 seconds.
The Data Input screen will then appear (see Figure 3.1).
7
Trend User Guide
Note TREND performs the statistical tests only on the annual time series data.
TREND will convert daily and monthly time series data files into an
annual time series before carrying out the statistical testing on the
annual time series. Input data files must be continuous and complete
(daily and monthly data files must have complete years of records).
8
Using TREND
9
Trend User Guide
10
Using TREND
TREND displays the value of the test statistic (e.g., z-statistic in the Mann-Kendall Test in
Figure 3.5), the critical values of the test statistic at significance levels of α = 0.01, α = 0.05
and α = 0.1, and a statement of the test result.
If the user has requested for resampling analysis, TREND also displays the critical values of
the test statistic obtained from the resampling analysis (see Figure 3.6), and compares the
test statistic against these critical values to determine the test result.
TREND also displays other relevant statistics (where appropriate).
For some tests, graphs of the time series data or time series of the test statistic can be viewed
by clicking the More button.
Note TREND gives results for a two-sided tail test. That is, TREND compares
the test statistic value against critical test statistic values for a two-sided
tail. TREND therefore tests for trend/change in any direction, rather
than for trend/change in a pre-specified direction (e.g., increasing
trend).
11
Trend User Guide
12
Using TREND
13
Trend User Guide
4 Description of
statistical tests
4.1 Statistical testing
This section provides a succinct description of the basic concepts in statistical testing that are
relevant to TREND. The reader can to refer to Kundzewicz and Robson (2000) for a more
detailed description of statistical testing for trend/change, and to standard text books on
statistics for more detailed information.
Hypothesis
The starting point of a statistical test is to define a null hypothesis (H0) and an alternative
hypothesis (H1). For example, to test for trend in a time series, H0 would be that there is no
trend in the data, and H1 would be that there is an increasing or decreasing trend.
Test statistic
The test statistic is a means of comparing H0 and H1. It is a numerical value calculated from
the data series that is being tested.
Significance level
The significance level is a means of measuring whether the test statistic is very different from
the (critical) values that would typically occur under H0.
14
Description of statistical tests
15
Trend User Guide
the assumption of normally distributed data is violated, resampling analysis can be used to
estimate the significance level or critical test statistic values for various significance levels.
Non-parametric tests are generally distribution-free. They detect trend/change, but do not
quantify the size of the trend/change. They are very useful because most hydrologic time
series data are not normally distributed.
Note The statistical tests in TREND are relatively easy to understand and the
user can gain a good appreciation of the tests by following the
descriptions below and the examples in the Excel spreadsheet
TrendTests.xls. TrendTests.xls can be downloaded from Documentation
in the TREND homepage (www.toolkit.net.au/trend).
16
Description of statistical tests
n −1 n
S = ∑ ∑
i =1
[
j=i +1
sgn (Rj – Ri) ]
n
Sy = ∑i =1
(yi – y )2
n
Sxy = ∑
i =1
(xi – x ) (yi – y )
and xi (time), yi (variable of interest), x and y refer to the ranks ( x , y , Sx and Sy have the
same value in a trend analysis).
For large samples, the quantity ρs n −1 is approximately normally distributed with mean
of 0 and variance of 1 (critical test statistic values for various significance levels can be
obtained from normal probability tables).
17
Trend User Guide
∑ (x
i =1
i − x )( y i − y)
b = n
∑ (x
i =1
i − x) 2
a = y - b x
The test statistic S is:
S = b/σ
n
12∑ ( y i − a − bx i )
i =1
where σ =
n (n − 2)(n 2 − 1)
The test statistic S follows a Student-t distribution with n-2 degrees of freedom under the null
hypothesis (critical test statistic values for various significance levels can be obtained from
Student’s t statistic tables).
The linear regression test assumes that the data are normally distributed and that the errors
(deviations from the trend) are independent and follows the same normal distribution with
zero mean.
18
Description of statistical tests
E(xi) = µ i = 1,2,3,…..,m
E(xi) = µ + ∆ i = m+1, m+2, ….., n
where µ is the mean prior to the change and ∆ is the change in the mean.
The cumulative deviations from the means are calculated as:
k
So* = 0 Sk* = ∑ (x
i =1
i − x) k = 1,2,3,…..,n
and the rescaled adjusted partial sums are obtained by dividing the Sk* values by the standard
deviation:
Sk** = Sk* / Dx
n
(x i − x) 2
D x
2
= ∑
i =1 n
The test statistic Q is:
Q = max | Sk**|
and is calculated for each year, with the highest value indicating the change point.
Critical values of Q/√n are given in the table below. A negative value of Sk* indicates that the
latter part of the record has a higher mean than the earlier part and vice versa.
(n − 2) 0.5 V
W=
(1 − V 2 ) 0.5
where V = max | Zk**|
19
Trend User Guide
Critical values of W are given in the table below. A negative value of W indicates that the
latter part of the record has a higher mean than the earlier part and vice versa.
N W at significance level
α = 0.10 α = 0.05 α = 0.01
10 3.14 3.66 4.93
15 2.97 3.36 4.32
20 2.90 3.28 4.13
25 2.89 3.23 3.94
30 2.86 3.19 3.86
35 2.88 3.21 3.87
40 2.88 3.17 3.77
45 2.86 3.18 3.79
50 2.87 3.16 3.79
20
Description of statistical tests
( x − y)
t=
1 1
S +
n m
where x and y are the means of the first and second periods respectively, and m and n are
the number of observations in the first and second periods respectively, and S is the sample
standard deviation (of the entire m and n observations).
21
Trend User Guide
⎡ n −1 ⎤
⎢∑ ( x i − x )( x i +1 − x )⎥
r1 =
⎣ i =1 ⎦
⎡ n
2⎤
⎢∑ ( x i − x ) ⎥
⎣ i =1 ⎦
If the time series data come from a random process, then the expected value and variance of
r1 are:
E(r1) = - 1 / n
Var (r1) = (n3 – 3n2 + 4) / [n2 (n2 – 1) ]
The z-statistic is therefore (critical test statistic values for various significance levels can be
obtained from normal probability tables):
z = | r1 – E(r1) | / Var(r1)0.5
22
References
5 References
Kundzewicz, Z.W. and Robson, A. (Editors) (2000) Detecting Trend and Other Changes in
Hydrological Data. World Climate Program – Water, WMO/UNESCO, WCDMP-
45, WMO/TD 1013, Geneva, 157 pp.
Grayson, R.B., Argent, R.M., Nathan, R.J., McMahon, T.A. and Mein, R. (1996)
Hydrological Recipes: Estimation Techniques in Australian Hydrology. Cooperative
Research Centre for Catchment Hydrology, Australia, 125 pp.
23