Download the notebook here! Interactive online version: binder

Eckstein-Keane-Wolpin

This notebook aims to replicate and extend the sample used by Michael Keane and Kenneth Wolpin to study the career decisions of young men.

Keane, M. P. and Wolpin, K. I. (1997). The career decisions of young men. Journal of Political Economy, 105(3), 473-522.

The sample is based on the National Longitudinal Survey of Youth 1979 (NLSY79) which is available to download here.

Preparations

We first peform some basic preparations to ease further processing.

[1]:
# flake8-noqa-cell-E402-E114-E116
import sys

sys.path.insert(0, "material/codes")

import pandas as pd

from ekw_ext_analysis import get_prepare_ekw_ext_data
from ekw_ext_analysis import get_choices
from ekw_ext_analysis import get_average_wages
from ekw_ext_analysis import get_initial_schooling
from ekw_ext_analysis import get_initial_schooling_activity
from ekw_ext_analysis import make_transition_matrix
from ekw_ext_analysis import get_df_transition_probabilities

from ekw_ext_plot import plot_sample_size
from ekw_ext_plot import plot_decisions_by_age
from ekw_ext_plot import plot_wage_moments
from ekw_ext_plot import plot_initial_schooling
from ekw_ext_plot import plot_transition_heatmap

from ekw_ext_auxiliary import display_side_by_side

pd.options.display.float_format = "{:,.2f}".format
[2]:
df = get_prepare_ekw_ext_data("eckstein-keane-wolpin-extended.csv")

Basic Structure

First we explore the basic structure of the dataset. All individuals enter the model initially at the age 16 and are then followed for a varying number of consecutive years after which they leave the sample between age 47 and 50. Each year, the individual’s decision to work in either a white or blue collar occupation, attend school, enroll in the miliary, or remain at home is recorded. If working, the dataset potentially also contains that year’s wage as a full-time equivalent.

[3]:
df.head(15)
[3]:
Age Schooling Choice Wage
Identifier Period
6 0 16 11 Schooling nan
1 17 12 Schooling nan
2 18 13 Schooling nan
3 19 14 Schooling nan
4 20 15 Schooling nan
5 21 16 Home nan
6 22 16 White 13,773.24
7 23 16 White 15,690.82
8 24 16 White 18,635.95
9 25 16 White 19,649.71
10 26 16 White 20,659.24
11 27 16 White 21,127.90
12 28 16 White 20,042.24
13 29 16 White 22,649.11
14 30 16 White 21,604.74

The sample initially contains 1,384 observations at age 16 and then slowly decreases due to sample attrition. Until the age of 44, the sample includes over 1,000 individuals and only substantially decreases after the age of 47.

[4]:
plot_sample_size(df)
../_images/eckstein-keane-wolpin_exploration_10_0.png

Basic Descriptives

Now we are ready to reproduce some descriptive statistics similar to those presented in the paper.

Choices

We reproduce the distribution of individuals across the different alternatives as reported in Table 1.

[5]:
display_side_by_side(get_choices(df)["total"], get_choices(df)["share"])
Blue White Military Schooling Home All
Age
16 57 7 1 1173 146 1384
17 122 12 20 1028 196 1378
18 351 93 72 561 290 1367
19 428 127 106 418 281 1360
20 483 157 113 337 268 1358
21 550 181 104 248 267 1350
22 584 277 88 180 206 1335
23 598 352 67 110 199 1326
24 596 423 71 74 158 1322
25 578 464 57 52 153 1304
26 577 472 52 44 150 1295
27 565 477 47 36 157 1282
28 569 490 35 35 142 1271
29 536 510 29 24 157 1256
30 524 508 17 17 171 1237
31 524 505 16 23 159 1227
32 527 498 17 19 148 1209
33 524 516 16 8 137 1201
34 520 525 15 6 119 1185
35 499 529 14 10 122 1174
36 468 526 15 10 135 1154
37 450 519 12 5 147 1133
38 420 530 11 4 143 1108
39 411 522 8 6 145 1092
40 390 509 5 6 160 1070
41 378 500 4 9 162 1053
42 372 499 3 10 151 1035
43 359 493 1 8 161 1022
44 350 488 2 7 163 1010
45 343 473 1 4 165 986
46 333 456 1 3 174 967
47 311 427 0 2 176 916
48 234 307 0 2 137 680
49 158 192 0 1 82 433
50 72 82 0 0 41 195
All 14761 13646 1020 4480 5768 39675
Blue White Military Schooling Home
Age
16 4.12 0.51 0.07 84.75 10.55
17 8.85 0.87 1.45 74.60 14.22
18 25.68 6.80 5.27 41.04 21.21
19 31.47 9.34 7.79 30.74 20.66
20 35.57 11.56 8.32 24.82 19.73
21 40.74 13.41 7.70 18.37 19.78
22 43.75 20.75 6.59 13.48 15.43
23 45.10 26.55 5.05 8.30 15.01
24 45.08 32.00 5.37 5.60 11.95
25 44.33 35.58 4.37 3.99 11.73
26 44.56 36.45 4.02 3.40 11.58
27 44.07 37.21 3.67 2.81 12.25
28 44.77 38.55 2.75 2.75 11.17
29 42.68 40.61 2.31 1.91 12.50
30 42.36 41.07 1.37 1.37 13.82
31 42.71 41.16 1.30 1.87 12.96
32 43.59 41.19 1.41 1.57 12.24
33 43.63 42.96 1.33 0.67 11.41
34 43.88 44.30 1.27 0.51 10.04
35 42.50 45.06 1.19 0.85 10.39
36 40.55 45.58 1.30 0.87 11.70
37 39.72 45.81 1.06 0.44 12.97
38 37.91 47.83 0.99 0.36 12.91
39 37.64 47.80 0.73 0.55 13.28
40 36.45 47.57 0.47 0.56 14.95
41 35.90 47.48 0.38 0.85 15.38
42 35.94 48.21 0.29 0.97 14.59
43 35.13 48.24 0.10 0.78 15.75
44 34.65 48.32 0.20 0.69 16.14
45 34.79 47.97 0.10 0.41 16.73
46 34.44 47.16 0.10 0.31 17.99
47 33.95 46.62 0.00 0.22 19.21
48 34.41 45.15 0.00 0.29 20.15
49 36.49 44.34 0.00 0.23 18.94
50 36.92 42.05 0.00 0.00 21.03
All 37.20 34.39 2.57 11.29 14.54
[6]:
pd.crosstab(index=df["Age"], columns=df["Choice"], margins=True)
[6]:
Choice Blue Home Military Schooling White All
Age
16 57 146 1 1173 7 1384
17 122 196 20 1028 12 1378
18 351 290 72 561 93 1367
19 428 281 106 418 127 1360
20 483 268 113 337 157 1358
21 550 267 104 248 181 1350
22 584 206 88 180 277 1335
23 598 199 67 110 352 1326
24 596 158 71 74 423 1322
25 578 153 57 52 464 1304
26 577 150 52 44 472 1295
27 565 157 47 36 477 1282
28 569 142 35 35 490 1271
29 536 157 29 24 510 1256
30 524 171 17 17 508 1237
31 524 159 16 23 505 1227
32 527 148 17 19 498 1209
33 524 137 16 8 516 1201
34 520 119 15 6 525 1185
35 499 122 14 10 529 1174
36 468 135 15 10 526 1154
37 450 147 12 5 519 1133
38 420 143 11 4 530 1108
39 411 145 8 6 522 1092
40 390 160 5 6 509 1070
41 378 162 4 9 500 1053
42 372 151 3 10 499 1035
43 359 161 1 8 493 1022
44 350 163 2 7 488 1010
45 343 165 1 4 473 986
46 333 174 1 3 456 967
47 311 176 0 2 427 916
48 234 137 0 2 307 680
49 158 82 0 1 192 433
50 72 41 0 0 82 195
All 14761 5768 1020 4480 13646 39675

As illustrated by the figure below, most individuals are in school at age 16. In the following years, school attendance decreases drastically and working in one of the three occupations becomes the most common choice. While initially more individuals choose working in a blue-collar occupation over working in a white-collar job, this choice distribution changes at the age of 34 after which a larger share of individuals work in the white-collar occupation.

[7]:
plot_decisions_by_age(df)
../_images/eckstein-keane-wolpin_exploration_18_0.png

Wages

We reproduce the average real wages by occupation.

[8]:
get_average_wages(df)
[8]:
Blue Military White All
Age
16 9,648.17 8,509.16 12,301.07 9,906.16
17 11,145.03 9,176.57 9,237.11 10,682.12
18 12,019.30 9,765.11 12,050.71 11,689.59
19 13,193.31 9,546.65 12,517.79 12,418.06
20 14,605.61 10,795.39 14,054.15 13,828.85
21 15,578.51 12,358.96 15,555.31 15,143.44
22 16,840.68 14,346.82 20,298.33 17,584.39
23 18,236.01 15,466.69 21,343.24 19,142.84
24 19,015.47 17,777.53 22,513.52 20,324.77
25 20,009.08 19,040.48 24,427.49 21,854.15
26 20,103.85 19,955.51 26,349.64 22,758.19
27 21,842.97 19,789.56 28,024.78 24,472.35
28 20,760.88 23,264.57 27,940.46 24,053.46
29 21,670.17 25,723.28 29,565.96 25,513.05
30 22,378.62 28,749.06 32,916.80 27,567.87
31 23,505.40 22,787.86 35,852.83 29,533.93
32 24,671.36 nan 39,136.44 31,766.07
33 25,262.03 nan 40,760.23 32,949.75
34 25,994.07 nan 42,951.47 34,523.54
35 26,248.82 nan 44,142.52 35,405.01
36 26,256.65 nan 45,206.51 36,131.36
37 27,749.48 nan 47,755.02 38,256.78
38 27,370.83 nan 49,083.44 39,459.99
39 27,786.70 nan 48,453.94 39,404.79
40 28,173.30 nan 48,604.77 39,733.83
41 28,866.21 nan 51,001.54 41,345.37
42 28,932.44 nan 54,014.10 43,217.16
43 27,564.22 nan 53,895.72 42,880.81
44 28,270.54 nan 52,646.84 42,352.59
45 28,637.65 nan 51,627.06 41,851.33
46 29,476.79 nan 53,871.12 43,439.99
47 29,908.83 nan 53,310.19 43,381.33
48 29,843.12 nan 51,871.64 42,307.20
49 29,354.94 nan 52,571.57 41,930.61
50 30,003.21 nan 55,672.83 43,449.20
All 23,176.59 14,468.76 40,478.54 31,069.58

The following figures illustrate the average wages in the civilian and non-civilian occupations. Average wages follow a generally increasing trend which is much steeper for white-collar jobs than for blue-collar jobs. As the computation of military wages requires annual information but the NLSY79 only provides biannual data on military incomes, military wages are only available until the age of 31.

The unconditional standard deviation of wages is lowest in the military, and highest for white-collar occupations.

[9]:
plot_wage_moments(df, savgol=False)
../_images/eckstein-keane-wolpin_exploration_23_0.png
../_images/eckstein-keane-wolpin_exploration_23_1.png

Initial Schooling

[10]:
get_initial_schooling(df)[0]
[10]:
Years Number Frequency
0 7 13 0.01
1 8 52 0.04
2 9 278 0.20
3 10 931 0.67
4 11 109 0.08
5 12 1 0.00
[11]:
plot_initial_schooling(get_initial_schooling(df)[1])
../_images/eckstein-keane-wolpin_exploration_26_0.png
[12]:
get_initial_schooling_activity(df)
[12]:
7 8 9 10 11 12
Blue 16.65 18.13 14.78 13.73 13.38 15.74
White 2.70 2.07 3.70 6.67 7.93 8.44
Military 0.00 0.02 0.66 0.63 0.71 1.20
School 0.08 0.22 0.50 1.65 2.09 2.35
Home 12.66 10.62 10.88 7.71 6.09 3.58
Total 32.09 31.07 30.52 30.40 30.21 31.31

The amount of schooling an individual obtains is an important determinant for life cycle decisions (cite some work?). The following table illustrates the years spent on each activity by initial level of schooling. Some patterns emerge:

  • Years spent in blue-collar occupations generally decrease with the initial level of schooling. While individuals with 7 years of initial schooling work on average 16.65 in a blue-collar occupation, individuals that have 11 years of schooling spend only 13.38 years in a blue-collar occupation.

  • Years spent in white-collar occupations increase with the initial level of schooling. In particular, individuals with only 7 years of schooling spend on average merely 2.7 years in white-collar jobs while individuals with 11 years of schooling spend on average 7.93 in white-collar ocucpations.

  • The initial level of schooling is a strong predictor for additional schooling. While individuals who enter the model with only 7 years of schooling do not even spend 2 more month in school (on average), those with 11 years of initial schooling add on average 2.1 years.

Notably, the descriptives are derived under the instance that the average duration of individuals in the sample differs by the level of initial schooling. Individuals with 7 years of initial schooling are observed for 32.09 periods, while individuals with 11 years of initial schooling are only observed for 30.21 years.

Transition Matrix

We will illustrate two directions of transition probabilities: - origin_to_destination
Percentage of individuals who are in an originating alternative in \(t\) (column) and will be in a destination alternative in \(t+1\) (row). * Example 1: 60% of the time, an individual who is in school currently, will be in the school the next year.
* Example 2: 8% of the time, an individual who is in a blue-collar occupation currently, will be in a white-collar occupation next year.
  • destination_from_origin Percentage of individual who are in a destinating alternative in \(t\) (column) and were in a certain originating alternative in \(t-1\) (row).

    • Example 1: 81% of the time, an individual who is in school at \(t\) was also in school in \(t-1\).

    • Example 1: 9% of the time, an individual who is employed in a white-collar occupation at \(t\) worked in a blue-collar occupation in \(t-1\).

[13]:
get_df_transition_probabilities(make_transition_matrix(df), "origin_to_destination")
[13]:
Blue White Military Schooling Home
Blue 0.82 0.08 0.00 0.01 0.09
White 0.08 0.87 0.00 0.01 0.04
Military 0.09 0.04 0.81 0.03 0.04
Schooling 0.13 0.12 0.02 0.60 0.13
Home 0.26 0.10 0.01 0.05 0.58
[14]:
get_df_transition_probabilities(make_transition_matrix(df), "destination_from_origin")
[14]:
Blue White Military Schooling Home
Blue 0.79 0.07 0.01 0.04 0.10
White 0.09 0.83 0.00 0.04 0.04
Military 0.04 0.01 0.80 0.08 0.06
Schooling 0.05 0.06 0.01 0.81 0.08
Home 0.23 0.10 0.01 0.10 0.57
[15]:
plot_transition_heatmap(make_transition_matrix(df))
../_images/eckstein-keane-wolpin_exploration_33_0.png

Some Facts

The diagonal indicates that choices are highly persistent. There is limited mobility between white and blue collar occupations and individuals transition from white-collar to blue-collar and vice versa at equal rates. Blue-collar workers are twice more likely to transition into home than white-collar workers. Individuals who are not in school are highly unlikely to return to school.