Announcement

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

  • how to set the p-vlaues after regression to one-tailed test?

    After using regress, I want to output the p-values, I want to use two-tailed tests for controls and one-tailed tests for indepedent variables, how to output the two kinds of p-values quickly?
    I know reg2docx, however, the output for p-values are always two-tailed.
    Last edited by Fred Lee; 12 Jul 2021, 09:58.

  • #2
    it is not clear where you are going with this but see the following FAQ: https://www.stata.com/support/faqs/s...nts/index.html

    Comment


    • #3
      Originally posted by Rich Goldstein View Post
      it is not clear where you are going with this but see the following FAQ: https://www.stata.com/support/faqs/s...nts/index.html
      Thank you, Rich!
      I know we can test one-tailed tests one by one using your guidance link.
      However, I want to output the pvalues of one-tailed tests rather than just doing the analyses.
      More specificaly,
      Code:
      sysuse auto
      reg price foreign length
      est store m1
      reg2docx m1  using "result.docx"
      The code above will output the coefficient and pvalues of two-tailed tests, however, I want to out put p-values of one-tailed tests for foreign and p-values of two-tailed tests for lenth.
      Last edited by Fred Lee; 12 Jul 2021, 17:49.

      Comment


      • #4
        -reg2docx- is a user written command, and when you read the help file you see that it does not have an option for reporting one sided p-values.

        Originally posted by Fred Lee View Post

        Thank you, Rich!
        I know we can test one-tailed tests one by one using your guidance link.
        However, I want to output the pvalues of one-tailed tests rather than just doing the analyses.
        More specificaly,
        Code:
        sysuse auto
        reg price foreign length
        est store m1
        reg2docx m1 using "result.docx"
        The code above will output the coefficient and pvalues of two-tailed tests, however, I want to out put p-values of one-tailed tests for foreign and p-values of two-tailed tests for lenth.

        Comment


        • #5
          Originally posted by Joro Kolev View Post
          -reg2docx- is a user written command, and when you read the help file you see that it does not have an option for reporting one sided p-values.


          Thanks Joro! No, it didn't. I used "reg2docx" as an example, I want to know wheher there is a command that can report one sided p-values.

          Comment


          • #6
            One-sided p-values are usually not appropriate. Anyway, one-sided p-values are simply obtained by dividing the two-sided p-value by 2 (and subtracting the result from 1 if the sign has the opposite direction of your one-sided hypotheses).

            Comment


            • #7
              Originally posted by daniel klein View Post
              One-sided p-values are usually not appropriate. Anyway, one-sided p-values are simply obtained by dividing the two-sided p-value by 2 (and subtracting the result from 1 if the sign has the opposite direction of your one-sided hypotheses).
              Yes, in our research field, sometimes we can use one-sided p-values, I want to report it in a quick and convenient way.

              Comment


              • #8
                To my knowledge there is no package that exports automatically one sided p-values.

                Originally posted by Fred Lee View Post

                Thanks Joro! No, it didn't. I used "reg2docx" as an example, I want to know wheher there is a command that can report one sided p-values.

                Comment


                • #9
                  Originally posted by Joro Kolev View Post
                  To my knowledge there is no package that exports automatically one sided p-values.


                  Thank you!

                  Comment

                  Working...
                  X