Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: RE: Comparing medians with pweight


From   "Ada C. Chen" <ada08chen@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: RE: Comparing medians with pweight
Date   Thu, 22 Mar 2007 07:02:43 -0400

Thanks! Roger.
The manuals of rank statistics are very helpful.

Best,

Ada

2007/3/7, Newson, Roger B <r.newson@imperial.ac.uk>:
I don't know whether you really want to compare 2 medians or to estimate
the median pairwise difference between 2 groups. (These are not the same
thing, as the median pairwise difference is not always the difference
between the 2 medians, although the mean pairwise difference is the
difference between the 2 means.) However, if you want to estimate the
median pairwise difference (with confidence limits), then you can use
the -cendif- program, which is part of the -somersd- package,
downloadable from SSC. -cendif- (unlike -median-) allows you to use
pweights.

The -somersd- package calculates confidence intervals for a range of
rank statistics, and is distributed with 3 .pdf manuals, which you can
download as ancillary files. You can also find more about the methods in
Newson (2006a) and Newson (2006b), both of which have pre-publication
drafts which you can download from my website at
http://www.imperial.ac.uk/nhli/r.newson/

I hope this helps.

Best wishes

Roger


References

Newson, R. 2006a.  Confidence intervals for rank statistics:  Somers' D
and extensions.  Stata Journal 6: 309-334.

Newson, R. 2006b.  Confidence intervals for rank statistics:  Percentile
slopes, differences, and ratios.  Stata Journal 6: 497-520.



Roger Newson
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
www.imperial.ac.uk/nhli/r.newson/

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

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Ada C. Chen
Sent: 07 March 2007 17:49
To: statalist@hsphsun2.harvard.edu
Subject: st: Comparing medians with pweight

Dear all,

Is it possible to compare medians of a continuous variable between two
groups by using -pweight- instead of -fweight-? Does stata only allow
for fweight?

Here is my code and result:
. median income [pweight=wt1], by(priv)
pweight not allowed
r(101);


Best,

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

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

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index