Be the first to rate this file! 92 downloads (last 30 days) File Size: 12.9 KB File ID: #22440

Homogeneity test of Global Trends using Chi-Square on Mann-Kendall

by Jeff Burkey

 

14 Dec 2008 (Updated 19 Feb 2009)

BSD License  

Test for homogeneity of trends in different seasons-stations,and global trends using Chi-Square.

Download Now | Watch this File

File Information
Description

GlobalTrends- Homogeneity tests for multiple seasons and stations. This function will test for trends when seasonality is present and over multiple observation stations, all of which are Chi-square statistics. There are so many statistical tests being done, this function is more like a script or program than a function, but I prefer operating with functions.  
 
This function relies heavily on Matlab's Statistical Toolbox for obtaining Chi-square values and ktaub.m function.  
 
These tests will allow for ties, missing data, and multiple observations per time index, since it uses the enhanced ktaub.m function that was recently updated.  
 
There are numerous narratives as part of the output to the screen providing supporting interpretation of the results.  
 
This function is based on Chapter 17.5 in Gilbert.  
 
Syntax:  
      [ChiOutput K M sig] = GlobalTrends( datain, alpha )  
 
Inputs:  
To stay consistent with the previous trend statistics posted (ktaub, sktt, and SenT), data are expected to be in the following structure:  
       datain(:,1) = Year  
       datain(:,2) = season  
       datain(:,3) = value  
       datain(:,4) = station  
       alpha = scaler (e.g. 0.05)  
 
Outputs:  
   ChiOutput structure is like the following (labels are not included)  
        Total: Chi-square df p-value  
        Homogeneity: Chi-square df p-value  
        Season: Chi-square df p-value  
        Station: Chi-square df p-value  
        Station-Season: Chi-square df p-value  
        Trend: Chi-square df p-value  
      
And depending on significances of Stations, Seasons, and StationSeasons, one of three other outpus may occur:  
        K: significance of Seasons per station  
        M: significance of Stations for seasons  
 
 And when seasonal trend tests should not be done  
        sig: individual station-season p-values are given by row  
 
There is a lot of output to the screen as well, but using fprintf, one could easily redirect output to a file.  
    Requirements  
       - Matlab Statistical Toolbox  
       - ktaub.m  
 
Reference:  
      Richard O. Gilbert, Pacific Northwest National Laboratories,  
      "Statistical methods for Environmental Pollution Monitoring", 1987, Van Nostrand Reinhold, New York Publishing, ISBN 0-442-23050-8.  
 
One last note. I’ve posted enough functions that it makes sense to constitute forming a Matlab toolbox…so it’s in the works (slowly).  
 
    Written by:  
      Jeff Burkey  
      King County- Department of Natural Resources and Parks  
      email: Jeff.Burkey@kingcounty.gov  
      12/13/2008  

Required Products Statistics Toolbox
MATLAB release MATLAB 7.7 (R2008b)
Other requirements ktaub.m
Zip File Content  
Other Files ex1c.mat,
GlobalTrends.m
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
19 Feb 2009 Jeff Burkey I've included a MAT file with example data to run the function. I hope this helps.
Please login to add a comment or rating.
Updates
08 Jan 2009 Updated description text. Data are not required to be linear per se, but formated like time-series. Up comming is a Log-person Type III function (aka USGS 17B) flood fequency analysis. Also, I've posted enough functions that a toolbox is coming.
05 Feb 2009 Updated Title to be more descriptive.
19 Feb 2009 I've gotten a couple of inquiries asking for an example dataset to use. I've added an example MAT file along with the m-file.
Tag Activity for this File
Tag Applied By Date/Time
statistics Cristina McIntire 15 Dec 2008 15:23:43
probability Cristina McIntire 15 Dec 2008 15:23:43
homogeneity Cristina McIntire 15 Dec 2008 15:23:43
season Cristina McIntire 15 Dec 2008 15:23:43
hydrology Cristina McIntire 15 Dec 2008 15:23:43
homogeneity Jeff Burkey 15 Dec 2008 15:23:52
statistics Jeff Burkey 15 Dec 2008 15:23:52
trends Jeff Burkey 15 Dec 2008 15:23:52
chisquare Jeff Burkey 15 Dec 2008 15:23:52
mannkendall Jeff Burkey 15 Dec 2008 15:23:52
hydrology Jeff Burkey 15 Dec 2008 15:23:52
climate Jeff Burkey 15 Dec 2008 15:23:52
season Jeff Burkey 15 Dec 2008 15:23:52
global trends Jeff Burkey 15 Dec 2008 15:23:52
chi Jeff Burkey 15 Dec 2008 15:23:53
probability Jeff Burkey 15 Dec 2008 15:23:53

Public Submission Policy

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Disclaimer prior to use.

Contact us at files@mathworks.com