From 641a7961332bdda8f530bfdeb6776f1c18001f48 Mon Sep 17 00:00:00 2001 From: Dylan Balla-Elliott Date: Tue, 7 Jan 2020 19:17:26 -0500 Subject: [PATCH 1/8] Rename about.md to Index.md --- docs/{about.md => Index.md} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename docs/{about.md => Index.md} (99%) diff --git a/docs/about.md b/docs/Index.md similarity index 99% rename from docs/about.md rename to docs/Index.md index 6b98a357..fb434d16 100644 --- a/docs/about.md +++ b/docs/Index.md @@ -101,4 +101,4 @@ Even more fun things still to come! More graphical options; bounds on attrition. [↩](#a1 "Back") Since -20 and 30 are not evenly divisible by 3, `esplot` effectively truncates the window to [-18,30]. - \ No newline at end of file + From a37eabfa5df7a862fd8106f51429dcb2ddadfc4d Mon Sep 17 00:00:00 2001 From: Dylan Balla-Elliott Date: Tue, 7 Jan 2020 19:38:49 -0500 Subject: [PATCH 2/8] Rename Index.md to index.md --- docs/{Index.md => index.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename docs/{Index.md => index.md} (100%) diff --git a/docs/Index.md b/docs/index.md similarity index 100% rename from docs/Index.md rename to docs/index.md From c834d5eb714600f4642906a9abb4eb82d6567f30 Mon Sep 17 00:00:00 2001 From: Dylan Date: Tue, 7 Jan 2020 19:41:34 -0500 Subject: [PATCH 3/8] update directory structure for new site and README --- examples.do | 6 +- img/img1.svg | 551 -------------------------------------------------- img/img2a.svg | 207 ------------------- img/img2b.svg | 91 --------- img/img3.svg | 85 -------- img/img4.svg | 249 ----------------------- img/img4a.svg | 315 ----------------------------- img/img5.svg | 249 ----------------------- img/img5a.svg | 251 ----------------------- 9 files changed, 4 insertions(+), 2000 deletions(-) delete mode 100644 img/img1.svg delete mode 100644 img/img2a.svg delete mode 100644 img/img2b.svg delete mode 100644 img/img3.svg delete mode 100644 img/img4.svg delete mode 100644 img/img4a.svg delete mode 100644 img/img5.svg delete mode 100644 img/img5a.svg diff --git a/examples.do b/examples.do index 186d976f..be5744be 100644 --- a/examples.do +++ b/examples.do @@ -3,7 +3,9 @@ rename idn id encode id, gen(idn) -cap: mkdir img +cap: mkdir docs +cap: mkdir docs/img + global esplot_nolog 1 /* LABEL */ @@ -46,4 +48,4 @@ graph export img/img5.svg, replace esplot paygrade, by(male) event(to_male_mgr, nogen) compare(to_fem_mgr, nogen) window(-30 30) period_length(3) vce(cluster idn mgr_id) estimate_reference -graph export img/img5a.svg, replace \ No newline at end of file +graph export img/img5a.svg, replace diff --git a/img/img1.svg b/img/img1.svg deleted file mode 100644 index d9e33491..00000000 --- a/img/img1.svg +++ /dev/null @@ -1,551 +0,0 @@ - - - - - Stata Graph - Graph - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -1 - - 0 - - 1 - - 2 - - - -20 - - -10 - - 0 - - 10 - - 20 - - 30 - x - - - - - - - Female  - Male  - diff --git a/img/img2a.svg b/img/img2a.svg deleted file mode 100644 index 9c14aea0..00000000 --- a/img/img2a.svg +++ /dev/null @@ -1,207 +0,0 @@ - - - - - Stata Graph - Graph - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -1 - - 0 - - 1 - - 2 - - - -5 - - 0 - - 5 - - 10 - x - - - - - - - Female  - Male  - diff --git a/img/img2b.svg b/img/img2b.svg deleted file mode 100644 index 8afcfd60..00000000 --- a/img/img2b.svg +++ /dev/null @@ -1,91 +0,0 @@ - - - - - Stata Graph - Graph - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -1 - - -.5 - - 0 - - .5 - - 1 - - - -2 - - -1 - - 0 - - 1 - - 2 - x - - - - - - - Female  - Male  - diff --git a/img/img3.svg b/img/img3.svg deleted file mode 100644 index cd4902aa..00000000 --- a/img/img3.svg +++ /dev/null @@ -1,85 +0,0 @@ - - - - - Stata Graph - Graph - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -1 - - -.5 - - 0 - - .5 - - 1 - - - -1 - - 0 - - 1 - - 2 - x - - - - - - - Female  - Male  - diff --git a/img/img4.svg b/img/img4.svg deleted file mode 100644 index 1398bfa4..00000000 --- a/img/img4.svg +++ /dev/null @@ -1,249 +0,0 @@ - - - - - Stata Graph - Graph - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.5 - - 0 - - .5 - - 1 - - - -10 - - -5 - - 0 - - 5 - - 10 - x - - - - - - - Female  - Male  - diff --git a/img/img4a.svg b/img/img4a.svg deleted file mode 100644 index 8af56050..00000000 --- a/img/img4a.svg +++ /dev/null @@ -1,315 +0,0 @@ - - - - - Stata Graph - Graph - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.5 - - 0 - - .5 - - 1 - - - -10 - - -5 - - 0 - - 5 - - 10 - x - - - - - Female  - Male  - diff --git a/img/img5.svg b/img/img5.svg deleted file mode 100644 index 6e300ffa..00000000 --- a/img/img5.svg +++ /dev/null @@ -1,249 +0,0 @@ - - - - - Stata Graph - Graph - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.5 - - 0 - - .5 - - 1 - - - -10 - - -5 - - 0 - - 5 - - 10 - x - - - - - - - Female  - Male  - diff --git a/img/img5a.svg b/img/img5a.svg deleted file mode 100644 index 382e4b97..00000000 --- a/img/img5a.svg +++ /dev/null @@ -1,251 +0,0 @@ - - - - - Stata Graph - Graph - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -2 - - -1 - - 0 - - 1 - - 2 - - - -10 - - -5 - - 0 - - 5 - - 10 - x - - - - - - - Female  - Male  - From c15fb1e1a68cbc0d7316e10b41b0e227c9f89523 Mon Sep 17 00:00:00 2001 From: Dylan Date: Tue, 7 Jan 2020 19:42:27 -0500 Subject: [PATCH 4/8] update example figs --- docs/img/img1.svg | 551 +++++++++++++++++++++++++++++++++++++++++++++ docs/img/img2a.svg | 207 +++++++++++++++++ docs/img/img2b.svg | 91 ++++++++ docs/img/img3.svg | 85 +++++++ docs/img/img4.svg | 249 ++++++++++++++++++++ docs/img/img4a.svg | 315 ++++++++++++++++++++++++++ docs/img/img5.svg | 249 ++++++++++++++++++++ docs/img/img5a.svg | 251 +++++++++++++++++++++ 8 files changed, 1998 insertions(+) create mode 100644 docs/img/img1.svg create mode 100644 docs/img/img2a.svg create mode 100644 docs/img/img2b.svg create mode 100644 docs/img/img3.svg create mode 100644 docs/img/img4.svg create mode 100644 docs/img/img4a.svg create mode 100644 docs/img/img5.svg create mode 100644 docs/img/img5a.svg diff --git a/docs/img/img1.svg b/docs/img/img1.svg new file mode 100644 index 00000000..d9e33491 --- /dev/null +++ b/docs/img/img1.svg @@ -0,0 +1,551 @@ + + + + + Stata Graph - Graph + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1 + + 0 + + 1 + + 2 + + + -20 + + -10 + + 0 + + 10 + + 20 + + 30 + x + + + + + + + Female  + Male  + diff --git a/docs/img/img2a.svg b/docs/img/img2a.svg new file mode 100644 index 00000000..9c14aea0 --- /dev/null +++ b/docs/img/img2a.svg @@ -0,0 +1,207 @@ + + + + + Stata Graph - Graph + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1 + + 0 + + 1 + + 2 + + + -5 + + 0 + + 5 + + 10 + x + + + + + + + Female  + Male  + diff --git a/docs/img/img2b.svg b/docs/img/img2b.svg new file mode 100644 index 00000000..8afcfd60 --- /dev/null +++ b/docs/img/img2b.svg @@ -0,0 +1,91 @@ + + + + + Stata Graph - Graph + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1 + + -.5 + + 0 + + .5 + + 1 + + + -2 + + -1 + + 0 + + 1 + + 2 + x + + + + + + + Female  + Male  + diff --git a/docs/img/img3.svg b/docs/img/img3.svg new file mode 100644 index 00000000..cd4902aa --- /dev/null +++ b/docs/img/img3.svg @@ -0,0 +1,85 @@ + + + + + Stata Graph - Graph + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1 + + -.5 + + 0 + + .5 + + 1 + + + -1 + + 0 + + 1 + + 2 + x + + + + + + + Female  + Male  + diff --git a/docs/img/img4.svg b/docs/img/img4.svg new file mode 100644 index 00000000..1398bfa4 --- /dev/null +++ b/docs/img/img4.svg @@ -0,0 +1,249 @@ + + + + + Stata Graph - Graph + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -.5 + + 0 + + .5 + + 1 + + + -10 + + -5 + + 0 + + 5 + + 10 + x + + + + + + + Female  + Male  + diff --git a/docs/img/img4a.svg b/docs/img/img4a.svg new file mode 100644 index 00000000..8af56050 --- /dev/null +++ b/docs/img/img4a.svg @@ -0,0 +1,315 @@ + + + + + Stata Graph - Graph + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -.5 + + 0 + + .5 + + 1 + + + -10 + + -5 + + 0 + + 5 + + 10 + x + + + + + Female  + Male  + diff --git a/docs/img/img5.svg b/docs/img/img5.svg new file mode 100644 index 00000000..6e300ffa --- /dev/null +++ b/docs/img/img5.svg @@ -0,0 +1,249 @@ + + + + + Stata Graph - Graph + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -.5 + + 0 + + .5 + + 1 + + + -10 + + -5 + + 0 + + 5 + + 10 + x + + + + + + + Female  + Male  + diff --git a/docs/img/img5a.svg b/docs/img/img5a.svg new file mode 100644 index 00000000..382e4b97 --- /dev/null +++ b/docs/img/img5a.svg @@ -0,0 +1,251 @@ + + + + + Stata Graph - Graph + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2 + + -1 + + 0 + + 1 + + 2 + + + -10 + + -5 + + 0 + + 5 + + 10 + x + + + + + + + Female  + Male  + From 903175b8c3c1556755488f3dc3e6b6ad6e807200 Mon Sep 17 00:00:00 2001 From: Dylan Balla-Elliott Date: Tue, 7 Jan 2020 19:46:52 -0500 Subject: [PATCH 5/8] Set theme jekyll-theme-minimal --- docs/_config.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 docs/_config.yml diff --git a/docs/_config.yml b/docs/_config.yml new file mode 100644 index 00000000..2f7efbea --- /dev/null +++ b/docs/_config.yml @@ -0,0 +1 @@ +theme: jekyll-theme-minimal \ No newline at end of file From 9f0abd58aaf739706f94dd90e5a8c33e9346bd7e Mon Sep 17 00:00:00 2001 From: Dylan Date: Tue, 7 Jan 2020 19:54:43 -0500 Subject: [PATCH 6/8] explicitly say we play nice with schemes --- docs/index.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/docs/index.md b/docs/index.md index fb434d16..f2172719 100644 --- a/docs/index.md +++ b/docs/index.md @@ -47,13 +47,21 @@ The argument `period_length` takes an integer and allows users to smooth individ For example, we could have instead typed -`esplot paygrade, by(male) event(to_male_mgr) window(-20 30) period_length(3)` +```stata +set scheme s1rcolor +esplot paygrade, by(male) event(to_male_mgr) \\\ +window(-20 30) period_length(3) +``` ![Example Figure](img/img2a.svg "Example Figure") or -`esplot paygrade, by(male) event(to_male_mgr) window(-24 30) period_length(12)` +```stata +set scheme s1color +esplot paygrade, by(male) event(to_male_mgr) \\\ +window(-24 30) period_length(12) +``` ![Example Figure](img/img2b.svg "Example Figure") @@ -61,6 +69,7 @@ Since the underlying time periods are months, when we set period length to 3, we **The estimate for t=0 is never smoothed, and is always only the event indicator,** i.e. exactly the estimate of the passed event indicator. +As you may have inferred from the examples above, when the `colors` option is not specified, `esplot` defers to the settings of the current scheme. ### Confidence Interval and Estimate Display Options From f3b4ae872b3511001c934d5209394fc858f71351 Mon Sep 17 00:00:00 2001 From: Dylan Date: Tue, 7 Jan 2020 19:54:54 -0500 Subject: [PATCH 7/8] remove old comments --- esplot.ado | 70 ------------------------------------------------------ 1 file changed, 70 deletions(-) diff --git a/esplot.ado b/esplot.ado index 9e1c8eda..75c848ae 100644 --- a/esplot.ado +++ b/esplot.ado @@ -748,73 +748,3 @@ program check_omitted_events, rclass end include log_program.ado -/* -capture program drop log_program -program log_program - -syntax anything(name=program id="command" everything) , [depth(integer 1)] -/* -log_program takes in program call and runs it "noisily", -saving output to the log directory - -program() should recieve a command as it would be typed interactively. -*/ - -tokenize `program', parse(" ,") -local prog_name "`1'" -#delimit ; -local skip_progs -impose_only_male lincom_quarter -add_stars get_event_properties -check_omitted_events load_ES_macros; -#delimit cr - -local timer_name -timer list -if !strpos("`skip_progs'","`prog_name'"){ - forval t = 1/100 { - if "`r(t`t')'" == "" { //if timer is empty - local timer_name `t' - continue, break - } - } -} - -if "`timer_name'" != "" timer on `timer_name' - -cap: log close `prog_name' - -set trace on -set tracedepth 1 - -log using "logs/v$VERSION/`prog_name'.log", name(`prog_name') replace - -tokenize `: subinstr local program "," "|" ', parse("|") -if "`3'" != "" `1', `3' -else `1' - -if "`timer_name'" == "" { - di "Could not time program, perhaps all timers all full. If the list has entries [1,100] try typing timer clear and running again" - timer list -} -else { - timer off `timer_name' - quietly: timer list `timer_name' - - if "`r(t`timer_name')'" != "" { - local seconds = `r(t`timer_name')' - local hours = floor(`seconds'/3600) - local mins = floor(mod(`seconds',3600)/60) - local sec = round(mod(`seconds', 60)) - *--------------------------------------------------------------------------- - ******************************TIMER RESULTS********************************* - *--------------------------------------------------------------------------- - di "took `hours':`mins':`sec' to run `prog_name'" - } -} - - -log close `prog_name' -set trace off - -end \ No newline at end of file From babfa06797884e22436e15881e71f40613e0e4d3 Mon Sep 17 00:00:00 2001 From: Dylan Balla-Elliott Date: Thu, 9 Jan 2020 18:29:59 -0500 Subject: [PATCH 8/8] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e5c21611..f46c7fe7 100644 --- a/README.md +++ b/README.md @@ -14,4 +14,4 @@ Event study plots are increasingly popular in applied research. `esplot` is a ne See [site](https://dballaelliott.github.io/esplot) for introduction and overview. -*Coming soon* : Type `help esplot` after installation for internal documentation. +*In Progress* : Type `help esplot` after installation for internal documentation.