直接标价法
insheet using task.txt,clear
outsheet using xrate.txt,replace comma
drop if year==.
drop v*
reshape long usd, i(year) j(country) string
为什么要转成long的,我觉得wide更方便画图看趋势:
rename usd xrate
replace country=upper(country)
reshape wide xrate, i(year) j(country) string
line xrate* year, ///
scheme(s2mono) xline(2008) ///
plotregion(style(none) fcolor(white) margin(0)) ///
graphregion(fcolor(white)) ///
xlabel(2000(2)2011) ///
legend(cols(1) ring(0) position(11) )