Hello,
I was showing a table with immigrants share in each occupation for the year 2004, 2009 and 2014. However, in year 2009, there was in each occupation a quite increase in immigrants share in 2014 a decrease. Immigrants share in 2004 and 2014 looks similar. Looking deeper to the data, the high increase in immigrants share in 2009 was to the data sample (to less natives compared to 2004 and 2014).
Now I was thinking about that I should weight these data (got a variable for weighting extrapolation).
Tef1=occupation, year=2004,2009,2014, is051 (is051==1 is immigrant, 0 native), ixpxhj= weighting extrapolation variable
Without weighting, I used the following code to show the table:
I thought of generating a new variable where is051 is weighted like
However, I loose many observation....
I was showing a table with immigrants share in each occupation for the year 2004, 2009 and 2014. However, in year 2009, there was in each occupation a quite increase in immigrants share in 2014 a decrease. Immigrants share in 2004 and 2014 looks similar. Looking deeper to the data, the high increase in immigrants share in 2009 was to the data sample (to less natives compared to 2004 and 2014).
Now I was thinking about that I should weight these data (got a variable for weighting extrapolation).
Tef1=occupation, year=2004,2009,2014, is051 (is051==1 is immigrant, 0 native), ixpxhj= weighting extrapolation variable
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input int tef1 float year byte is051 float ixpxhj 4 2004 0 . 2 2004 0 . 1 2004 0 . 2 2004 0 . 2 2004 0 . 9 2004 1 . 1 2004 0 . 2 2004 0 . 6 2004 1 . 7 2004 0 . 7 2004 1 . 7 2004 0 . 5 2004 0 . 3 2004 0 . 8 2004 0 . 2 2004 0 . 3 2004 0 . 2 2004 0 . 7 2004 1 . 9 2004 1 . 7 2004 1 . 7 2004 1 . 7 2004 0 . 3 2004 0 . 3 2004 0 . 1 2004 0 . 1 2004 0 . 4 2004 0 . 1 2004 1 . 6 2004 1 . 7 2004 0 . 1 2004 0 . 4 2004 0 . 3 2004 0 . 7 2004 0 . 3 2004 0 . 7 2004 0 . 5 2004 0 . 1 2004 1 . 7 2004 0 . 5 2004 1 . 2 2004 0 . 5 2004 0 . 9 2004 0 . 7 2004 0 . 4 2004 0 . 2 2004 1 . 7 2004 1 . 1 2004 1 . 7 2004 1 . 2 2004 0 . 7 2004 0 . 5 2004 0 . 4 2004 1 . 2 2004 0 . 3 2004 0 . 3 2004 0 . 7 2004 0 . 2 2004 1 . 1 2004 0 . 3 2004 1 . 3 2004 1 . 1 2004 1 . 7 2004 1 . 5 2004 0 . 7 2004 1 . 8 2004 1 . 1 2004 0 . 7 2004 1 . 7 2004 0 . 7 2004 0 . 5 2004 0 . 2 2004 1 . 1 2004 0 . 5 2004 1 . 7 2004 0 . 4 2004 0 . 8 2004 0 . 5 2004 1 . 3 2004 0 . 1 2004 0 . 7 2004 1 . 2 2004 0 . 7 2004 0 . 3 2004 0 . 3 2004 0 . 8 2004 0 . 3 2004 0 . 6 2004 1 . 5 2004 0 . 7 2004 0 . 4 2004 0 . 7 2004 0 . 2 2004 0 . 5 2004 0 . 3 2004 1 . 9 2004 1 . 7 2004 1 . 8 2004 1 . 2 2004 0 . end label values tef1 TEF1D label def TEF1D 1 "1.F�hrungskr�fte", modify label def TEF1D 2 "2.Akademische Berufe", modify label def TEF1D 3 "3.Techniker und gleichrangige Berufe", modify label def TEF1D 4 "4.B�rokr�fte und verwandte Berufe", modify label def TEF1D 5 "5.Dienstleistungsberufe und Verk�ufer", modify label def TEF1D 6 "6.Fachkr�fte in Land- und Forstwirtschaft", modify label def TEF1D 7 "7.Handwerks- und verwandte Berufe", modify label def TEF1D 8 "8.Anlagen und Maschinenbediener, Montierer", modify label def TEF1D 9 "9.Hilfsarbeitskr�fte", modify label values is051 is051l label def is051l 0 "native", modify label def is051l 1 "foreign", modify label values ixpxhj IXPXHJD
Code:
tab tef1 year, sum(is051) Means, Standard Deviations and Frequencies of Heimat BERUFSHAUP TGRUPPEN: year ISCO-08 2004 2009 2014 Total 1.F�hrung .30549451 .47830688 .32420382 .36175182 .46086985 .4997937 .46822574 .48057765 910 945 1570 3425 2.Akademi .29806181 .40615058 .32005793 .33841696 .45752664 .49124357 .46658297 .47320722 1909 1886 2762 6557 3.Technik .21546635 .29616725 .20846466 .23420561 .41126688 .45672483 .40630219 .42354087 1694 1435 2221 5350 4.B�rokr� .23460026 .28144989 .18779343 .2303581 .42402668 .4501866 .39085308 .42117461 763 469 639 1871 5.Dienstl .39184953 .42969777 .33421284 .37898424 .48841862 .4953585 .47192213 .48521918 957 761 1137 2855 6.Fachkr� .40677966 .42857143 .375 .4 .49332793 .49761335 .48591266 .49060949 118 91 136 345 7.Handwer .42863616 .45416913 .31840077 .39755608 .49499315 .49804239 .46596814 .48943369 2207 1691 2076 5974 8.Anlagen .5 .54531722 .40371846 .48113626 .5002986 .49831863 .49096841 .49975495 838 662 753 2253 9.Hilfsar .69433962 .7260274 .53191489 .65090403 .46155825 .44701684 .50004546 .47701619 265 219 235 719 Total .34810061 .42027209 .30332206 .35057413 .47639277 .49363278 .45971308 .4771579 9661 8159 11529
Code:
gen pop = ixpxhj*is051 tab tef1 year, sum(pop)
Comment