Announcement

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

  • Sample Size using mcnemar test for two dependent binomial populations

    Hi Statalist users


    I need your help in estimating the sample size for an interventional study where the baseline employment rate is 43%. An intervention is to plan and anticipate that 30% improvement in the employment rate so expected employment rate would be around 56% (43*30%). I have used the following command in Stata




    power pairedproportions 0.43 0.56, corr(0.8)




    but getting error
    the resulting discordant proportions p12 and p21 must be between 0 and 1

    Any help will be highly appreciated.


    Thanks
    Ashish







  • #2
    why are you using a correlation of .8? it will work with a smaller corr:
    Code:
    . power pairedproportions 0.43 0.56, corr(0.5)
    
    Performing iteration ...
    
    Estimated sample size for a two-sample paired-proportions test
    Large-sample McNemar's test
    H0: p+1 = p1+  versus  Ha: p+1 != p1+
    
    Study parameters:
    
            alpha =    0.0500
            power =    0.8000
            delta =    0.1300  (difference)
              p1+ =    0.4300
              p+1 =    0.5600
             corr =    0.5000
    
    Estimated sample size:
    
                N =       120
    added: just to be clear: I did not believe that a corr of .8 and the proportions you present are possible - and neither does Stata; the .5 is arbitrary for the example
    Last edited by Rich Goldstein; 08 Jun 2022, 09:36.

    Comment


    • #3
      Originally posted by Rich Goldstein View Post
      why are you using a correlation of .8? it will work with a smaller corr:
      Code:
      . power pairedproportions 0.43 0.56, corr(0.5)
      
      Performing iteration ...
      
      Estimated sample size for a two-sample paired-proportions test
      Large-sample McNemar's test
      H0: p+1 = p1+ versus Ha: p+1 != p1+
      
      Study parameters:
      
      alpha = 0.0500
      power = 0.8000
      delta = 0.1300 (difference)
      p1+ = 0.4300
      p+1 = 0.5600
      corr = 0.5000
      
      Estimated sample size:
      
      N = 120
      added: just to be clear: I did not believe that a corr of .8 and the proportions you present are possible - and neither does Stata; the .5 is arbitrary for the example
      Can you make me understand why correlation 0.8 is not possible?by the way it is arbitrary

      Some online calculator for sample size is working with this

      Comment


      • #4
        just on reading your post, I could not see an easy way to have that much difference in proportions with that high a correlation; for a mathematical explanation; see equation 1 in the methods and formulas section of the write-up in the manual for power paired proportions

        I can't comment on "some online calculator" without, at least, a url

        Comment


        • #5
          Originally posted by Rich Goldstein View Post
          just on reading your post, I could not see an easy way to have that much difference in proportions with that high a correlation; for a mathematical explanation; see equation 1 in the methods and formulas section of the write-up in the manual for power paired proportions

          I can't comment on "some online calculator" without, at least, a url
          For your reference
          https://statulator.com/SampleSize/ss2PP.html

          Comment


          • #6
            Originally posted by Ashish Bandhu View Post
            As an aside, I could not reproduce the calculations made by that tool, nor find reference to the specific method being used. I would not trust any such statistical tool that did not openly and clearly tell you the underlying method being used and/or point to a credible reference.

            Comment


            • #7
              as with Leonardo Guizzetti , the only cites I could find at this site were to the site itself - I would not trust such a site

              Comment

              Working...
              X