Announcement

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

  • Testing equality of specific coefficients for different subsamples of regressions

    Hello everyone,

    I would like to test whether the coefficients of my explanatory variables differ significantly by gender. Since I am including pweight, I cannot use the suest command. I follow this approach: https://www.stata.com/support/faqs/s...cs/chow-tests/

    My regression is formed as follows: X are my 3 explanatory variables (binary), C are my control variables.

    Code:
    Regress Y X1 X2 X3 C1 C2 C3 if FEMALE =1
    Regress Y X1 X2 X3 C1 C2 C3 if MALE =1
    Now I generate interactions:

    Code:
    Gen FEM_X1=FEMALE*X1
    Gen FEM_X2=FEMALE*X2
    Gen FEM_X3=FEMALE*X3
    Gen MALE_X1=MALE*X1
    Gen MALE_X2=MALE*X2
    Gen MALE_X3=MALE*X3
    And finally I include everything in one regression

    Code:
    regress Y FEMALE FEM_X1 FEM_X2 FEM_X3 MALE MALE_X1 MALE_X2 MALE_ X3 C1 C2 C3 [pweight = EXTRID], noconstant
    And I test, whether coefficients are equal
    Code:
    test _b[FEM_X1]=_b[MALE_X1]
    test _b[FEM_X2]=_b[MALE_X2]
    test _b[FEM_X3]=_b[MALE_X3]
    Is this approach correct? Do I include all interactions in the same equation and also the gender variables (FEMALE and MALE)? And there is no interaction for the control variables needed?

    And does anyone have literature to this method? I cannot find anything.

    Best regards and thank you
    Anja
    Last edited by Anja Siegert; 13 Aug 2024, 09:12.

  • #2
    you could drop MALE and include a constant (male becomes the constant).

    you can avoid creating a bunch of variables this way:

    reg Y female i.female#(c.X1 c.X2 c.X3 c.C1 c.C2 c.C3) [pw = EXTRID]

    Code:
    sysuse auto, clear
    reg mpg foreign i.foreign#(c.weight c.turn) [pw=displacement]
    lincom 0.foreign#c.weight - 1.foreign#c.weight
    lincom 0.foreign#c.turn - 1.foreign#c.turn

    Comment

    Working...
    X