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

  • How to after test certain characteristics across different sub-groups in a diff-in-diff analysis with multiple interaction terms


    I have a question as to how to run a test in Stata to determine whether a number of subgroups in diff-in-diff regression are different, taken together as one group, relative to another group of subgroups. Let me outline the problem more specifically.

    Let’s say that the investigation is whether men that have been undergoing surgery (group 1) have a higher BMI on average than men that did not (group 0). In doing so, we make a diff-in-diff analysis where group 1 is the treatment group and group 0 is the control group. However, we also want to investigate whether education, race and income group as an effect. Therefore, we have created some additional dummies: 1) a dummy for education (long/short) (1/0) ,2) a dummy for income (high/low) (1/0) and 3) two dummies for three categories of race (American, European and Asian - using American as the reference group).

    We have run the regression in Stata and the output look great. We get the effects of (education, income, race and all the interactions) in relation to the base (being a man that has undergone surgery with short education, low income and from America - dummies = 0/0/0).
    When adding the effects together with the base we get the coefficient for all the different sub groups of which some examples are shown below:

    Short education, low income, American (base)
    High education, low income, American (base + effect of treated + effect of high education)
    High education, high income, American (base +effect of treated + effect of High education + effect of high income)

    High education, low income, Asian (same construction method as above)
    High education, high income, Asian
    Low education, High income, Asian


    How do I test certain characteristics across all groups? As for instance, taking all the subgroups together, I want to say whether high education on average result in significant/insignificant positive/negative change BMI in relation to the control group?

    The regression allows for differences in intercepts and slopes for all variables.

    I hope someone can answer this question.
    Last edited by Joe Sch; 06 Nov 2018, 07:38. Reason: To add tags

  • #2
    I think you want to run the margins command after your regression. Do you want to read that documentation and see if it answers your questions?


    • #3
      Hi Nils
      Thank you for your contribution.
      I will be honest and say as I am just a student, I do not posses high level skills in Stata yet.
      The margins command looks interesting. What I basically need to do is interpret an effect that goes across multiple groups. The literature says that I need to conduct an equality test - but I recon that the margins command is more appropriate as it seem to be rather powerful.


      • #4
        You'll increase your chances of a helpful answer by following the FAQ on asking questions - provide Stata code in code delimiters, readable Stata output, and sample data using dataex.

        Margins with contrasts can do some such tests. Alternatively, look at the documentation for test which will let you test equality of coefficients..