Announcement

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

  • Two-sample tests using Wilson confidence intervals

    Is there a way that I can use the two-sample tests of proportion (prtest) using wilson confidence intervals? Is there another command for this?

    Thanks!

  • #2
    I just typed
    Code:
    search wilson confidence intervals
    and this is the result I found.
    Code:
    . search wilson confidence intervals
    
    Keyword search
    
            Keywords:  wilson confidence intervals
              Search:  (1) Official help files, FAQs, Examples, SJs, and STBs
    
    Search of official help files, FAQs, Examples, SJs, and STBs
    
    
    [R]     ci  . . . . .  Confidence intervals for means, proportions, and counts
            (help ci)
    
    STB-52  sg119 . . . . . Improved confidence intervals for binomial proportions
            (help propci, propcii if installed) . . . . . . . . . .  J. R. Gleason
            11/99   pp.16--18; STB Reprints Vol 9, pp.208--211
            adaptation of ci (and cii) providing three alternative
            endpoint-adjusted methods (enhanced Wald, Wilson, and
            enhanced arcsine) for computing confidence intervals
    Just click on the package to see if this what you are looking for.

    Comment


    • #3
      Not quite. I looked at the command and what it gives are confidence intervals. What I am looking for is the p-value that compares two binary proportions, but using wilson confidence intervals instead of the standard CI intervals. This is the original command, but not what I want:


      Code:
      prtest fluoros1 if Salmonella==2, by(dates)
      
      Two-sample test of proportions                     1: Number of obs =      109
                                                         2: Number of obs =      267
      ------------------------------------------------------------------------------
          Variable |       Mean   Std. Err.      z    P>|z|     [95% Conf. Interval]
      -------------+----------------------------------------------------------------
                 1 |   .1100917   .0299804                      .0513313    .1688522
                 2 |   .2771536   .0273922                      .2234657    .3308414
      -------------+----------------------------------------------------------------
              diff |  -.1670618   .0406098                     -.2466556   -.0874681
                   |  under Ho:   .0477403    -3.50   0.000
      ------------------------------------------------------------------------------
              diff = prop(1) - prop(2)                                  z =  -3.4994
          Ho: diff = 0
      
          Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
       Pr(Z < z) = 0.0002         Pr(|Z| < |z|) = 0.0005          Pr(Z > z) = 0.9998
      The bold parts are what I'm interested in. Hope this makes sense!

      Thanks, NM
      Last edited by Nestor Mojica; 09 Sep 2015, 21:30.

      Comment

      Working...
      X