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 at the end of May, and its replacement, statalist.org is already up and running.


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

Re: st: How to test whether the median of a variable is different from 0


From   Roger Newson <r.newson@imperial.ac.uk>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   Re: st: How to test whether the median of a variable is different from 0
Date   Mon, 9 May 2011 12:59:59 +0100

Another possibiity is to use the -sccenslope- module of the -scsomersd- package, downloadable from SSC, to define a confidence interval for a median, and a P-value for the hypothesis that that median is zero. To use -scsomersd-, you must also download the packages -somersd- and -expgen- from SSC.

The -sccenslope- approach has the advantage that it can be used on samples which are clustered (there is a -cluster()- option) and/or sampling/probability weighted (it is possible to use pweights).

I hope this helps.

Best wishes

Roger


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 09/05/2011 12:01, Ronan Conroy wrote:
On 2011 Beal 8, at 23:19, Jean-Marie Meier wrote:

Dear Stata list users,

how do I test, whether the median of a variable is different from 0?

Have a look at its confidence interval, either using -centile-, or -qreg- without any predictor variables. With the -qreg- route you can adjust for potential confounders, which gives it an advantage in my book.



Ronán Conroy
rconroy@rcsi.ie
Associate Professor
Division of Population Health Sciences
Royal College of Surgeons in Ireland
Beaux Lane House
Dublin 2


*
*   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