Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

Re: st: tabulation of comparison outcomes in -somersd-


From   Roger Newson <r.newson@imperial.ac.uk>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   Re: st: tabulation of comparison outcomes in -somersd-
Date   Thu, 21 Oct 2010 19:50:22 +0100

No, the quantities P, N and T (as you define them) are not currently available from -somersd-. However, if you redefine P to be the PROPORTION of all comparisons concordant, N to be the PROPORTION of all comparisons discordant, and T to be the PROPORTION of all comparisons in which the X-variables are not tied, then T is equal to the scalar result -e(denominator)- saved by -somersd-.

As it happens, the original ancestor of -somersd- was called -lllgglgg-, and calculated output variables ll, lg, gl and gg, containing, respectively, in each observation, the number of other observations with a lesster X-value and a lesser Y-value, the number of observations with a lesser X-value and a greater Y-value, the number of observations with a greater X-value and a lesser Y-value, and the number of observations with a greater X-value and a greater Y-value. (See Newson (2007).) It would be possible, in principle, to rewrite -somersd- to calculate P and N, instead of just their difference. Or it would even be possible to make -somersd- calculate Kruskal's gamma. However, that would require re-writing -somersd- at the Mata level.

I hope this helps.

Best wishes

Roger


References

Newson R. B. 1987. An Analysis of Cinematographic Cell Division Data Using U-Statistics. D.Phil. thesis, Sussex University, Brighton, UK.

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
UNITED KINGDOM
Tel: +44 (0)20 7352 8121 ext 3381
Fax: +44 (0)20 7351 8322
Email: r.newson@imperial.ac.uk
Web page: http://www.imperial.ac.uk/nhli/r.newson/
Departmental Web page:
http://www1.imperial.ac.uk/medicine/about/divisions/nhli/respiration/popgenetics/reph/

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

On 21/10/2010 19:08, Feiveson, Alan H. (JSC-SK311) wrote:
Hi - I believe Somers' D is equal to (P - N)/T, where P = # positive relevant comparisons, N = # negative relevant comparisons, and T = total # of relevant comparisons, where in -somersd- "relevant" is determined by non-occurrence of ties in the first variable and whichever strata/within/between comparisons I specify. So after running -somersd- I wish to record the values of P, N and T.

Does anyone know if this information is accessible after running -somersd- ?

Al Feiveson


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index