Der All, I have the following code for graphs
Code:
quietly rdplot lpop1994 X, graph_options(ytitle("Population (log)") xlabel(-100(50)100)legend(off) saving("log\pop", replace))
quietly rdplot partycount X, graph_options(ytitle("Number of Parties Receiving Votes") xlabel(-100(50)100) legend(off) saving("log\party", replace))
quietly rdplot vshr_islam1994 X, graph_options(ytitle("Islamic Vote Percentage") xlabel(-100(50)100) legend(off) saving("log\ivote", replace))
I wonder if I can have a loop for the same purpose, i.e.,
Code:
label var lpop1994 "Population (log)"
label var partycount "Number of Parties Receiving Votes"
label var vshr_islam1994 "Islamic Vote Percentage"

foreach v of varlist lpop1994 partycount vshr_islam1994 i89 merkezp merkezi {
    quietly rdplot `v' X, graph_options(ytitle("???") xlabel(-100(50)100)legend(off) saving("log\`v'", replace))
}
where ytitle("???") is replaced by the label of `v'?