Dear Profs and Colleagues,
I have three variables:
Education (categorial), being immigrant or native, year (2010-2019).
I am going to generate three variables:
1- share of immigrants in the education group 4. It means that the Edgroup=4 and immigrant=1
2- share of native in the education group 4. t means that the Edgroup=4 and national=1
3- share of total workers in the education group 4. It means that the Edgroup=4.
Afterward, graph line these three variables in a single graph.
Any ideas really appreciated.
cheers,
Paris
I have three variables:
Education (categorial), being immigrant or native, year (2010-2019).
I am going to generate three variables:
1- share of immigrants in the education group 4. It means that the Edgroup=4 and immigrant=1
2- share of native in the education group 4. t means that the Edgroup=4 and national=1
3- share of total workers in the education group 4. It means that the Edgroup=4.
Afterward, graph line these three variables in a single graph.
Any ideas really appreciated.
Code:
* Example generated by -dataex-. For more info, type help dataex clear input float(Edgroup immigrant national) double year 2 0 1 2010 2 0 1 2010 2 0 1 2010 2 0 1 2010 2 0 1 2010 2 0 1 2010 2 0 1 2010 2 0 1 2010 2 0 1 2010 2 0 1 2010 2 0 1 2010 1 0 1 2010 3 0 1 2010 1 0 1 2010 2 1 0 2010 2 0 1 2010 2 0 1 2010 2 0 1 2010 2 0 1 2010 1 0 1 2010 2 0 1 2010 2 0 1 2010 2 0 1 2010 1 0 1 2010 2 0 1 2010 2 0 1 2010 1 0 1 2010 2 0 1 2010 2 0 1 2010 2 0 1 2010 2 0 1 2010 2 0 1 2010 2 0 1 2010 1 0 1 2010 3 0 1 2010 1 0 1 2010 2 0 1 2010 1 0 1 2010 3 0 1 2010 1 0 1 2010 1 0 1 2010 . tab national national | Freq. Percent Cum. ------------+----------------------------------- 0 | 1,355,562 4.89 4.89 1 | 26,342,630 95.11 100.00 ------------+----------------------------------- Total | 27,698,192 100.00 . tab immi immigrant | Freq. Percent Cum. ------------+----------------------------------- 0 | 26,342,630 95.11 95.11 1 | 1,355,562 4.89 100.00 ------------+----------------------------------- Total | 27,698,192 100.00 . tab Edgroup Edgroup | Freq. Percent Cum. ------------+----------------------------------- 1 | 3,582,424 12.93 12.93 2 | 11,419,311 41.23 54.16 3 | 7,473,149 26.98 81.14 4 | 5,223,308 18.86 100.00 ------------+----------------------------------- Total | 27,698,192 100.00 end
Paris
Comment