{
"cells": [
{
"cell_type": "markdown",
"id": "175e8a06",
"metadata": {},
"source": [
"# Equalizing Difference Model"
]
},
{
"cell_type": "markdown",
"id": "155ad336",
"metadata": {},
"source": [
"## Overview\n",
"\n",
"This lecture presents a model of the college-high-school wage gap in which the\n",
"“time to build” a college graduate plays a key role.\n",
"\n",
"Milton Friedman invented the model to study whether differences in earnings of US dentists and doctors were outcomes of competitive labor markets or whether\n",
"they reflected entry barriers imposed by governments working in conjunction with doctors’ professional organizations.\n",
"\n",
"Chapter 4 of Jennifer Burns [[Burns, 2023](https://intro.quantecon.org/zreferences.html#id8)] describes Milton Friedman’s joint work with Simon Kuznets that eventually led to the publication of [[Kuznets and Friedman, 1939](https://intro.quantecon.org/zreferences.html#id9)] and [[Friedman and Kuznets, 1945](https://intro.quantecon.org/zreferences.html#id10)].\n",
"\n",
"To map Friedman’s application into our model, think of our high school students as Friedman’s dentists and our college graduates as Friedman’s doctors.\n",
"\n",
"Our presentation is “incomplete” in the sense that it is based on a single equation that would be part of set equilibrium conditions of a more fully articulated model.\n",
"\n",
"This ‘‘equalizing difference’’ equation determines a college-high-school wage ratio that equalizes present values of a high school educated worker and a college educated worker.\n",
"\n",
"The idea is that lifetime earnings somehow adjust to make a new high school worker indifferent between going to college and not going to college but instead going to work immediately.\n",
"\n",
"(The job of the “other equations” in a more complete model would be to describe what adjusts to bring about this outcome.)\n",
"\n",
"Our model is just one example of an “equalizing difference” theory of relative wage rates, a class of theories dating back at least to Adam Smith’s **Wealth of Nations** [[Smith, 2010](https://intro.quantecon.org/zreferences.html#id11)].\n",
"\n",
"For most of this lecture, the only mathematical tools that we’ll use are from linear algebra, in particular, matrix multiplication and matrix inversion.\n",
"\n",
"However, near the end of the lecture, we’ll use calculus just in case readers want to see how computing partial derivatives could let us present some findings more concisely.\n",
"\n",
"And doing that will let illustrate how good Python is at doing calculus!\n",
"\n",
"But if you don’t know calculus, our tools from linear algebra are certainly enough.\n",
"\n",
"As usual, we’ll start by importing some Python modules."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "ec774e18",
"metadata": {
"hide-output": false
},
"outputs": [],
"source": [
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
"from collections import namedtuple\n",
"from sympy import Symbol, Lambda, symbols"
]
},
{
"cell_type": "markdown",
"id": "1c4ea696",
"metadata": {},
"source": [
"## The indifference condition\n",
"\n",
"The key idea is that the entry level college wage premium has to adjust to make a representative worker indifferent between going to college and not going to college.\n",
"\n",
"Let\n",
"\n",
"- $ R > 1 $ be the gross rate of return on a one-period bond \n",
"- $ t = 0, 1, 2, \\ldots T $ denote the years that a person either works or attends college \n",
"- $ 0 $ denote the first period after high school that a person can work if he does not go to college \n",
"- $ T $ denote the last period that a person works \n",
"- $ w_t^h $ be the wage at time $ t $ of a high school graduate \n",
"- $ w_t^c $ be the wage at time $ t $ of a college graduate \n",
"- $ \\gamma_h > 1 $ be the (gross) rate of growth of wages of a high school graduate, so that\n",
" $ w_t^h = w_0^h \\gamma_h^t $ \n",
"- $ \\gamma_c > 1 $ be the (gross) rate of growth of wages of a college graduate, so that\n",
" $ w_t^c = w_0^c \\gamma_c^t $ \n",
"- $ D $ be the upfront monetary costs of going to college \n",
"\n",
"\n",
"We now compute present values that a new high school graduate earns if\n",
"\n",
"- he goes to work immediately and earns wages paid to someone without a college education \n",
"- he goes to college for four years and after graduating earns wages paid to a college graduate "
]
},
{
"cell_type": "markdown",
"id": "7732e194",
"metadata": {},
"source": [
"### Present value of a high school educated worker\n",
"\n",
"If someone goes to work immediately after high school and works for the $ T+1 $ years $ t=0, 1, 2, \\ldots, T $, she earns present value\n",
"\n",
"$$\n",
"h_0 = \\sum_{t=0}^T R^{-t} w_t^h = w_0^h \\left[ \\frac{1 - (R^{-1} \\gamma_h)^{T+1} }{1 - R^{-1} \\gamma_h } \\right] \\equiv w_0^h A_h\n",
"$$\n",
"\n",
"where\n",
"\n",
"$$\n",
"A_h = \\left[ \\frac{1 - (R^{-1} \\gamma_h)^{T+1} }{1 - R^{-1} \\gamma_h } \\right].\n",
"$$\n",
"\n",
"The present value $ h_0 $ is the “human wealth” at the beginning of time $ 0 $ of someone who chooses not to attend college but instead to go to work immediately at the wage of a high school graduate."
]
},
{
"cell_type": "markdown",
"id": "47bd5ee9",
"metadata": {},
"source": [
"### Present value of a college-bound new high school graduate\n",
"\n",
"If someone goes to college for the four years $ t=0, 1, 2, 3 $ during which she earns $ 0 $, but then goes to work immediately after college and works for the $ T-3 $ years $ t=4, 5, \\ldots ,T $, she earns present value\n",
"\n",
"$$\n",
"c_0 = \\sum_{t=4}^T R^{-t} w_t^c = w_0^c (R^{-1} \\gamma_c)^4 \\left[ \\frac{1 - (R^{-1} \\gamma_c)^{T-3} }{1 - R^{-1} \\gamma_c } \\right] \\equiv w_0^c A_c\n",
"$$\n",
"\n",
"where\n",
"\n",
"$$\n",
"A_c = (R^{-1} \\gamma_c)^4 \\left[ \\frac{1 - (R^{-1} \\gamma_c)^{T-3} }{1 - R^{-1} \\gamma_c } \\right] .\n",
"$$\n",
"\n",
"The present value $ c_0 $ is the “human wealth” at the beginning of time $ 0 $ of someone who chooses to attend college for four years and then start to work at time $ t=4 $ at the wage of a college graduate.\n",
"\n",
"Assume that college tuition plus four years of room and board amount to $ D $ and must be paid at time $ 0 $.\n",
"\n",
"So net of monetary cost of college, the present value of attending college as of the first period after high school is\n",
"\n",
"$$\n",
"c_0 - D\n",
"$$\n",
"\n",
"We now formulate a pure **equalizing difference** model of the initial college-high school wage gap $ \\phi $ that verifies\n",
"\n",
"$$\n",
"w_0^c = \\phi w_0^h\n",
"$$\n",
"\n",
"We suppose that $ R, \\gamma_h, \\gamma_c, T $ and also $ w_0^h $ are fixed parameters.\n",
"\n",
"We start by noting that the pure equalizing difference model asserts that the college-high-school wage gap $ \\phi $ solves an\n",
"“equalizing” equation that sets the present value not going to college equal to the present value of going to college:\n",
"\n",
"$$\n",
"h_0 = c_0 - D\n",
"$$\n",
"\n",
"or\n",
"\n",
"\n",
"\n",
"$$\n",
"w_0^h A_h = \\phi w_0^h A_c - D . \\tag{13.1}\n",
"$$\n",
"\n",
"This “indifference condition” is the heart of the model.\n",
"\n",
"Solving equation [(13.1)](#equation-eq-equalize) for the college wage premium $ \\phi $ we obtain\n",
"\n",
"\n",
"\n",
"$$\n",
"\\phi = \\frac{A_h}{A_c} + \\frac{D}{w_0^h A_c} . \\tag{13.2}\n",
"$$\n",
"\n",
"In a **free college** special case $ D =0 $.\n",
"\n",
"Here the only cost of going to college is the forgone earnings from being a high school educated worker.\n",
"\n",
"In that case,\n",
"\n",
"$$\n",
"\\phi = \\frac{A_h}{A_c} .\n",
"$$\n",
"\n",
"In the next section we’ll write Python code to compute $ \\phi $ and plot it as a function of its determinants."
]
},
{
"cell_type": "markdown",
"id": "d0cb6548",
"metadata": {},
"source": [
"## Computations\n",
"\n",
"We can have some fun with examples that tweak various parameters,\n",
"prominently including $ \\gamma_h, \\gamma_c, R $.\n",
"\n",
"Now let’s write some Python code to compute $ \\phi $ and plot it as a function of some of its determinants."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "24434998",
"metadata": {
"hide-output": false
},
"outputs": [],
"source": [
"# Define the namedtuple for the equalizing difference model\n",
"EqDiffModel = namedtuple('EqDiffModel', 'R T γ_h γ_c w_h0 D')\n",
"\n",
"def create_edm(R=1.05, # gross rate of return\n",
" T=40, # time horizon\n",
" γ_h=1.01, # high-school wage growth\n",
" γ_c=1.01, # college wage growth\n",
" w_h0=1, # initial wage (high school)\n",
" D=10, # cost for college\n",
" ):\n",
" \n",
" return EqDiffModel(R, T, γ_h, γ_c, w_h0, D)\n",
"\n",
"def compute_gap(model):\n",
" R, T, γ_h, γ_c, w_h0, D = model\n",
" \n",
" A_h = (1 - (γ_h/R)**(T+1)) / (1 - γ_h/R)\n",
" A_c = (1 - (γ_c/R)**(T-3)) / (1 - γ_c/R) * (γ_c/R)**4\n",
" ϕ = A_h / A_c + D / (w_h0 * A_c)\n",
" \n",
" return ϕ"
]
},
{
"cell_type": "markdown",
"id": "dc60c62d",
"metadata": {},
"source": [
"Using vectorization instead of loops,\n",
"we build some functions to help do comparative statics .\n",
"\n",
"For a given instance of the class, we want to recompute $ \\phi $ when one parameter changes and others remain fixed.\n",
"\n",
"Let’s do an example."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "7f222194",
"metadata": {
"hide-output": false
},
"outputs": [],
"source": [
"ex1 = create_edm()\n",
"gap1 = compute_gap(ex1)\n",
"\n",
"gap1"
]
},
{
"cell_type": "markdown",
"id": "e73f7b4b",
"metadata": {},
"source": [
"Let’s not charge for college and recompute $ \\phi $.\n",
"\n",
"The initial college wage premium should go down."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "579fbdbd",
"metadata": {
"hide-output": false
},
"outputs": [],
"source": [
"# free college\n",
"ex2 = create_edm(D=0)\n",
"gap2 = compute_gap(ex2)\n",
"gap2"
]
},
{
"cell_type": "markdown",
"id": "630c0927",
"metadata": {},
"source": [
"Let us construct some graphs that show us how the initial college-high-school wage ratio $ \\phi $ would change if one of its determinants were to change.\n",
"\n",
"Let’s start with the gross interest rate $ R $."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "1728045b",
"metadata": {
"hide-output": false
},
"outputs": [],
"source": [
"R_arr = np.linspace(1, 1.2, 50)\n",
"models = [create_edm(R=r) for r in R_arr]\n",
"gaps = [compute_gap(model) for model in models]\n",
"\n",
"plt.plot(R_arr, gaps)\n",
"plt.xlabel(r'$R$')\n",
"plt.ylabel(r'wage gap')\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"id": "039245e3",
"metadata": {},
"source": [
"Evidently, the initial wage ratio $ \\phi $ must rise to compensate a prospective high school student for **waiting** to start receiving income – remember that while she is earning nothing in years $ t=0, 1, 2, 3 $, the high school worker is earning a salary.\n",
"\n",
"Not let’s study what happens to the initial wage ratio $ \\phi $ if the rate of growth of college wages rises, holding constant other\n",
"determinants of $ \\phi $."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "9770d64c",
"metadata": {
"hide-output": false
},
"outputs": [],
"source": [
"γc_arr = np.linspace(1, 1.2, 50)\n",
"models = [create_edm(γ_c=γ_c) for γ_c in γc_arr]\n",
"gaps = [compute_gap(model) for model in models]\n",
"\n",
"plt.plot(γc_arr, gaps)\n",
"plt.xlabel(r'$\\gamma_c$')\n",
"plt.ylabel(r'wage gap')\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"id": "09151d40",
"metadata": {},
"source": [
"Notice how the initial wage gap falls when the rate of growth $ \\gamma_c $ of college wages rises.\n",
"\n",
"The wage gap falls to “equalize” the present values of the two types of career, one as a high school worker, the other as a college worker.\n",
"\n",
"Can you guess what happens to the initial wage ratio $ \\phi $ when next we vary the rate of growth of high school wages, holding all other determinants of $ \\phi $ constant?\n",
"\n",
"The following graph shows what happens."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "f66e7e50",
"metadata": {
"hide-output": false
},
"outputs": [],
"source": [
"γh_arr = np.linspace(1, 1.1, 50)\n",
"models = [create_edm(γ_h=γ_h) for γ_h in γh_arr]\n",
"gaps = [compute_gap(model) for model in models]\n",
"\n",
"plt.plot(γh_arr, gaps)\n",
"plt.xlabel(r'$\\gamma_h$')\n",
"plt.ylabel(r'wage gap')\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"id": "58e5eb0a",
"metadata": {},
"source": [
"## Entrepreneur-worker interpretation\n",
"\n",
"We can add a parameter and reinterpret variables to get a model of entrepreneurs versus workers.\n",
"\n",
"We now let $ h $ be the present value of a “worker”.\n",
"\n",
"We define the present value of an entrepreneur to be\n",
"\n",
"$$\n",
"c_0 = \\pi \\sum_{t=4}^T R^{-t} w_t^c\n",
"$$\n",
"\n",
"where $ \\pi \\in (0,1) $ is the probability that an entrepreneur’s “project” succeeds.\n",
"\n",
"For our model of workers and firms, we’ll interpret $ D $ as the cost of becoming an entrepreneur.\n",
"\n",
"This cost might include costs of hiring workers, office space, and lawyers.\n",
"\n",
"What we used to call the college, high school wage gap $ \\phi $ now becomes the ratio\n",
"of a successful entrepreneur’s earnings to a worker’s earnings.\n",
"\n",
"We’ll find that as $ \\pi $ decreases, $ \\phi $ increases, indicating that the riskier it is to\n",
"be an entrepreneur, the higher must be the reward for a successful project.\n",
"\n",
"Now let’s adopt the entrepreneur-worker interpretation of our model"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "15bbb5d7",
"metadata": {
"hide-output": false
},
"outputs": [],
"source": [
"# Define a model of entrepreneur-worker interpretation\n",
"EqDiffModel = namedtuple('EqDiffModel', 'R T γ_h γ_c w_h0 D π')\n",
"\n",
"def create_edm_π(R=1.05, # gross rate of return\n",
" T=40, # time horizon\n",
" γ_h=1.01, # high-school wage growth\n",
" γ_c=1.01, # college wage growth\n",
" w_h0=1, # initial wage (high school)\n",
" D=10, # cost for college\n",
" π=0 # chance of business success\n",
" ):\n",
" \n",
" return EqDiffModel(R, T, γ_h, γ_c, w_h0, D, π)\n",
"\n",
"\n",
"def compute_gap(model):\n",
" R, T, γ_h, γ_c, w_h0, D, π = model\n",
" \n",
" A_h = (1 - (γ_h/R)**(T+1)) / (1 - γ_h/R)\n",
" A_c = (1 - (γ_c/R)**(T-3)) / (1 - γ_c/R) * (γ_c/R)**4\n",
" \n",
" # Incorprate chance of success\n",
" A_c = π * A_c\n",
" \n",
" ϕ = A_h / A_c + D / (w_h0 * A_c)\n",
" return ϕ"
]
},
{
"cell_type": "markdown",
"id": "98583ae5",
"metadata": {},
"source": [
"If the probability that a new business succeeds is $ 0.2 $, let’s compute the initial wage premium for successful entrepreneurs."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "771333fd",
"metadata": {
"hide-output": false
},
"outputs": [],
"source": [
"ex3 = create_edm_π(π=0.2)\n",
"gap3 = compute_gap(ex3)\n",
"\n",
"gap3"
]
},
{
"cell_type": "markdown",
"id": "5e8f6880",
"metadata": {},
"source": [
"Now let’s study how the initial wage premium for successful entrepreneurs depend on the success probability."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "8b3784e8",
"metadata": {
"hide-output": false
},
"outputs": [],
"source": [
"π_arr = np.linspace(0.2, 1, 50)\n",
"models = [create_edm_π(π=π) for π in π_arr]\n",
"gaps = [compute_gap(model) for model in models]\n",
"\n",
"plt.plot(π_arr, gaps)\n",
"plt.ylabel(r'wage gap')\n",
"plt.xlabel(r'$\\pi$')\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"id": "cb6918a0",
"metadata": {},
"source": [
"Does the graph make sense to you?"
]
},
{
"cell_type": "markdown",
"id": "5aa785e2",
"metadata": {},
"source": [
"## An application of calculus\n",
"\n",
"So far, we have used only linear algebra and it has been a good enough tool for us to figure out how our model works.\n",
"\n",
"However, someone who knows calculus might want us just to take partial derivatives.\n",
"\n",
"We’ll do that now.\n",
"\n",
"A reader who doesn’t know calculus could read no further and feel confident that applying linear algebra has taught us the main properties of the model.\n",
"\n",
"But for a reader interested in how we can get Python to do all the hard work involved in computing partial derivatives, we’ll say a few things about that now.\n",
"\n",
"We’ll use the Python module ‘sympy’ to compute partial derivatives of $ \\phi $ with respect to the parameters that determine it.\n",
"\n",
"Define symbols"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "5847919d",
"metadata": {
"hide-output": false
},
"outputs": [],
"source": [
"γ_h, γ_c, w_h0, D = symbols('\\gamma_h, \\gamma_c, w_0^h, D', real=True)\n",
"R, T = Symbol('R', real=True), Symbol('T', integer=True)"
]
},
{
"cell_type": "markdown",
"id": "d989e5aa",
"metadata": {},
"source": [
"Define function $ A_h $"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "c2008cc1",
"metadata": {
"hide-output": false
},
"outputs": [],
"source": [
"A_h = Lambda((γ_h, R, T), (1 - (γ_h/R)**(T+1)) / (1 - γ_h/R))\n",
"A_h"
]
},
{
"cell_type": "markdown",
"id": "308ef675",
"metadata": {},
"source": [
"Define function $ A_c $"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "86c44d3a",
"metadata": {
"hide-output": false
},
"outputs": [],
"source": [
"A_c = Lambda((γ_c, R, T), (1 - (γ_c/R)**(T-3)) / (1 - γ_c/R) * (γ_c/R)**4)\n",
"A_c"
]
},
{
"cell_type": "markdown",
"id": "a8e518d8",
"metadata": {},
"source": [
"Now, define $ \\phi $"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "23b62eeb",
"metadata": {
"hide-output": false
},
"outputs": [],
"source": [
"ϕ = Lambda((D, γ_h, γ_c, R, T, w_h0), A_h(γ_h, R, T)/A_c(γ_c, R, T) + D/(w_h0*A_c(γ_c, R, T)))"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "9766dd72",
"metadata": {
"hide-output": false
},
"outputs": [],
"source": [
"ϕ"
]
},
{
"cell_type": "markdown",
"id": "91a93335",
"metadata": {},
"source": [
"We begin by setting default parameter values."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "49e9523f",
"metadata": {
"hide-output": false
},
"outputs": [],
"source": [
"R_value = 1.05\n",
"T_value = 40\n",
"γ_h_value, γ_c_value = 1.01, 1.01\n",
"w_h0_value = 1\n",
"D_value = 10"
]
},
{
"cell_type": "markdown",
"id": "d93133ff",
"metadata": {},
"source": [
"Now let’s compute $ \\frac{\\partial \\phi}{\\partial D} $ and then evaluate it at the default values"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "a73e19e0",
"metadata": {
"hide-output": false
},
"outputs": [],
"source": [
"ϕ_D = ϕ(D, γ_h, γ_c, R, T, w_h0).diff(D)\n",
"ϕ_D"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "7445c869",
"metadata": {
"hide-output": false
},
"outputs": [],
"source": [
"# Numerical value at default parameters\n",
"ϕ_D_func = Lambda((D, γ_h, γ_c, R, T, w_h0), ϕ_D)\n",
"ϕ_D_func(D_value, γ_h_value, γ_c_value, R_value, T_value, w_h0_value)"
]
},
{
"cell_type": "markdown",
"id": "bae75917",
"metadata": {},
"source": [
"Thus, as with our earlier graph, we find that raising $ R $ increases the initial college wage premium $ \\phi $.\n",
"\n",
"Compute $ \\frac{\\partial \\phi}{\\partial T} $ and evaluate it at default parameters"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "8a660ed6",
"metadata": {
"hide-output": false
},
"outputs": [],
"source": [
"ϕ_T = ϕ(D, γ_h, γ_c, R, T, w_h0).diff(T)\n",
"ϕ_T"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "5d61d343",
"metadata": {
"hide-output": false
},
"outputs": [],
"source": [
"# Numerical value at default parameters\n",
"ϕ_T_func = Lambda((D, γ_h, γ_c, R, T, w_h0), ϕ_T)\n",
"ϕ_T_func(D_value, γ_h_value, γ_c_value, R_value, T_value, w_h0_value)"
]
},
{
"cell_type": "markdown",
"id": "20f90ada",
"metadata": {},
"source": [
"We find that raising $ T $ decreases the initial college wage premium $ \\phi $.\n",
"\n",
"This is because college graduates now have longer career lengths to “pay off” the time and other costs they paid to go to college\n",
"\n",
"Let’s compute $ \\frac{\\partial \\phi}{\\partial γ_h} $ and evaluate it at default parameters."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "1709f9c1",
"metadata": {
"hide-output": false
},
"outputs": [],
"source": [
"ϕ_γ_h = ϕ(D, γ_h, γ_c, R, T, w_h0).diff(γ_h)\n",
"ϕ_γ_h"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "0d6a8d4c",
"metadata": {
"hide-output": false
},
"outputs": [],
"source": [
"# Numerical value at default parameters\n",
"ϕ_γ_h_func = Lambda((D, γ_h, γ_c, R, T, w_h0), ϕ_γ_h)\n",
"ϕ_γ_h_func(D_value, γ_h_value, γ_c_value, R_value, T_value, w_h0_value)"
]
},
{
"cell_type": "markdown",
"id": "6f7896b6",
"metadata": {},
"source": [
"We find that raising $ \\gamma_h $ increases the initial college wage premium $ \\phi $, in line with our earlier graphical analysis.\n",
"\n",
"Compute $ \\frac{\\partial \\phi}{\\partial γ_c} $ and evaluate it numerically at default parameter values"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "b9c98780",
"metadata": {
"hide-output": false
},
"outputs": [],
"source": [
"ϕ_γ_c = ϕ(D, γ_h, γ_c, R, T, w_h0).diff(γ_c)\n",
"ϕ_γ_c"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "1f6e3a89",
"metadata": {
"hide-output": false
},
"outputs": [],
"source": [
"# Numerical value at default parameters\n",
"ϕ_γ_c_func = Lambda((D, γ_h, γ_c, R, T, w_h0), ϕ_γ_c)\n",
"ϕ_γ_c_func(D_value, γ_h_value, γ_c_value, R_value, T_value, w_h0_value)"
]
},
{
"cell_type": "markdown",
"id": "f8bc0810",
"metadata": {},
"source": [
"We find that raising $ \\gamma_c $ decreases the initial college wage premium $ \\phi $, in line with our earlier graphical analysis.\n",
"\n",
"Let’s compute $ \\frac{\\partial \\phi}{\\partial R} $ and evaluate it numerically at default parameter values"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "0705fc6b",
"metadata": {
"hide-output": false
},
"outputs": [],
"source": [
"ϕ_R = ϕ(D, γ_h, γ_c, R, T, w_h0).diff(R)\n",
"ϕ_R"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "98a7d7d6",
"metadata": {
"hide-output": false
},
"outputs": [],
"source": [
"# Numerical value at default parameters\n",
"ϕ_R_func = Lambda((D, γ_h, γ_c, R, T, w_h0), ϕ_R)\n",
"ϕ_R_func(D_value, γ_h_value, γ_c_value, R_value, T_value, w_h0_value)"
]
},
{
"cell_type": "markdown",
"id": "4202dea2",
"metadata": {},
"source": [
"We find that raising the gross interest rate $ R $ increases the initial college wage premium $ \\phi $, in line with our earlier graphical analysis."
]
}
],
"metadata": {
"date": 1723931274.4608722,
"filename": "equalizing_difference.md",
"kernelspec": {
"display_name": "Python",
"language": "python3",
"name": "python3"
},
"title": "Equalizing Difference Model"
},
"nbformat": 4,
"nbformat_minor": 5
}