Statalist


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

AW: st: test difference in quintiles


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   AW: st: test difference in quintiles
Date   Thu, 11 Jun 2009 16:59:01 +0200

<> 

Susanne asked me privately for further advice and also mentioned that she
could not figure out the implementation of Roger`s post. From what I
understand, the solution proposed by Roger should look like:


*************
clear*
set obs 10000
capt ssc inst invcise
capt ssc inst parmest

gen x= rnormal()

/*
no systematic 
difference btw groups
*/

gen byte condition=/* 
*/ runiform()<0.5

/*just to check 
plausibility of results */ 
by con, sort : /* 
*/ summarize x, detail

statsby N=r(N) p5=r(c_1) /* 
*/ p5min=r(lb_1) p5max=r(ub_1),/* 
*/  by(condition)/* 
*/  clear: centile x, c(5)
 
invcise p5min p5max, /* 
 */ stderr(icse)
 
metaparm [iweight=(cond==1)-(cond==0)],/*
 */ norestore sumvar(N)/* 
 */ estimate(p5) stderr(icse)

list, noobs
*************



HTH
Martin

-----Ursprüngliche Nachricht-----
Von: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Newson, Roger B
Gesendet: Donnerstag, 11. Juni 2009 10:45
An: 'statalist@hsphsun2.harvard.edu'
Betreff: RE: st: test difference in quintiles

Thanks to Samuel for the promotion. However, -cendif- computes confidence
intervals, not for differences between percentiles, but for percentile
differences. These are not exactly the same thing. For a counterexample, see
Newson (2008).

If Suzanne wants confidence intervals for the differences between 2 5th
percentiles for 2 subpopulations, then Suzanne should probably use the
-centile- command to get confidence intervals for the 2 5th percentiles, and
then use the -invcise- package and the -metaparm- module of the -parmest-
package, downloadable from SSC, to get a confidence interval for the
difference between the 2 5th percentiles. The -invcise- package calculates
standard errors using the inverse confidence interval method.

I hope this helps.

Best wishes

Roger

References

Newson, R. B. Hodges-Lehmann median differences between exponential
subpopulations. Downloadable from
http://www.imperial.ac.uk/nhli/r.newson/papers.htm#miscellaneous_documents
as from 12 October 2008.


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/popgene
tics/reph/

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
sjsamuels@gmail.com
Sent: 10 June 2009 22:42
To: statalist@hsphsun2.harvard.edu
Subject: Re: st: test difference in quintiles

-cendif-  by Roger Newson, is part of the -somersd- package,
downloadable from SSC (type "ssc install somersd".  It computes CI's
for,  and tests, differences between medians.  You will need  large
sample sizes to test the difference between 5th percentiles with
reasonable power.  What do you mean by "number of observations in the
5th percentile"?  You should not group data prior to the analysis.

-Steve



On Wed, Jun 10, 2009 at 10:57 AM, Susanne
Neckermann<sneckermann@iew.uzh.ch> wrote:
> Hi!
>
> I want to test whether the difference in the fifth percentile of two
> distributions is significant.
> In principle, this test should be similar to the "median" (thats the name
of
> the command) test already implemented in Stata, but unfortunately I cannot
> program .ado files and I could not find a user-written procedure.
> Any idea how to go about this?
> P.S. the number of observations in the fifth percentile is pretty low
> (around 6), so one might have to use something with bootstrap or
> permutations.
>
> Thank you so much in advance
> susanne
>
>
>
> *
> *   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/

*
*   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   |   What's new   |   Site index