{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Impatient Robinson" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Up to now, we have implicitly assumed Robinson to be forward-looking with respect to his intertemporal preferences, such that he maximizes the expected present value of utility over the remaining lifetime according to\n", "\n", "$$\n", " U_t(u_t, u_{t+1}, ...) \\equiv \\sum^{T}_{t=0}\n", " {\\delta^{t}u_t}\n", "$$\n", "\n", "where $\\delta \\in (0,1]$ is the usual standard discount factor representing time-consistent preferences. With **respy** you can solve a discrete choice dynamic programming model for a (completely naïve) agent with time-inconsistent preferences just as easily. \n", "\n", "We represent time-inconsistency with the popular formulation by O’Donoghue and Rabin (1999): ($\\beta$-$\\delta$) preferences, defined as\n", "\n", "\n", "$$\n", " U_t(u_t, u_{t+1}, ...) \\equiv u_t + \\beta \\sum^{T}_{k=t+1}\n", " {\\delta^{k-t}u_k}\n", "$$\n", "\n", "where $\\beta \\in (0, 1]$ is the present-bias factor that captures time-inconsistent discounting, or impatience; the tendency to prefer activities that are immediately rewarded while procrastinating those that require an immediate cost. If $\\beta = 1$ we are back to the time-consistent case.\n", "\n", "In this tutorial, we will see how to model the behavior of an impatient Robinson who is additionally completely naïve with respect to his own time preferences, that is, at each point in time believes he will act time-consistently in future periods." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "%matplotlib agg\n", "\n", "import io\n", "import yaml\n", "\n", "import matplotlib.pyplot as plt\n", "import pandas as pd\n", "import respy as rp\n", "import numpy as np" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Specifications" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "To represent Robinson's impatience, we just need to add ``\"beta\"`` to the string containing the parameters and specifications of the model. ``\"beta\"`` is by default equal to 1 (time-consistent discounting). Here we set it to 0.4:" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "params_beta = \"\"\"\n", "category,name,value\n", "beta,beta, 0.4\n", "delta,delta,0.95\n", "wage_fishing,exp_fishing,0.1\n", "nonpec_fishing,constant,-1\n", "nonpec_hammock,constant,2.5\n", "nonpec_hammock,not_fishing_last_period,-1\n", "shocks_sdcorr,sd_fishing,1\n", "shocks_sdcorr,sd_hammock,1\n", "shocks_sdcorr,corr_hammock_fishing,-0.2\n", "lagged_choice_1_hammock,constant,1\n", "\"\"\"" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | \n", " | value | \n", "
---|---|---|
category | \n", "name | \n", "\n", " |
beta | \n", "beta | \n", "0.40 | \n", "
delta | \n", "delta | \n", "0.95 | \n", "
wage_fishing | \n", "exp_fishing | \n", "0.10 | \n", "
nonpec_fishing | \n", "constant | \n", "-1.00 | \n", "
nonpec_hammock | \n", "constant | \n", "2.50 | \n", "
not_fishing_last_period | \n", "-1.00 | \n", "|
shocks_sdcorr | \n", "sd_fishing | \n", "1.00 | \n", "
sd_hammock | \n", "1.00 | \n", "|
corr_hammock_fishing | \n", "-0.20 | \n", "|
lagged_choice_1_hammock | \n", "constant | \n", "1.00 | \n", "