------------------------------------------------------------------------------- help forjonterVersion 2.4 2008-08-20 -------------------------------------------------------------------------------

Jonckheere-Terpstra Test

jontervarname[ifexp] [inexp],by(groupvar)[verbosejonlycontinuity]

Description

jontercalculates test statistics,JandJ*, and asymptoticp-values for the Jonckheere-Terpstra test for ordered alternatives.

OptionsNote that the

by()is mandatory. Bothvarnameandgroupvarmust be at least ordinal.

verboseallows display of the individual Mann-Whitney U counts.

jonlylimits the calculations to those for theJtest statistic. This allows the command to complete somewhat faster, and is highly recommended for use ofjonterwithpermutewhen use is made only of theJtest statistic.

continuitycauses a continuity correction to be applied toJ*. This might aid somewhat in the normal approximation, but use of a continuity correction with the Jonckheere-Terpstra test is not widespread.

Remarks

jonterprovides an alternative to the nonparametric trend testnptrend, which is Stata's implementation of the Cuzick test. The Jonckheere-Terpstra test'sp-value asymptotically converges to that for the test for Kendall's tau (ktau). As withktau,jonteris intended for small to moderate-sized datasets; the duration of computations grows disproportionately with sample size.

jontercorrectsJandJ*for tied values invarname. It also reports asymptoticp-values for the test of descending ordered alternatives, as well as for that of ascending ordered alternatives. This obviates the need to manually reverse ordering of the values in thebyorvarnamevariables in order to test for a descending ordering. It also reports the asymptoticp-value for the alternative of either an ascending or a descending ordering against the null hypothesis of no ordering (i.e., the two-tailed test), when the direction of ordering in thebyvariable cannot be independently specified in advance.Test statistics and

p-values are returned in scalars: r(J)—Jonckheere-Terpstra test statistic,J; r(JH0)—expectation ofJunder the null hypothesis; r(se_JH0)—square-root of the variance ofJunder the null hypothesis; r(Jstar)—asymptotic normal approximation ofJ; and r(p), r(p_l) and r(p_u)—p-values associated withJ*.

Examples. jonter latency, by(dose)

AuthorJoseph Coveney jcoveney@bigplanet.com

AcknowledgmentNicholas J. Cox edited an earlier version of

jonter, fixing bugs and providing major improvements in efficiency and functionality. Correspondence regarding support should nevertheless be addressed to the author listed above.

Also seeManual:

[R] nptrend[R] spearman