Announcement

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

  • Placebo test

    Hello!

    I am doing a project with a loan dataset from 2000 to 2005. I am trying to look at how a state stagged implemented policy could influce the loan amount. I am doing DID regression at loan level.
    variable did=post*treat
    Here is my regression code: reghdfe lg_amount did controls, absorb(state_fips county_fips year) vce(cluster county_fips)

    Now, I need to set up a placebo test. I first tried permute like this: permute did beta = _b[did], reps(500) seed(123) saving("simulation_amt.dta", replace): reghdfe lg_amount did controls, absorb(state_fips county_fips year) vce(cluster county_fips)
    but then I realized that this set up is randomly assign did at year*loan level

    Because the policy is state level, I am want to how to set up the code to make the did randomly assign among different year and state level.

    Any help would be appreciated! Thanks!

  • #2
    is the treatment applied to all treated units in the same year?

    Comment

    Working...
    X