-
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.
Showing
3 changed files
with
83 additions
and
9 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
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
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,60 @@ | ||
** Unit test | ||
clear | ||
set seed 1 | ||
set obs 2000 | ||
gen ivar = _n | ||
gen gvar = runiformint(3,6) | ||
replace gvar = 0 if runiform()<.2 | ||
gen x1 = runiform() | ||
xtile dx=x1, n(2) | ||
expand 10 | ||
bysort ivar:gen tvar = _n | ||
gen te = 1*(t>=(g-1) )*(g!=0) | ||
gen y = (rnormal()) + te | ||
|
||
** installation | ||
capture program drop _all | ||
net install jwdid, from(C:\Users\Fernando\Documents\GitHub\stpackages\) replace | ||
** Run | ||
cd "C:\Users\Fernando\Documents\GitHub\stpackages\jwdid" | ||
|
||
|
||
jwdid y , ivar(ivar) tvar(tvar) gvar(gvar) anti(3) | ||
estat event, predict(xb) | ||
estat plot | ||
estat group, predict(xb) | ||
estat plot | ||
estat calendar, predict(xb) | ||
estat plot | ||
estat simple, over(dx) predict(xb) | ||
estat plot | ||
|
||
jwdid y , tvar(tvar) gvar(gvar) | ||
estat event, predict(xb) | ||
estat plot | ||
estat group, predict(xb) | ||
estat plot | ||
estat calendar, predict(xb) | ||
estat plot | ||
estat simple, over(dx) predict(xb) | ||
estat plot | ||
|
||
jwdid y , ivar(ivar) tvar(tvar) gvar(gvar) never | ||
estat event, predict(xb) | ||
estat plot | ||
estat group, predict(xb) | ||
estat plot | ||
estat calendar, predict(xb) | ||
estat plot | ||
estat simple, over(dx) predict(xb) | ||
estat plot | ||
|
||
jwdid y x1, tvar(tvar) gvar(gvar) never cluster(ivar) | ||
estat event, pretrend | ||
estat plot | ||
estat group | ||
estat plot | ||
estat calendar | ||
estat plot | ||
estat simple, over(dx) | ||
estat plot |