Announcement

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

  • factor and time series variable not allowed in ivregdhfe cluster

    Hi all,

    I'm trying to instrument a fixed effect model with variable Z, I'm using ivregdhfe from SSC
    The code I'm using is:


    Code:
    ivreghdfe Y (X= Z), absorb(i.state#i.occupation i.state#i.year i.occupation#i.year) vce(cluster i.occupation#i.state) first
    The error I get is:

    Code:
    (MWFE estimator converged in 29 iterations)
    factor-variable and time-series operators not allowed
    I try to run the command without cluster, and it executed succesfully so I suppose the problem is with cluster(). My occupation variable takes 400+ values, my state variable takes 47 values. How should I cluster at occupation-state level then?

    Thank you!
    Last edited by Chengmou Lei; 20 Aug 2024, 02:19.

  • #2
    Hi all,

    I found out what I can do, recode a group id for state-occupation combination, and put it in cluster()

    Comment

    Working...
    X