-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
79405d6
commit cee8738
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |