Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Numerous t-tests


From   Roger Newson <[email protected]>
To   [email protected]
Subject   Re: st: Numerous t-tests
Date   Wed, 26 Oct 2005 12:03:13 +0100

At 11:32 26/10/2005, Allan wrote:
I have what should be a very simple question, but I haven't been able to figure out the answer. I want to do group mean comparison t-tests and rank sum tests on a number of different variables.. But, it appears that both -ttest- and -ranksum- will only do 1 variable at a time. So, is there a single command that will let me put in any number of variables (along with the 2-level grouping variable, of course) and will then do ALL the tests at once?
You might want to use the -somersd- package, downloadable from SSC, to calculate confidence intervals for Somers' D and the Hodges-Lehmann median difference (corresponding to the ranksum test). For instance, if you type

somersd group y1 y2 y3 y4, tr(z)

then -somersd- will output confidence intervals for the Somers' D of the variables -y1-, -y2-, -y3 -and -y4- with respect to the grouping variable -group-.

Confidence intervals are usually more informative than P-values alone. For more about confidence intervals corresponding to rank statistics, see Newson (2002).

I hope this helps.

Best wishes

Roger


References

Newson R. 2002. Parameters behind "nonparametric" statistics: Kendall's tau, Somers'
D and median differences. The Stata Journal 2(1): 45-64. Pre-publication draft
downloadable from Roger Newson's website at http://phs.kcl.ac.uk/rogernewson.



--
Roger Newson
Lecturer in Medical Statistics
Department of Public Health Sciences
Division of Asthma, Allergy and Lung Biology
King's College London

5th Floor, Capital House
42 Weston Street
London SE1 3QD
United Kingdom

Tel: 020 7848 6648 International +44 20 7848 6648
Fax: 020 7848 6620 International +44 20 7848 6620
or 020 7848 6605 International +44 20 7848 6605
Email: [email protected]
Website: http://phs.kcl.ac.uk/rogernewson/

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

*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




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