MULTITREND - user`s manual

advertisement
MULTITREND – user’s manual
2009-02-11
MULTITEST – user’s manual
An Excel-based programme for univariate and
multivariate Mann-Kendall tests for monotone trends
Mann-Kendall tests are widely used to detect monotone (increasing or decreasing) trends
in time series of data. MULTITEST facilitates the testing for trends in multiple time
series.
MULTITEST performs trend tests on individual time series as well as tests for overall
trends in user-defined groups of data series. If, for example, data have been collected
over several seasons and sites, tests will be performed for overall trends by season and by
site. In addition, trend slopes will be computed.
MULTITEST also offers the following:




Colour-coded tables of test results
Correction for serial correlation up to a user-defined time span
Automatic handling of censored observations (less-than values)
Partial Mann-Kendall tests enabling adjustment for trends in a covariate
Theoretical basis
Consider all pairs (Yi, Yj) of observations in a time series (Y1, Y2, …, Yn) of data. Compute
the number of concordant pairs (Yi < Yj when i < j) and discordant pairs (Yi > Yj when i <
j). The difference T between the number of concordant and discordant pairs can then be
taken as an indicator of an upward or downward trend in the data. Under the null
hypothesis of no trend (all permutations of the observed data are equally likely) the test
statistic T has mean zero and a variance that depends only on the number of observations.
Furthermore, p-values of the test can be computed by using the fact that T is
approximately normal if n  10.
The presence of an overall upward or downward trend in m time series of data can be
examined by forming the test statistic
T  T1  T2  ...  Tm
where T1, …, Tm denote the test statistics for trends in the individual data series. Under
the null hypothesis of no overall trend (all permutations of the rows in the data table are
equally likely) the test statistic T has mean zero. Furthermore, the variance of T can be
estimated using a procedure pialroposed by Hirsch & Slack (1984), and this enables
calculation of p-values. The cited authors considered the case when each series
represented a season or month. However, the same test statistic can be used also for
multiple time series representing different regions or any user-defined grouping of the
collected data.
1
MULTITREND – user’s manual
2009-02-11
If the time series (Y1, Y2, …, Yn) is related to another time series (X1, X2, …, Xn) it might
be of interest to test for trends in (Y1, Y2, …, Yn) that can not be attributed to trends in (X1,
X2, …, Xn). Such partial or conditional tests are described by Libiseller & Grimvall
(2002).
As already emphasized, the calculation of p-values is based on the assumption that all
permutations of the data rows are equally likely. Normally, the data tables are organized
so that the time step between rows is one year. It is thus, in standard Mann-Kendall tests
,implicitly assumed that there is no serial correlation in the collected data that spans over
more than one year. MULTITEST offers a correction for serial correlation up to a userdefined time span (Wahlin & Grimvall, 2009). MULTITEST also offers convenient
handling of missing values and censored values (less-than-values). Trend slopes are
computed according to Sen (1968)
System requirements
MULTITEST can be run on any PC where Microsoft Office Excel 2003 or 2007,
Professional Edition, has been properly installed.
Input of data
General information
MULTITEST operates on Excel sheets, and the data that shall be analysed are pasted
onto the worksheet ‘Input to trend analysis’
Each data set shall have the form of a table, where the first row is reserved for variable
names. Furthermore, each case (or object) has its own row.
The first column must have the name ‘Year’ and represent the year of each observation.
Other columns may represent response variables (targets) or covariates, or define
different classes of observations.
Data tables can be pasted anywhere in the worksheet, and several tables can be pasted
onto the same worksheet. MULTITEST searches for cells containing the string ‘Year’
and empty rows or columns that delineate the different tables.
Year
1997
1998
2001
1999
2003
2007
2009
Season
JAN
JUL
FEB
FEB
JAN
JUL
FEB
Response Covariate
5.56
5.64
4.32
6.38
4.43
4.72
6.52
3.92
3.96
4.08
4.78
5.37
2.62
3.77
Year
1997
1998
2001
1999
2003
2007
2009
Figure 1. Examples of input data tables
2
Series id Response Covariate
Site1
5.56
5.64
Site2
4.32
6.38
Site1
4.43
4.72
Site2
6.52
3.92
Site1
3.96
4.08
Site3
4.78
5.37
Site1
2.62
3.77
MULTITREND – user’s manual
2009-02-11
Model roles of the variables
The model roles of the variables are determined by filling in a sequence of user forms.
There are three model roles: target, class and covariate. The class variables may represent
seasons, sites or any other user-defined grouping of the data, whereas covariates are used
for partial Mann-Kendall tests. MULTITEST can accommodate an arbitrary number of
targets and class variables, but at most one covariate.
Variable types, missing and multiple values
Years are assumed to be coded as positive integers, whereas both the targets and the
covariate can be any type of numeric variables. The class variables can contain strings,
such as “July”, or be numeric variable.
MULTITEST automatically checks the variable types and produces error messages if
cells that should be numeric have a nonnumeric content.
Missing values of targets and covariates shall be indicated by empty cells. Note that a cell
containing an invisible space is not empty.
If multiple observations belong to the same combination of year and group, MULTITEST
computes a median that is subsequently used in the trend tests.
Starting the data analysis
The worksheet ‘Input to trend analysis’ has a button ‘MULTITEST’. When clicking that
button, the programme first presents a sequence of user forms that shall be filled in, one
by one. Thereafter, MULITEST immediately starts the data analysis.
Correction for serial dependence
If a class variable representing months or seasons is used MULTITEST automatically
corrects for serial correlation up to one year.
Correction for serial correlation over longer time periods can be made by entering the
desired time span in one of the user forms.
Time intervals
MULTITEST can use all available data or restrict the analysis to A user-defined time
interval.
3
MULTITREND – user’s manual
2009-02-11
References
Hirsch R.M. and Slack J.R. (1984). A non-parametric trend test for seasonal data with
serial dependence. Water Resources Research, 20, 727–732.
Libiseller C. and Grimvall A. (2002). Performance of partial Mann-Kendall test for trend
detection in the presence of covariates. Environmetrics, 13, 71-84.
Sen P.K. (1968). Estimates of the regression coefficient based on Kendall's tau. Journal
of the American Statistical Association, 63, 1379-1389.
Wahlin K. and Grimvall A. (2009). Roadmap for assessing regional trends in
groundwater quality. Submitted to Environmental Monitoring and Assessment.
4
Download