167167\phi = \frac{A_h}{A_c} .
168168$$
169169
170- Soon we'll write Python code to compute $\phi$ and plot it as a function of its determinants.
171-
172- But first we'll describe an alternative interpretation of our model that mostly just relabels variables.
173-
174-
175-
176- ## Reinterpreting the model: workers and entrepreneurs
177-
178-
179- We can add a parameter and reinterpret variables to get a model of entrepreneurs versus workers.
180-
181- We now let $h$ be the present value of a "worker".
182-
183- We define the present value of an entrepreneur to be
184-
185- $$
186- c_0 = \pi \sum_ {t=4}^T R^{-t} w_t^c
187- $$
188-
189- where $\pi \in (0,1) $ is the probability that an entrepreneur's "project" succeeds.
190-
191- For our model of workers and firms, we'll interpret $D$ as the cost of becoming an entrepreneur.
192-
193- This cost might include costs of hiring workers, office space, and lawyers.
194-
195-
196-
197- What we used to call the college, high school wage gap $\phi$ now becomes the ratio
198- of a successful entrepreneur's earnings to a worker's earnings.
199-
200- We'll find that as $\pi$ decreases, $\phi$ increases, indicating that the riskier it is to
201- be an entrepreuner, the higher must be the reward for a successful project.
170+ In the next section we'll write Python code to compute $\phi$ and plot it as a function of its determinants.
202171
203172## Computations
204173
@@ -210,29 +179,25 @@ Now let's write some Python code to compute $\phi$ and plot it as a function of
210179
211180```{code-cell} ipython3
212181# Define the namedtuple for the equalizing difference model
213- EqDiffModel = namedtuple('EqDiffModel', 'R T γ_h γ_c w_h0 D π ')
214-
215- def create_edm(R=1.05, # Gross rate of return
216- T=40, # Time horizon
217- γ_h=1.01, # High -school wage growth
218- γ_c=1.01, # College wage growth
219- w_h0=1, # Initial wage (high school)
220- D=10, # Cost for college
221- π=None ):
182+ EqDiffModel = namedtuple('EqDiffModel', 'R T γ_h γ_c w_h0 D')
183+
184+ def create_edm(R=1.05, # gross rate of return
185+ T=40, # time horizon
186+ γ_h=1.01, # high -school wage growth
187+ γ_c=1.01, # college wage growth
188+ w_h0=1, # initial wage (high school)
189+ D=10, # cost for college
190+ ):
222191
223- return EqDiffModel(R, T, γ_h, γ_c, w_h0, D, π )
192+ return EqDiffModel(R, T, γ_h, γ_c, w_h0, D)
224193
225194def compute_gap(model):
226- R, T, γ_h, γ_c, w_h0, D, π = model
195+ R, T, γ_h, γ_c, w_h0, D = model
227196
228197 A_h = (1 - (γ_h/R)**(T+1)) / (1 - γ_h/R)
229198 A_c = (1 - (γ_c/R)**(T-3)) / (1 - γ_c/R) * (γ_c/R)**4
230-
231- # Tweaked model
232- if π is not None:
233- A_c = π * A_c
234-
235199 ϕ = A_h / A_c + D / (w_h0 * A_c)
200+
236201 return ϕ
237202```
238203
@@ -267,7 +232,10 @@ Let's start with the gross interest rate $R$.
267232
268233```{code-cell} ipython3
269234R_arr = np.linspace(1, 1.2, 50)
270- plt.plot(R_arr, compute_gap(create_edm(R=R_arr)))
235+ models = [create_edm(R=r) for r in R_arr]
236+ gaps = [compute_gap(model) for model in models]
237+
238+ plt.plot(R_arr, gaps)
271239plt.xlabel(r'$R$')
272240plt.ylabel(r'wage gap')
273241plt.show()
@@ -280,7 +248,10 @@ determinants of $\phi$.
280248
281249```{code-cell} ipython3
282250γc_arr = np.linspace(1, 1.2, 50)
283- plt.plot(γc_arr, compute_gap(create_edm(γ_c=γc_arr)))
251+ models = [create_edm(γ_c=γ_c) for γ_c in γc_arr]
252+ gaps = [compute_gap(model) for model in models]
253+
254+ plt.plot(γc_arr, gaps)
284255plt.xlabel(r'$\gamma_c$')
285256plt.ylabel(r'wage gap')
286257plt.show()
@@ -296,21 +267,74 @@ The following graph shows what happens.
296267
297268```{code-cell} ipython3
298269γh_arr = np.linspace(1, 1.1, 50)
299- plt.plot(γh_arr, compute_gap(create_edm(γ_h=γh_arr)))
270+ models = [create_edm(γ_h=γ_h) for γ_h in γh_arr]
271+ gaps = [compute_gap(model) for model in models]
272+
273+ plt.plot(γh_arr, gaps)
300274plt.xlabel(r'$\gamma_h$')
301275plt.ylabel(r'wage gap')
302276plt.show()
303277```
304278
305279## Entrepreneur-worker interpretation
306280
307- Now let's adopt the entrepreneur-worker interpretation of our model.
281+ We can add a parameter and reinterpret variables to get a model of entrepreneurs versus workers.
282+
283+ We now let $h$ be the present value of a "worker".
284+
285+ We define the present value of an entrepreneur to be
286+
287+ $$
288+ c_0 = \pi \sum_ {t=4}^T R^{-t} w_t^c
289+ $$
290+
291+ where $\pi \in (0,1) $ is the probability that an entrepreneur's "project" succeeds.
292+
293+ For our model of workers and firms, we'll interpret $D$ as the cost of becoming an entrepreneur.
294+
295+ This cost might include costs of hiring workers, office space, and lawyers.
296+
297+ What we used to call the college, high school wage gap $\phi$ now becomes the ratio
298+ of a successful entrepreneur's earnings to a worker's earnings.
299+
300+ We'll find that as $\pi$ decreases, $\phi$ increases, indicating that the riskier it is to
301+ be an entrepreuner, the higher must be the reward for a successful project.
302+
303+ Now let's adopt the entrepreneur-worker interpretation of our model
304+
305+ ```{code-cell} ipython3
306+ # Define a model of entrepreneur-worker interpretation
307+ EqDiffModel = namedtuple('EqDiffModel', 'R T γ_h γ_c w_h0 D π')
308+
309+ def create_edm_π(R=1.05, # gross rate of return
310+ T=40, # time horizon
311+ γ_h=1.01, # high-school wage growth
312+ γ_c=1.01, # college wage growth
313+ w_h0=1, # initial wage (high school)
314+ D=10, # cost for college
315+ π=0 # chance of business success
316+ ):
317+
318+ return EqDiffModel(R, T, γ_h, γ_c, w_h0, D, π)
319+
320+
321+ def compute_gap(model):
322+ R, T, γ_h, γ_c, w_h0, D, π = model
323+
324+ A_h = (1 - (γ_h/R)**(T+1)) / (1 - γ_h/R)
325+ A_c = (1 - (γ_c/R)**(T-3)) / (1 - γ_c/R) * (γ_c/R)**4
326+
327+ # Incorprate chance of success
328+ A_c = π * A_c
329+
330+ ϕ = A_h / A_c + D / (w_h0 * A_c)
331+ return ϕ
332+ ```
308333
309334If the probability that a new business succeeds is $0.2$, let's compute the initial wage premium for successful entrepreneurs.
310335
311336```{code-cell} ipython3
312- # a model of enterpreneur
313- ex3 = create_edm(π=0.2)
337+ ex3 = create_edm_π(π=0.2)
314338gap3 = compute_gap(ex3)
315339
316340gap3
@@ -320,7 +344,10 @@ Now let's study how the initial wage premium for successful entrepreneurs depend
320344
321345```{code-cell} ipython3
322346π_arr = np.linspace(0.2, 1, 50)
323- plt.plot(π_arr, compute_gap(create_edm(π=π_arr)))
347+ models = [create_edm_π(π=π) for π in π_arr]
348+ gaps = [compute_gap(model) for model in models]
349+
350+ plt.plot(π_arr, gaps)
324351plt.ylabel(r'wage gap')
325352plt.xlabel(r'$\pi$')
326353plt.show()
@@ -430,7 +457,7 @@ Let's compute $\frac{\partial \phi}{\partial γ_h}$ and evaluate it at default p
430457ϕ_γ_h_func(D_value, γ_h_value, γ_c_value, R_value, T_value, w_h0_value)
431458```
432459
433- We find that raising $\gamma_h$ increases the initial college wage premium $\phi$, as we did with our earlier graphical analysis.
460+ We find that raising $\gamma_h$ increases the initial college wage premium $\phi$, in line with our earlier graphical analysis.
434461
435462Compute $\frac{\partial \phi}{\partial γ_c}$ and evaluate it numerically at default parameter values
436463
@@ -445,7 +472,7 @@ Compute $\frac{\partial \phi}{\partial γ_c}$ and evaluate it numerically at def
445472ϕ_γ_c_func(D_value, γ_h_value, γ_c_value, R_value, T_value, w_h0_value)
446473```
447474
448- We find that raising $\gamma_c$ decreases the initial college wage premium $\phi$, as we did with our graphical analysis earlier
475+ We find that raising $\gamma_c$ decreases the initial college wage premium $\phi$, in line with our earlier graphical analysis.
449476
450477Let's compute $\frac{\partial \phi}{\partial R}$ and evaluate it numerically at default parameter values
451478
@@ -460,4 +487,4 @@ Let's compute $\frac{\partial \phi}{\partial R}$ and evaluate it numerically at
460487ϕ_R_func(D_value, γ_h_value, γ_c_value, R_value, T_value, w_h0_value)
461488```
462489
463- We find that raising the gross interest rate $R$ increases the initial college wage premium $\phi$, as we did with our graphical analysis earlier
490+ We find that raising the gross interest rate $R$ increases the initial college wage premium $\phi$, in line with our earlier graphical analysis.
0 commit comments