Announcement

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

  • Regression for subgroups and comparing the coeffients for different groups.

    Dear All,

    I am new to Stata .

    I have the regression below.

    Code:
    reg lnearnings mother age education occupation jobtenure jobintensity i.yearsurvey
    I have merged cross-sectional data and I am trying to measure the effect of motherhood on the earnings of women. I also wish to analyze if motherhood penalty was deeper than others for some occupation or education level or group. I have checked the forum but I couldnt find exactly I want. My objective variable here that I wanna see group differences is independent variable mother. Here how should I make Stata to provide me the mother coefficient changes for different education status?

    I tried to run the regression by groups but I believe it is not the right strategy.
    Code:
    by education: reg lnearnings mother age education occupation jobtenure jobintensity i.yearsurvey
    Thanks in advance.

  • #2
    Assuming that the education variable is categorical, you can do this:
    Code:
    reg lnearnings i.mother##i.education age occupation jobtenure jobintensity i.yearsurvey
    margins education, dydx(mother)
    The output of the -margins- command will show you the effect of motherhood on lnearnings ("motherhood penalty") in each level of the education variable, adjusted for the other variables in your model.

    To understand what this code is doing, see -help fvvarlist-, and the excellent Richard Williams' https://www3.nd.edu/~rwilliam/stats/Margins01.pdf.

    Comment


    • #3
      Dear Clyde,

      Thanks a lot .

      Comment

      Working...
      X