Dear Stata users,
I want the value label (country name) to be the title of the graph, and I use the following code. Unfortunately it does not work. I get invalid syntax error.
Any help is appreciated
Variable "country" takes values 1-10
label list
country:
1 Austria
2 Belarus
3 Switzerland
4 Czech
5 Denmark
6 Germany
7 France
8 Poland
9 Slovakia
10 UK
forval x = 1(1)10 {
local t : label (country) `x' ///
twoway (sc coef species if (zmienna1==1 & country==`x'), lwidth(thick) mcolor(navy) lcolor(navy) connect(direct)) ///
(rcap ci_low ci_up species if (zmienna1==1 & country==`x'), ///
lcolor(maroon)), legend(lab(1 "WTT in km") lab(2 "WTT 95% CI")) ///
title ("`t'") ///
xlabel( 2 "2 species" 3 "3 species" 4 "4 species")
graph save C:\Users\marek\Desktop\mygraph1\c_`x'.gph, replace
}
Thanks
I want the value label (country name) to be the title of the graph, and I use the following code. Unfortunately it does not work. I get invalid syntax error.
Any help is appreciated
Variable "country" takes values 1-10
label list
country:
1 Austria
2 Belarus
3 Switzerland
4 Czech
5 Denmark
6 Germany
7 France
8 Poland
9 Slovakia
10 UK
forval x = 1(1)10 {
local t : label (country) `x' ///
twoway (sc coef species if (zmienna1==1 & country==`x'), lwidth(thick) mcolor(navy) lcolor(navy) connect(direct)) ///
(rcap ci_low ci_up species if (zmienna1==1 & country==`x'), ///
lcolor(maroon)), legend(lab(1 "WTT in km") lab(2 "WTT 95% CI")) ///
title ("`t'") ///
xlabel( 2 "2 species" 3 "3 species" 4 "4 species")
graph save C:\Users\marek\Desktop\mygraph1\c_`x'.gph, replace
}
Thanks
Comment