JMSLab / xtevent

Stata package -xtevent-
MIT License
43 stars 12 forks source link

`impute(instag)`only imputing missing policyvar values for cases when treatment changes within unit #181

Closed jorpppp closed 3 months ago

jorpppp commented 3 months ago

impute(instag)is only imputing inner missing values of the policy variable if it changes for the unit, e.g. if the treatment sequence is 0 0 . 0 1 1 imputation changes it to 0 0 0 0 1 1 but if the treatment sequence is 0 0 0 . 0 0 impute(instag) returns an error message of inconsistency with staggered adoption and does not impute. We would like imputation to change the sequence to all zeros in this case.

jorpppp commented 3 months ago

Summary: In this issue we changed the way we check if treatment is constant for units that do not have the same value of treatment in the first and last observation for each unit. After changing this check, impute(instag) performs as expected.