forgiveness
已经会了,不过是用minitab软件实现的。
在minitab网站上按下述方法下载Mann-kendall宏,然后按照操作说明进行即可:)
Performing the Mann-Kendall test for detecting trends
ID: 1784 Revised: 9/18/2007
Applies to Minitab 15
Minitab 14
Description
How can I perform the Mann-Kendall test for detecting trends?
Solution
You can use the Mann-Kendall Test for Detecting Trends macro, available from our Macros Library.
Note: An adjustment is made for tied observations in this nonparametric test, and you must have at least 10 observations for the Normal approximation to be appropriate.
1. Click the link, Mann-Kendall Test for Detecting Trends Macro, below.
2. Under the Mann-Kendall Test for Detecting Trends description, click Code.
3. Save the page as a macro, called MKTREND.MAC, in your Minitab macros folder (for example C:\Program Files\Minitab 15\English\Macros). For instructions, see "How to save this page as a macro".
4. Suppose your data are in C2. In the Session window at the command prompt MTB>, type the following and press [Enter]:
%MKTREND C2
Suppose you want to change the value of alpha from the default 0.05 to another value, such as 0.1. In the Session window at the command prompt MTB>, type the following and press [Enter] after each line:
%MKTREND C2;
ALPHA 0.1.
(In the Session window, the command prompt changes to SUBC> after the first line.)
Note: To display the command prompt, activate the Session window and choose Editor > Enable Commands.