Announcement

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

  • Partialing out multiple regressors (Frisch-Waugh Lovell Theorem) and reghdfe command

    Dear All,

    I want to run a generalized diff-in-diff regression that exploits time variation in state adoption of a policy to estimates the impact of the policy change on an outcome. Due to exogenous reasons there are significant state-specific time trends that vary over time in the outcome variables.The equation I want to estimate that allows for these state specific time trends is:
    y_st = B x policy_st + X+ i.state + i.year + i.state#(c.year c.yearsq) error

    Where X is a matrix of exogenous state level regressors. I have learnt that inclusion of state-specific linear and quadratic trends is problematic for 2 reasons - (1) overfitting and (2) in presence of dynamic treatment effects. An example of a study that discusses this is

    https://www.nber.org/papers/w25018

    Question 1

    A proposed solution is to partial out the linear and quadratic trends using the Frisch-Waugh Lovell type projection matrices. But I am unsure how to proceed with this. Should I run
    Step 1: Residualize i.state#c.year
    reg policy_st i.state#c.year
    predict resid_policy_st, res




    Or should I also include X+ i.state + i.year here?

    Then, how do I sequentially partial out
    i.state#c.year #c.year ?



    Question 2

    I read that the command reghdfe actually does this exact thing. So I could run:

    reghdfe y_st policy_st X i.state i.year, absorb(i.state#(c.year c.yearsq))

    Is that correct?

    I will be gateful for your input.
    Sincerely,
    Sumedha
    Last edited by Sumedha Gupta; 09 May 2019, 05:25.

  • #2
    You'll increase your chances of a useful answer by following the FAQ on asking questions - provide Stata code in code delimiters, readable Stata output and sample data using dataex. Also, remember most of use are not from your ears - we don't necessarily follow NBER working papers, or know what the Frisch-Waugh Lovell type projection matrix means. If you want help, explain your problem simply in your post.

    The output of reghdfe depends on your panel definition which I didn't see in your post. It is very different whether you treat year as an indicator or continuous variable. Also, if all you're worried about is year and state, it is just as easy to use xtreg with state as the panel and include i.year on the rhs. xtreg being Stata provided may work better with other parts of Stata than user written reghdfe.

    Comment

    Working...
    X