Statalist The Stata Listserver


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

RE: st: Different confidence intervals from proportions and tabulates (also in survey)


From   "Jason Ferris" <[email protected]>
To   <[email protected]>
Subject   RE: st: Different confidence intervals from proportions and tabulates (also in survey)
Date   Mon, 30 Oct 2006 11:33:05 +1100

Hi Nick,
I have pasted the output of a -svy: tab and a -svy: prop from my
dataset.  The instances when I get negative CI's (see proportions table)
is when I have included two over options (sex age10). As mentioned
before the CI's for tabulate and proportions differ (but I understand
this now to be a function of tabulate using the logit/inverse logit
function) to calculate the boundaries.

As you can see from the proportions table the upper CI does not fall
below the lower CI but the lower CI is negative which doesn't make sense
to me.

. svy, subpop(if age10==0): proportion sexmajor , over(sex age10)
(running proportion on estimation sample)

Survey: Proportion estimation

Number of strata =       2          Number of obs    =    7270
Number of PSUs   =    7270          Population size  = 7122.17
                                    Subpop. no. obs  =     258
                                    Subpop. size     = 404.543
                                    Design df        =    7268

      _prop_1: sexmajor = 0. no
      _prop_2: sexmajor = 1. yes

         Over: sex age10
    _subpop_1: 0. female 0. 16-19
    _subpop_2: 1. male 0. 16-19

--------------------------------------------------------------
             |             Linearized         Binomial Wald
        Over | Proportion   Std. Err.     [95% Conf. Interval]
-------------+------------------------------------------------
_prop_1      |
   _subpop_1 |   .9809524   .0116001      .9582128    1.003692
   _subpop_2 |   .9782609   .0134002      .9519926    1.004529
-------------+------------------------------------------------
_prop_2      |
   _subpop_1 |   .0190476   .0116001     -.0036919    .0417872
   _subpop_2 |   .0217391   .0134002     -.0045291    .0480074
--------------------------------------------------------------

. svy, subpop(if age10==0): tabulate sexmajor sex, col percent ci se
(running tabulate on estimation sample)

Number of strata   =         2                Number of obs      =
7270
Number of PSUs     =      7270                Population size    =
7122.1699
                                              Subpop. no. of obs =
258
                                              Subpop. size       =
404.5432
                                              Design df          =
7268

-------------------------------------------------------
          |                     sex                    
 sexmajor |      0, femal        1, male          Total
----------+--------------------------------------------
    0, no |          98.1          97.83          97.94
          |        (1.16)         (1.34)        (.9081)
          | [93.85,99.43]   [92.9,99.36]  [95.16,99.14]
          | 
   1, yes |         1.905          2.174          2.056
          |        (1.16)         (1.34)        (.9081)
          | [.5717,6.154]     [.642,7.1]  [.8595,4.835]
          | 
    Total |           100            100            100
          |                                            
          |                                            
-------------------------------------------------------
  Key:  column percentages
        (linearized standard errors of column percentages)
        [95% confidence intervals for column percentages]

  Pearson:
    Uncorrected   chi2(1)         =    0.6443
    Design-based  F(1, 7268)      =    0.0233     P = 0.8787


Thanks for your ongoing interest :-)
Jase


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Nick Cox
Sent: Monday, 30 October 2006 11:01 AM
To: [email protected]
Subject: RE: st: Different confidence intervals from proportions and
tabulates (also in survey)

As before, your terminology of negative CIs is puzzling. 
An interval is a length; if the upper limit falls below 
the lower limit, then there is really is a bug. However, 
as before, I assume you are talking about negative lower limits 
(bounds). 

There is a no attachments rule on Statalist. (The FAQ explains.) 

The export to MS Excel is naturally independent of these issues
and your own choice. If you have Excel-specific problems that 
are also relevant to Statalist, others will advise. 

Nick 
[email protected] 

Jason Ferris
 
> Dear Jeff and Nick,
> Thanks for your replies.  I did not attach my dataset; 
> although I could
> attach the output of the -svy: prop and -svy: tab if you want.  I
> thought the easy access example would provide enough for you 
> to tell my
> why there is a difference.  And you have (thanks again).
> 
> My concern was exporting the matrix to excel and the 
> resulting 1.96*e(V)
> was giving me the CI's equivalent to the -svy: proportion (which in my
> case was giving me negative CI's).  After reading both your 
> responses I
> will transform the data to the logit and keep everything 
> nicely position
> between 0 and 1.  Hopefully, in this manner the mat2txt command or
> parmest will work nicely for me - and save me a lot of manual entry.
> 

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