Announcement

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

  • Running an OLS estimation on different subsamples

    Hello everyone

    I want to check if my normal regression results are valid and to do that, I want to check if a certain subsample (in this case long term unemployed people) gives me a similar result. So I created a dummy variable for long term unemployed people and a dummy variable for people who are regulary employed (which is supposed to by my reference group). How can I run this estimation in Stata? Which command should I use for this? I thinks it is called a difference-in-differences analysis but I am really not sure about the correct terms. So hopefully you will understand what I mean.

    Thank you for you help in advance

    Florian

  • #2
    You are more likely to get a helpful response here if you show the original regression code. You will need to introduce an interaction between your long-term unemployed indicator ("dummy") variable and the other predictors in your model. The syntax for doing this can be found by running -help fvvarlist- and reading through it. If you don't see how to apply that in your situation, post back showing the original regression command. (Note: You do not need two separate dummy variables for contrasting groups. You just need a single variable that is 1 in one subgroup and 0 in all other observations.)

    Comment


    • #3
      Thank you. I will post my regression command if I have further problems.

      But if i want to compare long-term unemployed and employed people I have to "ignore" people that a unemployed for example just two months. If I just use one binary varibale (1 for "long term unemployed" and 0 for "other") than the "two-months unemployed" people would be part of the "other" group, right?

      Comment


      • #4
        You appear to be changing your goal here. You originally said, in #1:
        I want to check if my normal regression results are valid and to do that, I want to check if a certain subsample (in this case long term unemployed people) gives me a similar result.
        If that remains your purpose, then the only indicator you need is a variable that is 1 for long term unemployed people and 0 for everybody else. For this purpose, people who are unemployed for two months are simply "not long term unemployed" and belong to the reference group.

        If your purpose has changed, and you now want to contrast three different sets of results: long term unemployed, unemployed two months, and not unemployed, then you need a new variable with 3 levels. Set it to 0 for those not unemployed, 1 for those unemployed two months, and 2 for those long term unemployed. Then use that variable, with an i. prefix in your interaction model. (Stata will translate that into two "virtual" indicator variables for you.)


        Comment


        • #5
          All right, thanks for your help

          Comment


          • #6
            Okay, I need some more help.

            I generated a variable for the long-termin unemployed status
            Code:
            gen LongTermUnemployed = 2 if TimeUnemployed >= 12 & WorkStatus== 12
            replace LongTermUnemployed = 1 if TimeUnemployed < 12 & WorkStatus== 12
            replace LongTermUnemployed = 0 if WorkStatus~= 12
            So 2 means he is long-term unemployed, 1 means short-term unemployed and 0 means employed. WorkStatus == 12 means he/she is currently unemployed

            I use this regression command to the the differenct impacts these groups have on their happiness

            Code:
            reg happy i.LongTermUnemployed
            Stata only gives me values for group 1 and 2 and seem to ignore 0. I assume this means, that 0 is the reference group, right? And the value for 2 and 1 is the impact the two groups have compared to the reference group.

            Now i want to include other control variables like education and income into the regression. I tried something like
            Code:
            reg happy i.LongTermUnemployed##education i.LongTermUnemployed#c.income
            Does this seem to be right???
            Last edited by Florian Berger; 20 Apr 2018, 08:02.

            Comment

            Working...
            X