Hello,
I am trying to create a graph that looks similar to the attached:
the code is
twoway scatteri 0 201308 2000000000 201308 2000000000 201506 0 201506, recast(area) color(gs12) || scatteri 0 201801 2000000000 201801 2000000000 201803 0 201803, recast(area) color(gs12) || line gsp ym if importer == "US" , ytitle(U.S. Imports under GSP Program) legend(order(1 "Expirations") pos(11)) ylabel(#5) xtitle(Year&Month) subtitle(U.S. Imports under GSP Program)
However, there is a problem because I think STATA is counting ym literally by one (from 201201, 201202,... 201212, 201213 , 201214,... ), while the data only spans from 201201 to 201212, and then from 201301 to 201312, and so on. This is strange because in my dta file, the ym only has up to Decembers. (201213, 201214, 201215 etc do not exist).
Could someone help me with how to deal with this kind of situation?
Thanks,
Soyoung
I am trying to create a graph that looks similar to the attached:
the code is
twoway scatteri 0 201308 2000000000 201308 2000000000 201506 0 201506, recast(area) color(gs12) || scatteri 0 201801 2000000000 201801 2000000000 201803 0 201803, recast(area) color(gs12) || line gsp ym if importer == "US" , ytitle(U.S. Imports under GSP Program) legend(order(1 "Expirations") pos(11)) ylabel(#5) xtitle(Year&Month) subtitle(U.S. Imports under GSP Program)
However, there is a problem because I think STATA is counting ym literally by one (from 201201, 201202,... 201212, 201213 , 201214,... ), while the data only spans from 201201 to 201212, and then from 201301 to 201312, and so on. This is strange because in my dta file, the ym only has up to Decembers. (201213, 201214, 201215 etc do not exist).
Could someone help me with how to deal with this kind of situation?
Thanks,
Soyoung
Comment