Stata Technical Bulletin
23
Consider the following example data set:
. use example
. describe
Contains data from example.dta | |||
Obs: |
20 |
(max= |
1107) |
Vars : |
7 |
(max= |
99) |
Width: |
14 |
(max= |
200) |
1. id |
int |
Ж Og |
Identification number | |
2. sex |
int |
%8.Og sex |
Sex | |
3. activity |
int |
%8.0g activity Activity | ||
4. age |
int |
Ж Og |
Age | |
5. lost |
int |
%8.0g lost |
Still in survey? | |
6. birth |
int |
%8.0g |
Birth year | |
7. year |
int |
Ж Og |
Year | |
Sorted by: | ||||
. list id sex |
activity age | |||
id |
sex |
activity |
age | |
1. |
1 |
Male |
nonactiv |
22 |
2. |
1 |
Male |
selfemp |
27 |
3. |
1 |
Male |
selfemp |
39 |
4. |
2 |
Female |
nonactiv |
19 |
ε. |
3 |
Female |
nonactiv |
19 |
6. |
3 |
Female |
selfemp |
22 |
7. |
3 |
Female |
waged |
28 |
8. |
4 |
Male |
nonactiv |
7 |
9. |
4 |
Male |
nonactiv |
20 |
10. |
4 |
Male |
selfemp |
23 |
11. |
ε |
Male |
nonactiv |
4 |
12. |
ε |
Male |
waged |
11 |
13. |
ε |
Male |
nonactiv |
22 |
14. |
ε |
Male |
waged |
2S |
ιε. |
6 |
Female |
nonactiv |
12 |
16. |
6 |
Female |
nonactiv |
24 |
17. |
6 |
Female |
waged |
27 |
18. |
7 |
Female |
nonactiv |
24 |
19. |
8 |
Female |
nonactiv |
16 |
20. |
8 |
Female |
nonactiv |
39 |
This data set contains observations on eight individuals, identified by the variable id. The sex, work status (activity),
and age of each individual is recorded in the data set along with a variable (lost) that indicates whether the individual left the
sample for some reason. This data set also contains other variables that are used later in this insert. The data set is supplied on
the STB diskette.
The work status variable is coded as a ‘O’ when the individual is not-working (nonactiv), as a ‘1’ when the individual
is employed (waged), and as a ‘2’ when the individual is self-employed (selfemp). We can use censor to create a censoring
variable for the individual’s first entry into work:
. censor id age = activity==l ∣ activity==2, generate(jobi)
list id activity age jobl Tjobl | |||||
id |
activity |
age |
jobl |
TjObl | |
1. |
1 |
nonactiv |
22 |
1 |
22 |
2. |
1 |
selfemp |
27 | ||
3. |
1 |
selfemp |
39 | ||
4. |
2 |
nonactiv |
19 |
0 |
19 |
ε. |
3 |
nonactiv |
19 |
1 |
19 |
6. |
3 |
selfemp |
22 | ||
7. |
3 |
waged |
28 | ||
8. |
4 |
nonactiv |
7 |
0 |
7 |
9. |
4 |
nonactiv |
20 |
1 |
20 |
10. |
4 |
selfemp |
23 | ||
11. |
ε |
nonactiv |
4 |
1 |
4 |
12. |
ε |
waged |
11 | ||
13. |
ε |
nonactiv |
22 | ||
14. |
ε |
waged |
26 | ||
ιε. |
6 |
nonactiv |
12 |
0 |
12 |
16. |
6 |
nonactiv |
24 |
1 |
24 |
17. |
6 |
waged |
27 | ||
18. |
7 |
nonactiv |
24 |
0 |
24 |
19. |
8 |
nonactiV |
16 |
0 |
16 |
20. |
8 |
nonactiV |
39 |
0 |
39 |
More intriguing information
1. An Efficient Circulant MIMO Equalizer for CDMA Downlink: Algorithm and VLSI Architecture2. The name is absent
3. Bargaining Power and Equilibrium Consumption
4. Financial Development and Sectoral Output Growth in 19th Century Germany
5. Cross border cooperation –promoter of tourism development
6. The name is absent
7. Learning-by-Exporting? Firm-Level Evidence for UK Manufacturing and Services Sectors
8. The name is absent
9. Palvelujen vienti ja kansainvälistyminen
10. An Interview with Thomas J. Sargent