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. 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 diff --git a/img/header.png b/docs/img/header.png similarity index 100% rename from img/header.png rename to docs/img/header.png diff --git a/img/img1.svg b/docs/img/img1.svg similarity index 100% rename from img/img1.svg rename to docs/img/img1.svg diff --git a/img/img2a.svg b/docs/img/img2a.svg similarity index 100% rename from img/img2a.svg rename to docs/img/img2a.svg diff --git a/img/img2b.svg b/docs/img/img2b.svg similarity index 100% rename from img/img2b.svg rename to docs/img/img2b.svg diff --git a/img/img3.svg b/docs/img/img3.svg similarity index 100% rename from img/img3.svg rename to docs/img/img3.svg diff --git a/img/img4.svg b/docs/img/img4.svg similarity index 100% rename from img/img4.svg rename to docs/img/img4.svg diff --git a/img/img4a.svg b/docs/img/img4a.svg similarity index 100% rename from img/img4a.svg rename to docs/img/img4a.svg diff --git a/img/img5.svg b/docs/img/img5.svg similarity index 100% rename from img/img5.svg rename to docs/img/img5.svg diff --git a/img/img5a.svg b/docs/img/img5a.svg similarity index 100% rename from img/img5a.svg rename to docs/img/img5a.svg diff --git a/docs/about.md b/docs/index.md similarity index 93% rename from docs/about.md rename to docs/index.md index 6b98a357..f2172719 100644 --- a/docs/about.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 @@ -101,4 +110,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 + diff --git a/esplot.ado b/esplot.ado index d22d2a94..456527fa 100644 --- a/esplot.ado +++ b/esplot.ado @@ -751,73 +751,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 diff --git a/examples.do b/examples.do index fb600d06..3148cfd0 100644 --- a/examples.do +++ b/examples.do @@ -3,7 +3,7 @@ rename idn id encode id, gen(idn) -cap: mkdir docs +cap: mkdir docs cap: mkdir docs/img global esplot_nolog 1 @@ -49,4 +49,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