Hello.

I am trying to generate graphs from some variables. I do not have all possible combinations of v iv p s. I want Stata to generate graphs with all combinations I have but without stopping and returning error.

This is the code I am using:

foreach v in bi y fi w ti {
foreach s in qe nqe {
foreach pi in t3m t6m t1y t2y t3y t5y t7y t10y {
foreach iv in ed1 ed2 ed3 ed4 ff1 ff2 ff3 ff4 mp1 mp2 mp3 mp4 pc1 {
qui: twoway (rarea min_`v'_`pi'_`iv'_`s'_68 max_`v'_`pi'_`iv'_`s'_68 horizon , pstyle(ci)) ///
(line max_`v'_`pi'_`iv'_`s'_90 horizon, lcolor(black) lpattern(dash) lstyle(ci) ) ///
(line min_`v'_`pi'_`iv'_`s'_90 horizon, lcolor(black) lpattern(dash) lstyle(ci) ) ///
(line b_`v'_`pi'_`iv'_`s'_90 horizon, lcolor(red) lpattern(solid)), ///
title("`v'", color(black) size(medium)) ///
ytitle("Percent", size(medsmall)) xtitle("Horizon", size(medsmall)) ///
graphregion(color(white)) plotregion(color(white)) ///
legend(off) ///
title("GK shocks: `v'_`pi'_`iv'_`s'")
graph save "C:\****\irf_`pi'_`iv'_`v'_`s'.gph", replace
}
}
}
}


Thank you for your help.