Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

RE: st: finding means and percentiles with mim


From   "Lachenbruch, Peter" <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   RE: st: finding means and percentiles with mim
Date   Fri, 26 Mar 2010 09:06:16 -0700

Here is a short experiment using centile, sqreg with default (20) reps and sqreg with 1000 reps.
The intervals are comparable, but the ones with 1000 bootstrap replications are sometimes shorter and sometimes longer than the ones with 20.  A similar comparison holds for the centile command.  So my previous post can't be so definitive.

. centile ck252 if _mj==0,c(10 25 50 75 90)

                                                       -- Binom. Interp. --
    Variable |     Obs  Percentile      Centile        [95% Conf. Interval]
-------------+-------------------------------------------------------------
       ck252 |     414         10         151.5        115.9086    185.2382
             |                 25           325        281.8514         394
             |                 50        1031.5        778.7953    1288.068
             |                 75       5168.75        3481.268    6165.873
             |                 90         14443        10497.57    19204.41

. sqreg ck252 if _mj==0,quantile(10 25 50 75 90)
(fitting base model)
(bootstrapping ....................)

         |              Bootstrap
   ck252 |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
---------+----------------------------------------------------------------
q10      |
   _cons |        152   16.20559     9.38   0.000     120.1443    183.8557
---------+----------------------------------------------------------------
q25      |
   _cons |        325   29.48077    11.02   0.000     267.0489    382.9511
---------+----------------------------------------------------------------
q50      |
   _cons |       1032   130.1559     7.93   0.000     776.1494    1287.851
---------+----------------------------------------------------------------
q75      |
   _cons |       5142   658.7705     7.81   0.000     3847.039    6436.961
---------+----------------------------------------------------------------
q90      |
   _cons |      14404   2132.311     6.76   0.000     10212.46    18595.54
--------------------------------------------------------------------------

. sqreg ck252 if _mj==0,quantile(10 25 50 75 90) reps(1000)
(fitting base model)
(bootstrapping  [I deleted the dots] 

----------------------------------------------------------------------------
         |              Bootstrap
   ck252 |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
---------+----------------------------------------------------------------
q10      |
   _cons |        152    18.3516     8.28   0.000     115.9258    188.0742
---------+----------------------------------------------------------------
q25      |
   _cons |        325   28.69129    11.33   0.000     268.6008    381.3992
---------+----------------------------------------------------------------
q50      |
   _cons |       1032   137.8826     7.48   0.000     760.9607    1303.039
---------+----------------------------------------------------------------
q75      |
  __cons |       5142   749.7526     6.86   0.000     3668.193    6615.807
---------+----------------------------------------------------------------
q90      |
   _cons |      14404   1837.045     7.84   0.000     10792.88    18015.12
--------------------------------------------------------------------------


Tony

Peter A. Lachenbruch
Department of Public Health
Oregon State University
Corvallis, OR 97330
Phone: 541-737-3832
FAX: 541-737-4001


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Martin Weiss
Sent: Friday, March 26, 2010 8:48 AM
To: [email protected]
Subject: AW: st: finding means and percentiles with mim


<> 

" In looking at the confidence intervals, the ones produced by sqreg/qreg
are slightly shorter than the ones produced by centile."




How does the fact that we are comparing analytic (-centile-) and
-bootstrap-ped (-sqreg-) standard errors play into your considerations?




HTH
Martin


-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Lachenbruch,
Peter
Gesendet: Freitag, 26. März 2010 16:41
An: '[email protected]'
Betreff: RE: st: finding means and percentiles with mim

Martin and I have had an interchange off-line on this.  I'd like to
summarize my interpretation.
The centile command uses a single observation to estimate the percentile.
The sqreg or qreg command uses a weighted combination of the observations.
So I would expect them to differ.  In looking at the confidence intervals,
the ones produced by sqreg/qreg are slightly shorter than the ones produced
by centile.

It may be easier to talk about centile to a client, but the issue of short
confidence intervals is important to me.  Also, for multiple imputation, you
can't use centile, so that tips the balance for me.

Thanks very much to Martin.  I appreciate his good comments on all issues.

Tony

Peter A. Lachenbruch
Department of Public Health
Oregon State University
Corvallis, OR 97330
Phone: 541-737-3832
FAX: 541-737-4001


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Martin Weiss
Sent: Thursday, March 25, 2010 9:24 AM
To: [email protected]
Subject: AW: st: finding means and percentiles with mim


<> 

Those percentiles are slightly off, however:



*************
clear*
set obs 1000
set seed 234232
gen x=rgamma(2,2)
sqreg x, quantiles(10 25 50 75 90) reps(2)
centile x, centile(10 25 50 75 90)
*************



HTH
Martin


-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Lachenbruch,
Peter
Gesendet: Donnerstag, 25. März 2010 16:40
An: '[email protected]'
Betreff: RE: st: finding means and percentiles with mim

I agree with the message.  However, what I am looking for is a descriptive
statistic, so the command sqreg y, quantile(10 25 50 75 90)  will give me
the percentiles that I want.  

Here is some output.

. mim:sqreg lck ,quantile(10 25 50 75 90)

Multiple-imputation estimates (sqreg)                Imputations =      20
                                                     Minimum obs =     432
                                                     Minimum dof =   386.9

-------------------------------------------------------------------------
     lck |     Coef.  Std. Err.     t    P>|t|    [95% Conf. Int.]     FMI
---------+----------------------------------------------------------------
   _cons |   5.01997   .118927   42.21   0.000    4.78621  5.25373   0.008
---------+----------------------------------------------------------------
    /q25 |   5.79006   .081047   71.44   0.000    5.63076  5.94937   0.017
    /q50 |   6.95493   .132365   52.54   0.000    6.69472  7.21513   0.030
    /q75 |   8.52631   .170016   50.15   0.000    8.19204  8.86058   0.050
    /q90 |   9.56167   .132408   72.21   0.000    9.30136  9.82199   0.045
--------------------------------------------------------------------------

Tony

Peter A. Lachenbruch
Department of Public Health
Oregon State University
Corvallis, OR 97330
Phone: 541-737-3832
FAX: 541-737-4001


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Martin Weiss
Sent: Wednesday, March 24, 2010 12:48 PM
To: [email protected]
Subject: RE: st: finding means and percentiles with mim


<>

" the command qreg is supported by mim, so I think I can use it."



Note the cautionary tale in this thread, though:
http://www.stata.com/statalist/archive/2009-11/msg01343.html



HTH
Martin


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

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index