Stata 11 help for signrank

help signrank, help signtest dialogs: signrank signtest -------------------------------------------------------------------------------

Title

[R] signrank -- Equality tests on matched data

Syntax

Wilcoxon matched-pairs signed-ranks test

signrank varname = exp [if] [in]

Sign test of matched pairs

signtest varname = exp [if] [in]

by is allowed with signrank and signtest; see [D] by.

Menu

signrank

Statistics > Nonparametric analysis > Tests of hypotheses > Wilcoxon matched-pairs signed-rank test

signtest

Statistics > Nonparametric analysis > Tests of hypotheses > Test equality of matched pairs

Description

signrank tests the equality of matched pairs of observations by using the Wilcoxon matched-pairs signed-ranks test (Wilcoxon 1945). The null hypothesis is that both distributions are the same.

signtest also tests the equality of matched pairs of observations (Arbuthnott 1712, but better explained by Snedecor and Cochran 1989) by calculating the difference between varname and the expression. The null hypothesis is that the median of the differences is zero; no further assumptions are made about the distributions. This, in turn, is equivalent to the hypothesis that the true proportion of positive (negative) signs is one-half.

For equality tests on unmatched data, see [R] ranksum.

Examples

. webuse fuel . signrank mpg1 = mpg2 . signtest mpg1 = mpg2

Saved results

signrank saves the following in r():

Scalars r(N_neg) number of negative comparisons r(N_pos) number of positive comparisons r(N_tie) number of tied comparisons r(sum_pos) sum of the positive ranks r(sum_neg) sum of the negative ranks r(z) z statistic r(Var_a) adjusted variance

signtest saves the following in r():

Scalars r(N_neg) number of negative comparisons r(N_pos) number of positive comparisons r(N_tie) number of tied comparisons r(p_2) two-sided probability r(p_neg) one-sided probability of negative comparison r(p_pos) one-sided probability of positive comparison

References

Arbuthnott, J. 1712. An argument for divine providence, taken from the constant regularity observed in the births of both sexes. Philosophical Transactions 27: 186-190.

Snedecor, G. W., and W. G. Cochran. 1989. Statistical Methods. 8th ed. Ames, IA: Iowa State University Press.

Wilcoxon, F. 1945. Individual comparisons by ranking methods. Biometrics 1: 80-83.

Also see

Manual: [R] signrank

Help: [R] ranksum, [R] ttest


© Copyright 1996–2009 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index