hello dear all,
I wan to change the title of my charts in the loop.
with this"
but when I add this line of the code instead of the "`x" in title, it shows all of them as a title foe each of them without removing one country.
I appreciate any comments you can provide to me.
best regards,
Khati111_mygraph.gph
I wan to change the title of my charts in the loop.
Code:
foreach x in 111 112 122 124 128 132 134 136 137 138 142 144 146 156 158 172 174 176 178 182 184 193 196 542 935 936{ foreach v in l_emp_r { forvalues i=0/6{ reghdfe `v'_`i' l(0/2)ldeps_new l(1/2)`v' if ifscode!=`x' , absorb(i.NUTS2_ID i.year) vce( cluster NUTS2_ID) lincom ldeps_new, level(90) replace bh_`v' = r(estimate)*sd_sh*100 if _n == `i'+2 replace seh_`v' = r(se) if _n == `i'+2 replace up90h_`v' = (r(estimate) + 1.645*seh_`v')*sd_sh*100 if _n == `i'+2 replace dn90h_`v' = (r(estimate) - 1.645*seh_`v')*sd_sh*100 if _n == `i'+2 } **** chart qui: twoway rarea dn90h_`v' up90h_`v' horizon if horizon <7 , color(gs10) xlabel(-1 (1) 6) || /// line bh_`v' horizon if horizon <7 , lcolor(blue) lpattern(solid) lwidth(medthick) xscale(range(-1 ) titleg(1)) || /// line a horizon if horizon <7, lpattern(dash) lwidth(vthin) lcolor(gs0) /// title("`v'", color(black) size(medium)) /// ytitle("Change in regional employment (%)" , size(medsmall)) xtitle("Years after Policy Shock", size(medsmall)) /// graphregion(color(white)) plotregion(color(white)) /// legend(off) /// title(" `x''") graph save `x'_mygraph, replace } }
Code:
title(111 "USA" 112 "GBR" 122 "AUT" 124 "BEL" 128 "DNK" 132 "FRA" 134 "DEU" 136 "" ITA "" 137 "LUX" 138 "NLD" 142 "NOR" 144"SWE" 146"CHE"156"CAN"158"JPN"172"FIN"174"GRC"176"ISL"178"IRL"182"PRT"184"ESP"193"AUS"196"NZL"542"KOR"935"CZE"936"CZK")
I appreciate any comments you can provide to me.
best regards,
Khati111_mygraph.gph
Comment