Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Difference in confidence limits reported by cii and proportion commands. StataIC 13.1; Windows 7, 32-bit.

    Hello all.
    Why is there difference in the confidence limits reported by the two commands please?

    Code:
    * Example generated by -dataex-. To    install: ssc install    dataex
    clear
    input byte(cancer sex exsmok) float    bmi2 byte age1
    0 0 2 1 1
    1 0 4 2 3
    0 0 4 1 3
    1 0 4 2 3
    0 0 1 2 3
    1 0 4 1 2
    0 0 1 2 3
    0 0 4 1 2
    1 0 4 4 3
    1 0 3 1 3
    1 0 1 4 2
    0 0 4 2 3
    1 0 1 2 3
    0 0 1 2 2
    0 0 4 1 2
    0 0 3 1 1
    0 0 4 1 2
    0 1 4 4 2
    0 1 4 2 3
    0 1 3 1 2
    0 1 3 4 3
    0 1 3 2 3
    1 1 3 1 2
    0 1 3 1 3
    0 1 1 1 3
    0 1 1 2 3
    0 1 2 2 2
    0 1 4 2 2
    0 1 4 1 3
    0 1 4 1 1
    1 1 1 1 3
    1 1 1 5 3
    0 1 4 1 2
    1 1 4 3 2
    1 1 3 2 2
    end
    label values sex sex
    label def sex 0 "Male" 1 "Female", modify
    Code:
    . tab cancer sex
    
               |          sex
        cancer |      Male     Female |     Total
    -----------+----------------------+----------
             0 |        10         13 |        23 
             1 |         7          5 |        12 
    -----------+----------------------+----------
         Total |        17         18 |        35 
    
    
    . cii 17 7, binomial
    
                                                             -- Binomial Exact --
        Variable |        Obs        Mean    Std. Err.       [95% Conf. Interval]
    -------------+---------------------------------------------------------------
                 |         17    .4117647    .1193646         .184437    .6707528
    
    . cii 18 5, binomial
    
                                                             -- Binomial Exact --
        Variable |        Obs        Mean    Std. Err.       [95% Conf. Interval]
    -------------+---------------------------------------------------------------
                 |         18    .2777778    .1055718        .0969492     .534802
    
    . proportion cancer, over(sex) citype(normal)
    
    Proportion estimation               Number of obs    =      35
    
          _prop_1: cancer = 0
          _prop_2: cancer = 1
    
             Male: sex = Male
           Female: sex = Female
    
    --------------------------------------------------------------
            Over | Proportion   Std. Err.     [95% Conf. Interval]
    -------------+------------------------------------------------
    _prop_1      |
            Male |   .5882353   .1230382      .3381915    .8382791
          Female |   .7222222   .1086325      .5014545      .94299
    -------------+------------------------------------------------
    _prop_2      |
            Male |   .4117647   .1230382      .1617209    .6618085
          Female |   .2777778   .1086325        .05701    .4985455
    --------------------------------------------------------------
    
    . proportion cancer, over(sex) citype(logit)
    
    Proportion estimation               Number of obs    =      35
    
          _prop_1: cancer = 0
          _prop_2: cancer = 1
    
             Male: sex = Male
           Female: sex = Female
    
    --------------------------------------------------------------
            Over | Proportion   Std. Err.     [95% Conf. Interval]
    -------------+------------------------------------------------
    _prop_1      |
            Male |   .5882353   .1230382      .3372332    .8004323
          Female |   .7222222   .1086325      .4638305    .8865478
    -------------+------------------------------------------------
    _prop_2      |
            Male |   .4117647   .1230382      .1995677    .6627668
          Female |   .2777778   .1086325      .1134522    .5361695
    --------------------------------------------------------------

  • #2
    citype(normal) doesn't correspond to exact. That would be citype(exact).

    Comment


    • #3
      Dear Dr.
      proportion would accept either logit or normal as citype. We were given a task to manually create graphs that ciplot does so nicely.
      We were to find proportions and the confidence limits with proportion or cii before twoway graphing scatter and rcaps. Looking at the graph I noticed asymmetric confidence intervals, while ciplot gives perfectly symmetric intervals.
      Regards.

      Comment

      Working...
      X