Announcement

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

  • regress est sto esttab - Adding F-test-p-values within possible?

    Dear friends,
    let me provide an example:

    input str8 dealdate int dealyear byte(revenue2001 revenue2002 revenue2003 revenue2004 revenue2005) "1/1/2002" 2002 20 30 40 50 60 "8/1/2003" 2003 50 60 70 80 90 "5/1/2001" 2001 5 6 7 8 9 end

    Assume I create a regression output on this hypothetical set:

    reg revenue2005 revenue2002
    est sto test
    esttab test, star(* 0.1 ** 0.05 *** 0.01 **** 0.001) r2 ar2 p label scalar(F)

    Using "scalar(F)", I only obtain the F-statistics value. However, I would like to add the corresponding p-value for the f-test, ideally below the f-statistics value. I there a way to add it? Thank you for your time.

    Regards, Ibo
    Last edited by Ibrahim Uskar; 15 Mar 2018, 10:19.

  • #2
    Code:
    reg revenue2005 revenue2002
    est sto test
    qui testparm*
    estadd scalar p_value = r(p)
    esttab test, star(* 0.1 ** 0.05 *** 0.01 **** 0.001) r2 ar2 p label scalar(F p_value)

    Comment


    • #3
      Thanks Andrew, works perfectly!

      Comment


      • #4
        Dear Andrew Musau what if i wanted to output F-test results?

        for example i run the following regression:

        Code:
        sysuse auto, clear
        
        regress price displacement mpg rep78
        
        test mpg = rep78
        Is it possible to show this in a table form? Where col 1 gives mpg coefficient, col2 gives rep78 coefficient and col 3 gives the f-test p-value? A table format that can be exported to latex as well?

        Comment


        • #5
          Originally posted by Fahad Mirza View Post

          Is it possible to show this in a table form? Where col 1 gives mpg coefficient, col2 gives rep78 coefficient and col 3 gives the f-test p-value?

          Look at approach #2: Flip models and coefficients (place models in rows instead of in columns)

          Originally posted by Fahad Mirza View Post
          A table format that can be exported to latex as well?

          For a latex table, just include the -tex- option.

          Comment


          • #6
            Thank you Andrew Musau will have a look

            Comment

            Working...
            X