def compute_lambda(c, T): """ Compute the job finding rate given c and T by first computing the reservation wage from the McCall model. """ mcm = McCallModel(alpha=alpha, beta=beta, gamma=gamma, c=c-T, # post tax compensation u=u, w_vec=w_vec-T, # post tax wages p_vec=p_vec) w_bar = compute_reservation_wage(mcm) lmda = np.sum(p_vec[w_vec > w_bar]) return lmda
def compute_optimal_quantities(c, tau): """ Compute the reservation wage, job finding rate and value functions of the workers given c and tau. """ mcm = McCallModel(alpha=alpha_q, beta=beta, gamma=gamma, c=c-tau, # post tax compensation sigma=sigma, w_vec=w_vec-tau, # post tax wages p_vec=p_vec) w_bar, V, U = compute_reservation_wage(mcm, return_values=True) lmda = gamma * np.sum(p_vec[w_vec-tau > w_bar]) return w_bar, lmda, V, U
def compute_optimal_quantities(c, tau): """ Compute the reservation wage, job finding rate and value functions of the workers given c and tau. """ mcm = McCallModel( alpha=alpha_q, beta=beta, gamma=gamma, c=c - tau, # post tax compensation sigma=sigma, w_vec=w_vec - tau, # post tax wages p_vec=p_vec) w_bar, V, U = compute_reservation_wage(mcm, return_values=True) lmda = gamma * np.sum(p_vec[w_vec - tau > w_bar]) return w_bar, lmda, V, U
""" import numpy as np import matplotlib.pyplot as plt from mccall_bellman_iteration import McCallModel, solve_mccall_model from compute_reservation_wage import compute_reservation_wage grid_size = 25 beta_vals = np.linspace(0.8, 0.99, grid_size) w_bar_vals = np.empty_like(beta_vals) mcm = McCallModel() fig, ax = plt.subplots() for i, beta in enumerate(beta_vals): mcm.beta = beta w_bar = compute_reservation_wage(mcm) w_bar_vals[i] = w_bar ax.set_xlabel('discount factor') ax.set_ylabel('reservation wage') ax.set_xlim(beta_vals.min(), beta_vals.max()) txt = r'$\bar w$ as a function of $\beta$' ax.plot(beta_vals, w_bar_vals, 'b-', lw=2, alpha=0.7, label=txt) ax.legend(loc='upper left') ax.grid() plt.show()