Time Varying Covariate #111
Replies: 5 comments
-
@bcallaway11: I agree with (i), in most cases I'm wary of controlling for covariates that change after treatment, in case there is some effect of the treatment operating through the covariates. In that case, I wouldn't want to control for the change. But I'm thinking of a situation where you may have a treatment that could not affect the covariate. For instance, let's say I wanted to determine the effect of a nation-wide, county-level apprenticeship program for persons with disabilities. The program probably doesn't affect regional unemployment rates, but changes to the regional economy (unemployment rates) could affect the unemployment rate of persons with disabilities. I could mistake changes associated with the regional labor market with the impacts of the program. In this case, it may be useful to control for the change in regional unemployment, in case counties tended to adopt the program during times of economic expansion. To your point (ii), I'm wondering if, within this example, controlling for changes also "seems awkward," or if you think there is a different solution within your current framework. To add on to your proposal: I would second allowing the user to specify both types of controls for covariates--both changes and the (base period) level. May also be useful to allow controls for changes AND percent changes. |
Beta Was this translation helpful? Give feedback.
-
Yeah, this is really interesting I think. I totally agree with you that there are lots of cases where the treatment wouldn't effect the covariates. I also think you have a good example about the unemployment rate. In that example, we would currently just control for pre-treatment unemployment rates. What seems weird to me about only controlling for the change in unemployment rates is that regions whose unemployment rate went from, say, 9%-7% could serve as comparison units for regions that went from 3%-1%. That said, I think you could make a strong case that it would make sense to control for both the pre-treatment level and the change over time. I don't really think that there is a big conceptual hurdle to implementing this either. It would just amount to allowing users to include \Delta X as a covariate (not manually, but us doing this behind the scenes if they say that they want this). I'm leaning towards implementing this, but I'll probably need some time.... |
Beta Was this translation helpful? Give feedback.
-
Sounds good. Do you think a good UX would be two separate x formulas? I'd offer to help, but I'm not sure how localized the change would be, or if it would require changing many functions. The biggest difficulty I foresee is that this new X, "delta X", would have to be defined at the time of estimation, since it depends on g and t. So its not like you can just define new Xs and carry them around business as usual. |
Beta Was this translation helpful? Give feedback.
-
Yes, getting the right interface might require some thought. I'm not dead-set on this, but I'm kind of disinclined to have a second x formula for time varying covariates. Perhaps we could add an extra argument called
I think the only place where the code would need to be adjusted is here. At that line, Some more things that are worth thinking about though:
|
Beta Was this translation helpful? Give feedback.
-
Can I ask a follow-up question on the time-varying covariates? I’m considering including some time-varying covariates specific to the year of the treatment (year 0) to include in the X formula. The idea is that covariates in year 0 (the year of the treatment) wouldn’t be affected by the treatment yet, but they might have specific trends that could confound the effect of the treatment on outcomes. In order to do this, I created a set of covariates specific to year 0 and treated them as time-invariant. Since did package only allows for control in the base period (in this case year -1), would the above approach be feasible for IPW within the package to take into account the covariates in year 0? Those covariates in year 0 may also predict the treatment status. |
Beta Was this translation helpful? Give feedback.
-
We should think some about adding options related to time-varying covariates.
From @jtorcasso #71, which I think is a representative example:
Current Functionality
We would take the covariates from the base period for both the treated group and the untreated group. So, in the above example, we would condition on pre-treatment unemployment levels in different zip codes. In my view, this is probably better than traditional regression DID's because (i) it probably allows for some forms of the treatment affecting the covariates, and (ii) it more obviously compares zip codes with similar unemployment rates (in particular, regressions probably either are comparing locations with the same change in unemployment (which seems awkward) or are likely to be much more highly dependent on the functional form being correctly specified).
That being said...
It is at least worth thinking about allowing the user some control over this. I think that it would be medium-difficult to implement allowing the user to decide if they want to condition on something like (i) pre-treatment covariates, (ii) changes in covariates over time, or (iii) both.
I'm open to any feedback/user-comments on how useful this would be. Thoughts @jtorcasso, @pedrohcgs?
Beta Was this translation helpful? Give feedback.
All reactions