Hi,
I wanted to know if there is a way to create coefplots using a loop. The loop keeps replacing the graph and ends up showing the last graph. Is there a way to put a local condition and make it run?
I wanted to know if there is a way to create coefplots using a loop. The loop keeps replacing the graph and ends up showing the last graph. Is there a way to put a local condition and make it run?
Code:
global controls age agesq i.caste urban i.household_expenditure_quintile i.education
foreach v of varlist contraceptive_use ideal_children AIDS_Knowledge {
qui areg `v' interaction $controls [pweight=WT], absorb(HHID) vce(cl HHID)
coefplot, keep(interaction age agesq *.caste urban) xline(0) xlab(, nogrid) grid(none)
}

Comment