Announcement

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

  • Binomial proportion test Immediate Command for two sample

    Hi Everyone,

    How can I perform two small proportion test with immediate command in state 15 similar to a large two-sample proportion test prtesti ?

    Thanks

    Ashish

  • #2
    I think I should put in wishlist for stata 18, what do you think

    Comment


    • #3
      see -tabi- which is the immediate form of tabulate, and also has an option for Fisher’s exact test.

      Comment


      • #4
        Originally posted by Ashish Bandhu View Post
        How can I perform two small proportion test with immediate command in state 15 similar to a large two-sample proportion test prtesti ?
        Why not use -prtest-? It'll give you a lower bound of the p-value, more or less, and that might be good enough for whatever you're interested in. If p-value that you get is too close for comfort to some kind of decision boundary, then perhaps you can use simulation with your sample-size under the null hypothesis (and perhaps across a range of common population parameter) in order to see just how badly you're being misled.

        Originally posted by Ashish Bandhu View Post
        I think I should put in wishlist for stata 18, what do you think
        At the risk of sounding cynical, I'd hate to encourage StataCorp's developers to work on a small-sample test for two independent proportions that might have the unintended consequence of encouraging opportunistic NHSTing performed ad hoc on convenience datasets not gathered for—and nowhere-near powered for—the purpose they're being put to.

        Comment


        • #5
          protest is used for large sample and for dataset in the memory. I asked for immediate command like prtesti for two sample but using the sample size and proportion.

          Comment


          • #6
            Sorry, let me correct that: Why not use -prtesti-?

            The rest follows unchanged.

            Comment


            • #7

              TE=Joseph Coveney;n1656353]Sorry, let me correct that: Why not use -prtesti-?

              The rest follows unchanged.[/QUOTE]

              You mean to say I should us prtesti, however, I read somewhere that prtesti is used for large sample not small sample.

              Also if prtest/prtesti is applicable to both small/large sample proportion test then why there is bitest in stata? Please help me to understand.
              Last edited by Ashish Bandhu; 27 Mar 2022, 02:56.

              Comment


              • #8
                OK, if you want to perform a test of the equality of proportions in small samples, and you want to use the test in immediate mode (entering the integers of the four cells of the 2 × 2 table), then you can go online here.

                I used that online resource to cross-check results for correctness when I was developing a Stata command for unconditional exact tests of the fourfold table. (It's actually not all that difficult to write Mata code for Boschloo's test and for the Berger and Boos confidence interval approach. I have the user-written command, but no help file. It wouldn't help in your case, because it and the backend Mata code below it in the ado-file are written in a more a recent version of Stata.)

                Your version of Stata (Release 15) is too old to take advantage of it, but there are also SciPy functions for Barnard's test and Boschloo's test that should be accessible from within Stata via its Python integration feature.

                Comment


                • #9
                  Originally posted by Joseph Coveney View Post
                  OK, if you want to perform a test of the equality of proportions in small samples, and you want to use the test in immediate mode (entering the integers of the four cells of the 2 × 2 table), then you can go online here.

                  I used that online resource to cross-check results for correctness when I was developing a Stata command for unconditional exact tests of the fourfold table. (It's actually not all that difficult to write Mata code for Boschloo's test and for the Berger and Boos confidence interval approach. I have the user-written command, but no help file. It wouldn't help in your case, because it and the backend Mata code below it in the ado-file are written in a more a recent version of Stata.)

                  Your version of Stata (Release 15) is too old to take advantage of it, but there are also SciPy functions for Barnard's test and Boschloo's test that should be accessible from within Stata via its Python integration feature.
                  Thank you so much for detail explanation.
                  Ashish

                  Comment

                  Working...
                  X