Maarten buis and Davide Cantoni:
Note you do not need to destroy the data in memory to do this:
sysuse nlsw88, clear
gen ln_w = ln(wage)
recode grade 0/5=6
tab grade, gen(lev)
foreach lev of varlist lev* {
gen unionX`lev' = union*`lev'
}
drop lev1
reg ln_w lev* unionX* tenure ttl_exp
g g=_n+5 in 1/13
la var g "Grade completed"
g b=.
g se=.
forv i=1/13 {
replace b=_b[unionXlev`i'] in `i'
replace se=_se[unionXlev`i'] in `i'
}
gen lb = b-invttail(`e(df_r)', .025)*se
gen ub = b+invttail(`e(df_r)', .025)*se
la var b "Point Estimate"
la var lb "Lower"
la var ub "Upper bound of CI"
tw rcap lb ub g ||sc b g, yline(0)
On Jan 17, 2008 9:47 AM, Maarten buis <[email protected]> wrote:
> --- Davide Cantoni <[email protected]> wrote:
> > I am looking for an elegant way to plot the regression coefficients
> > (including their 95% confidence interval) that result from a
> > regression on the interactions of a treatment indicator and time.
> > Ultimately, I have some coefficients for the "treatment effect" in
> > every period of time, and I would like to plot their evolution.
>
> *------------------ begin example -----------------
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/