Dear Stata users
I am using the following code to produce a coefplot graph in loop.
However, I want to put each value of i from the loop as xlabels. But if I do like xlabel(0(25)400, labsize(small)), it does not work. Can anyone give any suggestion?
Regards,
Zariab Hossain
I am using the following code to produce a coefplot graph in loop.
Code:
forvalues i= 0(25)400 {
preserve
keep if Fstat>`i'
egen total = total(non_trad_ref40), by(predCW25 B_kontor1 y d25)
egen count = count(non_trad_ref40), by(predCW25 B_kontor1 y d25)
gen LOM_nontrad_ref25_y`i' = (total - non_trad_ref40)/(count - 1)
drop count total
keep if !missing(LOM_nontrad_ref25_y`i')
bys persid start (referal_date): gen nvals=_n==1
keep if nvals==1
drop nvals
eststo FS_`i': reghdfe non_trad_ref40 LOM_nontrad_ref25_y`i', absorb(B_kontor1#y#d25) cluster(B_kontor1)
restore
}
grstyle init
grstyle set plain, dot horizontal grid
coefplot FS_*, vertical drop(_cons) ciopts(recast(rcap)) mlabel format(%9.2g) mlabposition(1) title("Regressing non-traditional referral dummy on Predicted CW's LOM", size(small)) xtitle(F-Stat Offices) xlabel(, labsize(small)) ylabel(, labsize(small)) ylabel(0(.05)0.35) ytitle(Predicted Beta with CI) swapnames leg(off)
Regards,
Zariab Hossain
