Announcement

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

  • Wald Test issues on dummy variable

    Hi everyone,

    I'm using Stata 14.2 on Windows 10.
    I'm currently building a multivariate logistic regression on my database. I'd like to test each dummy variables with a Wald test.
    Hence, if I have dummy_variable with categories d1, d2, d3, d4, I'll test "test d1 d2 d3 d4". However, Stata does not find d1.

    What can I do?

    Thanks for your reponse!

  • #2
    Anne-Sophie:
    welcome to this forum.
    What you experienced may be due to the fact that by default Stata omits one level of the categorical variable to avoid the so called dummy trap.
    As per FAQ, to increase your chances of getting helpful replies in the future, please post what you typed and what Stata gave you back. Thanks.
    Kind regards,
    Carlo
    (StataNow 18.5)

    Comment


    • #3
      Welcome to Statalist.

      I agree with everything Carlo says (as is usually the case!) A few things I would add:

      First off, I wouldn't compute the dummies myself; I would use factor variable notation. See -help fvvarlist-

      Second, I often prefer testparm in such situations because the notation is easier. I don't have to worry about what categories got dropped. Something like

      Code:
      webuse nhanes2f, clear
      reg health weight i.race
      testparm i.race
      The last part of the output is

      Code:
      . testparm i.race
      
       ( 1)  2.race = 0
       ( 2)  3.race = 0
      
             F(  2, 10331) =   83.56
                  Prob > F =    0.0000
      -------------------------------------------
      Richard Williams, Notre Dame Dept of Sociology
      StataNow Version: 18.5 MP (2 processor)

      EMAIL: [email protected]
      WWW: https://www3.nd.edu/~rwilliam

      Comment

      Working...
      X