------------------------------------------------------------------------
--------
ncdcta00 wrote:
I have 2 var emplo( how many persons work) and neveremplo( how many
persons don't work) for 8 years I observed if people work or not for
this years and I have a combination of this two variable.
I have emplo and nevemplo for wave 8 this percent( below) of person
work during each year.
for ex. for year 8 I have 419 persons have worked ever, and I have
220 per.(128+92) that have worked only 1 year. How I can joint the tab
in stata?
emplo Freq. Percent Cum.
1 128 9.48 9.48
2 115 8.52 18.00
3 136 10.07 28.07
4 124 9.19 37.26
5 125 9.26 46.52
6 115 8.52 55.04
7 188 13.93 68.96
8 419 31.04 100.00
and
nevemplo Freq. Percent Cum.
1 76 11.01 11.01
2 74 10.72 21.74
3 78 11.30 33.04
4 61 8.84 41.88
5 66 9.57 51.45
6 67 9.71 61.16
7 92 13.33 74.49
8 176 25.51 100.00
Total 690 100.00
-------------------------------------------------------------
Below I create two files, to be combined (append). If I understand you
right, a -nevemplo- value of 5 means 8-5 = 3 years of employment, so
the calculation of the corresponding -emplo- is straightforward:
clear
input emplo n
1 128
2 115
3 136
4 124
5 125
6 115
7 188
8 419
end
expand n
drop n
save emplo.dta, replace
clear
input nevemplo n
1 76
2 74
3 78
4 61
5 66
6 67
7 92
8 176
end
expand n
drop n
gen emplo = 8-nevemplo
append using emplo.dta
. tab1 emplo
-> tabulation of emplo
emplo | Freq. Percent Cum.
------------+-----------------------------------
0 | 176 8.63 8.63
1 | 220 10.78 19.41
2 | 182 8.92 28.33
3 | 202 9.90 38.24
4 | 185 9.07 47.30
5 | 203 9.95 57.25
6 | 189 9.26 66.52
7 | 264 12.94 79.46
8 | 419 20.54 100.00
------------+-----------------------------------
Total | 2,040 100.00
Hope this helps
Svend
__________________________________________
Svend Juul
Institut for Folkesundhed, Afdeling for Epidemiologi
(Institute of Public Health, Department of Epidemiology)
Vennelyst Boulevard 6
DK-8000 Aarhus C, Denmark
Phone: +45 8942 6090
Home: +45 8693 7796
Email: [email protected]
__________________________________________
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/