Dear all,
I have been struggling to get the graph I want.
Currently, I am trying to plot automation potential and relative wage by occupation (isco1d is the occupation indicator).
My data is by country isco1d.
So in the scatterplot, one dot is one country-occupation pair.
Now, what I want is to have a graph where the sizes of the "dots" in the scatterplot depends on the employment share within each country.
So far, below is the code I've been struggling with.
Using this code, what I get is the sizes depending on the employment share within each isco1d. I'm assuming it's because of the if command.
But as mentioned above, I want the sizes of the dot to be comparable across all country-isco1d pairs; and not only within occupation.
How can I do this?
Many thanks in advance!
I have been struggling to get the graph I want.
Currently, I am trying to plot automation potential and relative wage by occupation (isco1d is the occupation indicator).
My data is by country isco1d.
So in the scatterplot, one dot is one country-occupation pair.
Now, what I want is to have a graph where the sizes of the "dots" in the scatterplot depends on the employment share within each country.
So far, below is the code I've been struggling with.
Using this code, what I get is the sizes depending on the employment share within each isco1d. I'm assuming it's because of the if command.
But as mentioned above, I want the sizes of the dot to be comparable across all country-isco1d pairs; and not only within occupation.
Code:
tw (scatter arntz_auto relwage [w=nsh] if isco1d==1, xsc(log) msymbol(circle) mfc(none)) /// (scatter arntz_auto relwage [w=nsh] if isco1d==2, xsc(log) msymbol(square) mfc(none)) /// (scatter arntz_auto relwage [w=nsh] if isco1d==3, xsc(log) msymbol(diamond) mfc(none)) /// (scatter arntz_auto relwage [w=nsh] if isco1d==4, xsc(log) msymbol(cross) mfc(none)) /// (scatter arntz_auto relwage [w=nsh] if isco1d==5, xsc(log) msymbol(triangle) mfc(none)) /// (scatter arntz_auto relwage [w=nsh] if isco1d==6, xsc(log) msymbol(circle) mfc(none)) /// (scatter arntz_auto relwage [w=nsh] if isco1d==7, xsc(log) msymbol(square) mfc(none)) /// (scatter arntz_auto relwage [w=nsh] if isco1d==8, xsc(log) msymbol(diamond) mfc(none)) /// (scatter arntz_auto relwage [w=nsh] if isco1d==9, xsc(log) msymbol(cross) mfc(none)), /// legend(order(1 2 3 4 5 7 8 9) label(1 "Manager") label(2 "Professionals") label(3 "Technicians") label(4 "Clerks") label(5 "Services and Sales") label(7 "Craft and Trades") label(8 "Plant and Machine") label(9 "Elementary")) /// ytitle("Automation Potential") xtitle("Relative Wage")
Many thanks in advance!
Comment