Skip to content

Commit

Permalink
#7 compare offset
Browse files Browse the repository at this point in the history
  • Loading branch information
Constantino-Carreto-Romero committed Dec 7, 2022
1 parent 79405d6 commit cee8738
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions issue7/compare offset.do
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
**********************issue7 plot multiple models: examples to check implementation *****************************

***** install the branch version
*net install xtevent, from("https://raw.githubusercontent.com/JMSLab/xtevent/issue7_plot_several_models_together") replace

****** load example dataset
use "https://github.com/JMSLab/xtevent/blob/main/test/example31.dta?raw=true", clear
xtset i t

***************************** one model **************************************
xtevent y x, panelvar(i) timevar(t) policyvar(z) window(5)overidpost(2)
xteventplot

************************ test offset for multiple models **************************************

*model 1
xtevent y, panelvar(i) timevar(t) policyvar(z) window(5)
estimates store model1
*model 2
xtevent y eta, panelvar(i) timevar(t) policyvar(z) window(5)
estimates store model2
*model 3
xtevent y eta x, panelvar(i) timevar(t) policyvar(z) window(5) nofe
estimates store model3
*plot 3 models
xteventplot model1 model2 model3

*model 4
xtevent y eta x, panelvar(i) timevar(t) policyvar(z) window(5) note
estimates store model4
*model 5
xtevent y eta x, panelvar(i) timevar(t) policyvar(z) window(5) nofe note
estimates store model5
*model 6
xtevent y eta x, panelvar(i) timevar(t) policyvar(z) window(5) reghdfe
estimates store model6
*plot 6 models
xteventplot model1 model2 model3 model4 model5 model6

0 comments on commit cee8738

Please sign in to comment.