-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
impute(instag)
only imputing missing policyvar values for cases when treatment changes within unit
#181
Labels
bug
Something isn't working
Comments
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, |
jorpppp
added a commit
that referenced
this issue
Apr 20, 2024
jorpppp
added a commit
that referenced
this issue
Apr 20, 2024
jorpppp
added a commit
that referenced
this issue
May 7, 2024
…nd allow automatic generation (#185) * #179 Create cohort_consistency.do * #179 Add consistency checks between cohort, control_cohort, and policyvar, add basic cohort variable creation * #179 Change cohort, control_cohort to string in xtevent * #179 Add bin and no reversion returns to _eventgenvars plus changes from #181 * #179 Enable saving created cohort variable * #179 Automatic generation of control_cohort * #179 Update help file * #179 Modify test file * #179 Delete issue folder * #179 #185 Generate cohort in sample that ignores missings in control vars * #179 #185 Add checks for existing cohort variables * #179 #185 SA and proxy not allowed * #179 #185 Fix bug in naming saved interaction variables * #179 #185 Fix sorting bug when creating cohorts in repeatedcs setting
jorpppp
added a commit
that referenced
this issue
May 14, 2024
* #181 Fix check for constant treatment value and add returns (#182) * 186 error when normalizing 0 coefficient (#187) * #186 Fix bug when normalizing to 0 or positive * #186 Propagate the fix to _eventiv * PR for #170: let the window option choose a window range (#178) * #170 bring changes from main * #170 implement finding max or balanced window * #170 examples to test implementation * #170 add examples to test file * #170 change window description and add example in help file * #170 wording of calculated-window message * #170 modify description of left and right window * #170 wording of window limits * #170 wording of calculated-window message * #170 check for zero words in window * #170 rearrange parsewindow checks * #170 wording of window-parser error messges * #170 add to help file example about maximum window * #170 conflict with static * "#170 revert previous commit" This reverts commit c6d98aa. * #170 parse window only when it is non-empty * #170 window in cmdline parser * #170 Delete issue170 special directory * #170 wording of string window message * #170 let max or balanced only if impute is specified * #170 wording of error message * #170 restructure checks for staggered adoption * #170 restructure for IV case * #170 informative window message and error message for balanced * "#170 revert previous commit" This reverts commit fc197a9. * #170 informative window message and error message for balanced * #170 paragraph for max balanced * #170 check trend outside window for max and balanced * #170 remove comment * #170 trend specification if window is max or balanced * #170 clear message about treatment time * #170 check leads in proxyiv are in estimation window * #170 wording of message about calculated window * #178 Minor change to calculated window message * #170 mark non-missing obs in varlist * #170 examples to test implementation * #170 pass marker and revert syntax of eventgenvars * #170 Add marked sample to variables to keep when repeatedcs * #170 Delete issue170 directory * #178 Edits to helpfile --------- Co-authored-by: jorpppp <jorpppp@gmail.com> * PR for #179 Check behavior of the cohort and control_cohort options and allow automatic generation (#185) * #179 Create cohort_consistency.do * #179 Add consistency checks between cohort, control_cohort, and policyvar, add basic cohort variable creation * #179 Change cohort, control_cohort to string in xtevent * #179 Add bin and no reversion returns to _eventgenvars plus changes from #181 * #179 Enable saving created cohort variable * #179 Automatic generation of control_cohort * #179 Update help file * #179 Modify test file * #179 Delete issue folder * #179 #185 Generate cohort in sample that ignores missings in control vars * #179 #185 Add checks for existing cohort variables * #179 #185 SA and proxy not allowed * #179 #185 Fix bug in naming saved interaction variables * #179 #185 Fix sorting bug when creating cohorts in repeatedcs setting * PR for: #189 pre and post coefficients excluding omitted ones (#190) * #189 pre and post coefficients excluding omitted ones * #189 #190 enable diff avg in _eventiv * #189 #190 exclude endpoints from diffavg when trend is active --------- Co-authored-by: jorpppp <jorpppp@gmail.com> * 188 left window of zero returns an error (#194) * #188 ordering when there are not pre-event dummies * #188 ordering the left endpoint * #188 Do not test for pretrends for plot if left window is zero * #188 #194 Disable smoothest path if left window * PR for: #189 pre and post coefficients excluding omitted ones (#190) (#195) * #189 pre and post coefficients excluding omitted ones * #189 #190 enable diff avg in _eventiv * #189 #190 exclude endpoints from diffavg when trend is active --------- Co-authored-by: Constantino Carreto Romero <carretoromeroc@gmail.com> * #188 #194 Fix error messages for diffavg when windows are zero * #188 #194 Fix lead selection and normalization when left window is zero or when many coefs are normalized * #188 #194 Recheck that lead instrument is in estimation window when it is changed because normalizations coincide * #188 #194 Do not test linear pretrend if too few pre-event coefs --------- Co-authored-by: Constantino Carreto Romero <carretoromeroc@gmail.com> --------- Co-authored-by: Constantino Carreto Romero <carretoromeroc@gmail.com>
This was referenced May 14, 2024
Merged
jorpppp
added a commit
that referenced
this issue
May 14, 2024
* Bring #177 up to date again (#198) * #181 Fix check for constant treatment value and add returns (#182) * 186 error when normalizing 0 coefficient (#187) * #186 Fix bug when normalizing to 0 or positive * #186 Propagate the fix to _eventiv * PR for #170: let the window option choose a window range (#178) * #170 bring changes from main * #170 implement finding max or balanced window * #170 examples to test implementation * #170 add examples to test file * #170 change window description and add example in help file * #170 wording of calculated-window message * #170 modify description of left and right window * #170 wording of window limits * #170 wording of calculated-window message * #170 check for zero words in window * #170 rearrange parsewindow checks * #170 wording of window-parser error messges * #170 add to help file example about maximum window * #170 conflict with static * "#170 revert previous commit" This reverts commit c6d98aa. * #170 parse window only when it is non-empty * #170 window in cmdline parser * #170 Delete issue170 special directory * #170 wording of string window message * #170 let max or balanced only if impute is specified * #170 wording of error message * #170 restructure checks for staggered adoption * #170 restructure for IV case * #170 informative window message and error message for balanced * "#170 revert previous commit" This reverts commit fc197a9. * #170 informative window message and error message for balanced * #170 paragraph for max balanced * #170 check trend outside window for max and balanced * #170 remove comment * #170 trend specification if window is max or balanced * #170 clear message about treatment time * #170 check leads in proxyiv are in estimation window * #170 wording of message about calculated window * #178 Minor change to calculated window message * #170 mark non-missing obs in varlist * #170 examples to test implementation * #170 pass marker and revert syntax of eventgenvars * #170 Add marked sample to variables to keep when repeatedcs * #170 Delete issue170 directory * #178 Edits to helpfile --------- Co-authored-by: jorpppp <jorpppp@gmail.com> * PR for #179 Check behavior of the cohort and control_cohort options and allow automatic generation (#185) * #179 Create cohort_consistency.do * #179 Add consistency checks between cohort, control_cohort, and policyvar, add basic cohort variable creation * #179 Change cohort, control_cohort to string in xtevent * #179 Add bin and no reversion returns to _eventgenvars plus changes from #181 * #179 Enable saving created cohort variable * #179 Automatic generation of control_cohort * #179 Update help file * #179 Modify test file * #179 Delete issue folder * #179 #185 Generate cohort in sample that ignores missings in control vars * #179 #185 Add checks for existing cohort variables * #179 #185 SA and proxy not allowed * #179 #185 Fix bug in naming saved interaction variables * #179 #185 Fix sorting bug when creating cohorts in repeatedcs setting * PR for: #189 pre and post coefficients excluding omitted ones (#190) * #189 pre and post coefficients excluding omitted ones * #189 #190 enable diff avg in _eventiv * #189 #190 exclude endpoints from diffavg when trend is active --------- Co-authored-by: jorpppp <jorpppp@gmail.com> * 188 left window of zero returns an error (#194) * #188 ordering when there are not pre-event dummies * #188 ordering the left endpoint * #188 Do not test for pretrends for plot if left window is zero * #188 #194 Disable smoothest path if left window * PR for: #189 pre and post coefficients excluding omitted ones (#190) (#195) * #189 pre and post coefficients excluding omitted ones * #189 #190 enable diff avg in _eventiv * #189 #190 exclude endpoints from diffavg when trend is active --------- Co-authored-by: Constantino Carreto Romero <carretoromeroc@gmail.com> * #188 #194 Fix error messages for diffavg when windows are zero * #188 #194 Fix lead selection and normalization when left window is zero or when many coefs are normalized * #188 #194 Recheck that lead instrument is in estimation window when it is changed because normalizations coincide * #188 #194 Do not test linear pretrend if too few pre-event coefs --------- Co-authored-by: Constantino Carreto Romero <carretoromeroc@gmail.com> --------- Co-authored-by: Constantino Carreto Romero <carretoromeroc@gmail.com> * Delete issue177 directory * Revert "Delete issue177 directory" This reverts commit 5c18688. * Revert "Bring #177 up to date again (#198)" This reverts commit 50b9efc. --------- Co-authored-by: Constantino Carreto Romero <carretoromeroc@gmail.com>
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.The text was updated successfully, but these errors were encountered: