Description Usage Arguments Details Value Author(s) References Examples
Perform one-sample Cox-Stuart trend test.
1 2 |
x |
a numeric vector of data values. |
alternative |
indicates the alternative hypothesis and must be one of |
exact |
|
correct |
a logical indicating whether to apply continuity correction in the normal approximation for the p-value. The default is |
Cox-Stuart trend analysis is a robust method to detect the presence of the trend regardless of the distribution of the data. Given the independent data, i.e., X[1],...,X[n], one can divide the data into two sequences with equal number of observations cutted in the midpoint and then take the paired difference, i.e., D = X[i] - X[i+c], i = 1, ..., floor(n/2), where c is the index of midpoint. The totals of the positive or negative sign in D is defined as S+ or S-. Under null hypothesis, S+ or S- has a binomial distribution with the number of experiment being the number of elements in D after removing element(s) 0 and probability p = 0.5. The exact method (exact = TRUE
) is based on binomial distribution of statistic S+ ("increasing"
) or S- ("decreasing"
) or S = min(S+, S-) ("two.sided"
) and one can thus compute the exact p-value. When the sample size is large, one can also use the normal approximation (argument exact = TRUE
) to the binomial distribution with or without continuity correction. Missing values have been removed.
A list with class "htest" containing the following components:
data.name |
a character string giving the names of the data. |
method |
the type of test applied. |
alternative |
a character string describing the alternative hypothesis. |
p.value |
the p-value for the test. |
statistic |
the value of the test statistic with a name describing it. |
Debin Qiu <debinqiu@uga.edu>
D.R. Cox and A. Stuart (1955). Some quick sign tests for trend in location and dispersion. Biometrika, Vol. 42, pp. 80-95.
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.