|
IDL Analyst Reference Guide: Nonparametric Statistics |
|
The IMSL_NCTRENDS function performs the Noether test for cyclical trend.
| Note This routine requires an IDL Analyst license. For more information, contact your ITT Visual Information Solutions sales or technical support representative. |
result = IMSL_NCTRENDS(x [, /DOUBLE] [, FUZZ=value] [, NMISSING=variable] [, NSTAT=variable])
One-dimensional array of length 3 containing the probabilities of Nstat(1) or more, Nstat(2) or more, or Nstat(3) or more monotonic sequences. If Nstat(0) is less than 1, Result(0) is set to NaN (not a number).
One-dimensional array containing the data in chronological order.
If present and nonzero, double precision is used.
Nonnegative constant used to determine ties in computing ranks in the combined samples. A tie is declared when two observations in the combined sample are within Fuzz of each other. Default: Fuzz = 0.0.
Named variable into which the number of missing values in x is stored.
Named variable into which the one-dimensional array of length 6 containing the statistics below is stored:
Routine IMSL_NCTRENDS performs the Noether test for cyclical trend (Noether 1956) for a sequence of measurements. In this test, the observations are first divided into sets of three consecutive observations. Each set is then inspected, and if the set is monotonically increasing or decreasing, the count variable is made incremental.
The count variables, Nstat(1), Nstat(2), and Nstat(3), differ in the manner in which ties are handled. A tie can occur in a set (of size three) only if the middle element is tied with either of the two ending elements. Tied ending elements are not considered. In Nstat(1), tied middle observations are eliminated, and a new set of size 3 is obtained by using the next observation in the sample. In Nstat(2), the original set of size three is used, and tied middle observations are counted as nonmonotonic. In Nstat(3), tied middle observations are counted as monotonic.
The probabilities of occurrence of the counts are obtained from the binomial distribution with p = 1/3, where p is the probability that a random sample of size three from a continuous distribution is monotonic. The binomial sample size is, of course, the number of sequences of size three found (adjusted for ties).
Hypothesis test:
H0 : q = Pr(Xi > Xi - 1 > Xi - 2) + Pr(Xi < Xi - 1 < Xi - 2 ) £ 1/3 H1: q > 1/3
Reject if Result(0) (or Result(1) or Result(2) depending on the method used for handling ties) is less than the significance level of the test.
Assumption: The observations are independent and are from a continuous distribution.
A test for cyclical trend in a sequence of 1000 randomly generated observations is performed. Because of the sample used, there are no ties and all three test statistics yield the same result.