Dear prof and colleagues,
I am going to plot this graph with three variables:
1- year (2010-2020)
2-shr_immg
3-expgr
I used these codes, but it keeps saying "parentheses do not balance". Could you please assist me to find what I am missing?? Thanks.
Cheers,
Paris
I am going to plot this graph with three variables:
1- year (2010-2020)
2-shr_immg
3-expgr
I used these codes, but it keeps saying "parentheses do not balance". Could you please assist me to find what I am missing?? Thanks.
Code:
twoway (line shr_immg expgr if year==2010 & sk_rat==1, lcolor(gs10)) /// (line shr_immg expgr if year==2011 & sk_rat==1, lcolor(black) lpat(dash_3dot)) /// (line shr_immg expgr if year==2012 & sk_rat==1, lcolor(gs7) lpat(vshortdash)) /// (line shr_immg expgr if year==2013 & sk_rat==1, lcolor(black) lpat(dot)) /// (line shr_immg expgr if year==2014 & sk_rat==1, lcolor(black) lpat(dash)) /// (line shr_immg expgr if year==2015 & sk_rat==1, lcolor(black) lpat(solid)) /// (line shr_immg expgr if year==2016 & sk_rat==1, lcolor(black) lpat(vshortdash)) /// (line shr_immg expgr if year==2017 & sk_rat==1, lcolor(gs10) lpat(dash)) /// (line shr_immg expgr if year==2018 & sk_rat==1, lcolor(black) lpat(dash)) /// (line shr_immg expgr if year==2019 & sk_rat==1, lcolor(black) lpat(solid)) /// (line shr_immg expgr if year==2020 & sk_rat==1, lcolor(black) lpat(vshortdash)),legend(label(1 "2010") /// label(2 "2011") label(3 "2012") label(4 "2013") label(5 "2014") label(6 "2015") label(7 "2016")label(8 "2017")label(9 "2018")label(10 "2019")abel(11 "2020")cols(11)) ylab(,nogrid) /// ti("Panel A: 1st Quartile", size(medium) color(black)) xti("Years of Experience", size(medium)) /// yti("Immigrant Share") graphr(ic(white) ifc(white) ilc(white) fcolor(white) lcolor(white)) ///
Code:
* Example generated by -dataex-. For more info, type help dataex clear input double year float(shr_immg expgr) 2010 .06171435 2.5 2011 .05453846 2.5 2012 .0449036 2.5 2013 .04390729 2.5 2014 .03895496 2.5 2015 .03910635 2.5 2016 .04279581 2.5 2017 .04302535 2.5 2018 .063071 2.5 2019 .0894574 2.5 2020 .10602682 2.5 2010 .08200432 2.5 2011 .0773884 2.5 2012 .07025904 2.5 2013 .06849734 2.5 2014 .06925854 2.5 2015 .07755903 2.5 2016 .07361327 2.5 2017 .0811235 2.5 2018 .09596717 2.5 2019 .1220758 2.5 2020 .11485728 2.5 2010 .06260721 2.5 2011 .06052116 2.5 2012 .05774609 2.5 2013 .05200341 2.5 2014 .04920107 2.5 2015 .04890267 2.5 2016 .0518006 2.5 2017 .05483922 2.5 2018 .069535 2.5 2019 .09092128 2.5 2020 .08955224 2.5 2010 .0205613 2.5 2011 .02385999 2.5 2012 .02410142 2.5 2013 .02806499 2.5 2014 .033377003 2.5 2015 .03494056 2.5 2016 .05138873 2.5 2017 .05860748 2.5 2018 .067040175 2.5 2019 .07334909 2.5 2020 .07404434 2.5 2010 .06755392 7.5 2011 .06247599 7.5 2012 .05508118 7.5 2013 .05292348 7.5 2014 .05155229 7.5 2015 .05364485 7.5 2016 .06471722 7.5 2017 .07110058 7.5 2018 .08763703 7.5 2019 .12339999 7.5 2020 .1540426 7.5 2010 .08372635 7.5 2011 .08705437 7.5 2012 .07872606 7.5 2013 .0759871 7.5 2014 .08105429 7.5 2015 .08917474 7.5 2016 .09663171 7.5 2017 .10516166 7.5 2018 .12653647 7.5 2019 .16030076 7.5 2020 .16280566 7.5 2010 .0598473 7.5 2011 .06322471 7.5 2012 .05262017 7.5 2013 .05562126 7.5 2014 .05653569 7.5 2015 .06050209 7.5 2016 .06544687 7.5 2017 .07047031 7.5 2018 .08401076 7.5 2019 .108907 7.5 2020 .10477254 7.5 2010 .021303535 7.5 2011 .02407722 7.5 2012 .02414379 7.5 2013 .02639147 7.5 2014 .03146543 7.5 2015 .03624856 7.5 2016 .04605805 7.5 2017 .05516027 7.5 2018 .066012345 7.5 2019 .0809857 7.5 2020 .09259596 7.5 2010 .0877129 12.5 2011 .07381125 12.5 2012 .05937796 12.5 2013 .05513486 12.5 2014 .05231099 12.5 2015 .05432476 12.5 2016 .06026341 12.5 2017 .06709786 12.5 2018 .08755108 12.5 2019 .12383803 12.5 2020 .15144126 12.5 2010 .08574042 12.5 end
Cheers,
Paris
Comment