.- help for ^npt_s^ (STB-33: snp12) .- Stratified test for trend across ordered groups -------------------------------------------------- ^npt_s^ varname [^if^ exp] [^in^ range]^, b^y^(^groupvar^)^ [^nod^etail ^st^rata^(^varnames^)^] Description ----------- ^npt_s^ performs an (optionally stratified) nonparametric test for trend across ordered groups. This test, developed by Cuzick (1985), is an extension of the Wilcoxon rank-sum test and is a useful adjunct to the Kruskal-Wallis test (see help @kwallis@). The variance of the test statistic incorporates a correction for ties. When no options are specified, the values of ^groupvar^ are used for the scores. ^npt_s^ can be used to perform a stratified Wilcoxon test. Options ------- ^by(^groupvar^)^ is not optional; it defines the ordered groups. ^strata(^varnames^)^ is used to specify statifying varaible(s). If specified the test statistic will be calculated separately in each stratum and combined with weight inversely proportional to the variance. ^nodetail^ suppresses the more detailed output. If there are no strata, the default is to display the rank-sums at each level of the by-variable. Otherwise the default displays the observed value, the expected value and the variance of the weighted sum of ranks in each strata. ^ordinal^ uses the values 1, 2, 3, ... instead of the values in as the scores in the test. ^midrank^ uses the midranks of instead of the values in as the scores in the test. This is equivalent to ridit scores. Note that ^midrank^ is an alternative to ^ordinal^. When neither ^ordinal^ nor ^midrank^ is specified, the values of ^groupvar^ are used for the scores. The scores generated by ^ordinal^ and ^midrank^ are the same in all strata. Example ------- . ^npt_s exposure, by(group)^ group score obs sum of ranks 1 1 6 76 2 2 18 290 3 3 8 162 z = 1.52, chi-squared(1) = 2.31 P>|z| = 0.1286 Author ------ Peter Sasieni Imperial Cancer Research Fund, London p.sasieni@@icrf.icnet.uk Also see -------- STB: STB-33, snp12 Manual: [R] nptrend On-line: help for @kwallis@, @signrank@