[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: RE: m stat for sign test

From   Chris Witte <[email protected]>
To   [email protected]
Subject   Re: st: RE: m stat for sign test
Date   Fri, 10 Oct 2008 07:29:13 -0700 (PDT)

I appreciate the information Roger!  I need a quick turnaround on my document, so I don't think I'll use this package this time, but I'll give it a look next time.

----- Original Message ----
From: "Newson, Roger B" <[email protected]>
To: [email protected]
Sent: Thursday, October 9, 2008 3:53:38 PM
Subject: st: RE: m stat for sign test

In fact, Stata can do better than this, if you download the -somersd- package from SSC. The -somersd- package calculates confidence intervals for a large family of rank statistics, including Kendall's tau-a, Somers' D, and median differences. It is available in Stata Version 10 (on SSC), and also in Stata Version 9, on my website, by typing

net from "";

and downloading the Stata 9 version of -somersd-.

The parameter behind the sign test is a special case of a within-cluster Somers' D. In your case, this Somers' D is the difference between 2 probabilities, namely the probability that the observed value is larger than the expected value and the probability that the expected value is larger than the observed value. The -somersd- package can estimate this parameter, with confidence limits. And it can also estimate (with confidence limits) the median difference between the paired observed and expected values, which is also a parameter behind the sign test. An example of the use of the -cendif- module of the -somersd- package on paired data appears in Subsection 3.2 of the -cendif- manual, downloadable from my website (see my signature below) at

The sign test is often not very powerful, as the confidence limits for the underlying parameters are often wide. I have long argued that a more powerful alternative for paired data might be the Von Mises Somers' D and the Von Mises median difference, which compare all observed values with all expected values (as with the 2-sample ranksum test), and have confidence intervals adjusted for the fact that the data are paired. This point is also discussed in Subsection 3.2 of the -cendif- manual.

I hope this helps. Let me know if you have any queries.

Best wishes


Roger B Newson BSc MSc DPhil
Lecturer in Medical Statistics
Respiratory Epidemiology and Public Health Group
National Heart and Lung Institute
Imperial College London
Royal Brompton Campus
Room 33, Emmanuel Kaye Building
1B Manresa Road
London SW3 6LR
Tel: +44 (0)20 7352 8121 ext 3381
Fax: +44 (0)20 7351 8322
Email: [email protected] 
Web page:
Departmental Web page:

Opinions expressed are those of the author, not of the institution.

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Chris Witte
Sent: 09 October 2008 19:08
To: [email protected]
Subject: st: m stat for sign test

I'm running a -signtest- analysis on groups of data to see whether they differ from an expected value.  The data isn't normally distributed, which is why I'm not using -ttest-.  I know that SAS reports the m statistic with the p-value from the sign test.  Can stata give this as well?



*  For searches and help try:

*  For searches and help try:


*   For searches and help try:

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