Announcement

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

  • Control Groups in STATA

    Hi Everybody,
    I hope you all are doing well. This might be a stupid question for you guys but I am genuinely lost at the moment. So I am working as an RA and one of my tasks is to make control groups in STATA. So I am not sure what to do.

    I will describe the data for you guys now. There's one variable which has a unique number for every person from 1 to 10 million. Then there is another variable that has the value 1 if the individual is ever suspected of domestic violence and 0 otherwise. Now I need to match 5 innocent people for every one suspect. How do I do this? Is it even possible? I have tried to find a way to do this but I just can't so I thought I should try asking here.

    Many thanks!

  • #2
    what are you matching on?

    Comment


    • #3
      Might try this. Need to check that you get 5 matches per treated unit. Can also play with the cem command to set bins, etc, to get more matches.

      Code:
      g controls = 0
      forv i = 1/5 {
          cem x1 x2 if controls==0, tr(treat) k2k
          replace controls = 1 if cem_matched==1 & treat==0
      }
      It will take some time given such a large database.

      Comment

      Working...
      X