Master_Thesis_Paulogcd_2025.Bellman_FOC_1Master_Thesis_Paulogcd_2025.Bellman_FOC_1_interpolatedMaster_Thesis_Paulogcd_2025.Bellman_FOC_2Master_Thesis_Paulogcd_2025.Bellman_FOC_2_interpolatedMaster_Thesis_Paulogcd_2025.Bellman_numericalMaster_Thesis_Paulogcd_2025.Bellman_numerical_interpolatedMaster_Thesis_Paulogcd_2025.HPMaster_Thesis_Paulogcd_2025.Health_Proxy_plotMaster_Thesis_Paulogcd_2025.average_health_plotMaster_Thesis_Paulogcd_2025.backwards_FOC_1Master_Thesis_Paulogcd_2025.backwards_FOC_1_interpolatedMaster_Thesis_Paulogcd_2025.backwards_FOC_2Master_Thesis_Paulogcd_2025.backwards_FOC_2_interpolatedMaster_Thesis_Paulogcd_2025.backwards_numericalMaster_Thesis_Paulogcd_2025.backwards_numerical_interpolatedMaster_Thesis_Paulogcd_2025.budget_surplusMaster_Thesis_Paulogcd_2025.deleteMaster_Thesis_Paulogcd_2025.extra_health_survivalMaster_Thesis_Paulogcd_2025.healthMaster_Thesis_Paulogcd_2025.health_transition_3D_plotMaster_Thesis_Paulogcd_2025.plot_demographic_comparisonMaster_Thesis_Paulogcd_2025.plot_policies_FOC_1Master_Thesis_Paulogcd_2025.plot_policies_FOC_1_interpolatedMaster_Thesis_Paulogcd_2025.plot_pure_numericalMaster_Thesis_Paulogcd_2025.plot_pure_numerical_interpolatedMaster_Thesis_Paulogcd_2025.policy_comparison_plotMaster_Thesis_Paulogcd_2025.population_health_simulationMaster_Thesis_Paulogcd_2025.produce_graphMaster_Thesis_Paulogcd_2025.runMaster_Thesis_Paulogcd_2025.survivalMaster_Thesis_Paulogcd_2025.temperatureMaster_Thesis_Paulogcd_2025.testMaster_Thesis_Paulogcd_2025.utilityMaster_Thesis_Paulogcd_2025.ξ
Master_Thesis_Paulogcd_2025.Bellman_FOC_1 — MethodThe Bellman_FOC_1 function is not to be used alone, but with the backwards function.
function Bellman_FOC_1(;s_range::AbstractRange,
sprime_range::AbstractRange,
consumption_range::AbstractRange,
labor_range::AbstractRange,
value_function_nextperiod::Any,
β = 0.96::Float64,
z = 1::Float64,
ρ = 1.5::Float64,
φ = 2::Float64,
proba_survival = 0.9::Float64,
r = ((1-0.9)/0.9)::Float64,
w = 0.0::Float64,
h = 2.00::Float64,
return_full_grid = true::Bool,
return_budget_balance = true::Bool)::NamedTupleMaster_Thesis_Paulogcd_2025.Bellman_FOC_1_interpolated — MethodThe Bellman_FOC_1_interpolated function is not to be used alone, but with the backwards function.
function Bellman_FOC_1_interpolated(;s_range::AbstractRange,
sprime_range::AbstractRange,
consumption_range::AbstractRange,
labor_range::AbstractRange,
value_function_nextperiod::Any,
β = 0.96::Float64,
z = 1::Float64,
ρ = 1.5::Float64,
φ = 2::Float64,
proba_survival = 0.9::Float64,
r = ((1-0.9)/0.9)::Float64,
w = 0.0::Float64,
h = 2.00::Float64,
return_full_grid = true::Bool,
return_budget_balance = true::Bool)::NamedTupleMaster_Thesis_Paulogcd_2025.Bellman_FOC_2 — MethodThe Bellman_FOC_2 function is not to be used alone, but with the backwards function.
function Bellman_FOC_2(;s_range::AbstractRange,
sprime_range::AbstractRange,
consumption_range::AbstractRange,
labor_range::AbstractRange,
value_function_nextperiod::Any,
β = 0.96::Float64,
z = 1::Float64,
ρ = 1.5::Float64,
φ = 2::Float64,
proba_survival = 0.9::Float64,
r = ((1-0.9)/0.9)::Float64,
w = 0.0::Float64,
h = 2.00::Float64,
return_full_grid = true::Bool,
return_budget_balance = true::Bool)::NamedTupleMaster_Thesis_Paulogcd_2025.Bellman_FOC_2_interpolated — MethodThe Bellman_FOC_2 function is not to be used alone, but with the backwards function.
function Bellman_FOC_2_interpolated(;s_range::AbstractRange,
sprime_range::AbstractRange,
consumption_range::AbstractRange,
labor_range::AbstractRange,
value_function_nextperiod::Any,
β = 0.96::Float64,
z = 1::Float64,
ρ = 1.5::Float64,
φ = 2::Float64,
proba_survival = 0.9::Float64,
r = ((1-0.9)/0.9)::Float64,
w = 0.0::Float64,
h = 2.00::Float64,
return_full_grid = true::Bool,
return_budget_balance = true::Bool)::NamedTupleMaster_Thesis_Paulogcd_2025.Bellman_numerical — MethodThe Bellman_numerical function is not to be used alone, but with the backwards function.
function Bellman_numerical(;s_range::AbstractRange,
sprime_range::AbstractRange,
consumption_range::AbstractRange,
labor_range::AbstractRange,
value_function_nextperiod::Any,
β = 0.96::Float64,
z = 1::Float64,
ρ = 1.5::Float64,
φ = 2::Float64,
proba_survival = 0.9::Float64,
r = ((1-0.9)/0.9)::Float64,
w = 0.0::Float64,
h = 2.00::Float64,
return_full_grid = true::Bool,
return_budget_balance = true::Bool)::NamedTupleMaster_Thesis_Paulogcd_2025.Bellman_numerical_interpolated — MethodThe Bellman_numerical function is not to be used alone, but with the backwards function.
function Bellman_numerical_interpolated(;s_range::AbstractRange,
sprime_range::AbstractRange,
consumption_range::AbstractRange,
labor_range::AbstractRange,
value_function_nextperiod::Any,
β = 0.96::Float64,
z = 1::Float64,
ρ = 1.5::Float64,
φ = 2::Float64,
proba_survival = 0.9::Float64,
r = ((1-0.9)/0.9)::Float64,
w = 0.0::Float64,
h = 2.00::Float64,
return_full_grid = true::Bool,
return_budget_balance = true::Bool)::NamedTupleMaster_Thesis_Paulogcd_2025.HP — MethodThe HP function is not to be used alone. It returns the estimated Health Proxy value for a combination of age and temperature values.
Master_Thesis_Paulogcd_2025.Health_Proxy_plot — MethodThe Health_Proxy_plot function plots the predicted health proxy for a range of age, and for the different temperature scenarios.
Master_Thesis_Paulogcd_2025.average_health_plot — MethodThe average_health_plot function generates a plot of the average health over time for the three different temperature scenarios. It takes N and T as arguments, with N the size of the population, and T the number of periods.
Master_Thesis_Paulogcd_2025.backwards_FOC_1 — Methodfunction backwards_FOC_1(;s_range::AbstractRange,
sprime_range::AbstractRange,
consumption_range::AbstractRange,
labor_range::AbstractRange,
nperiods::Integer,
z = ones(nperiods)::Array,
β = 0.9::Float64,
r = final_r::Array,
ρ = 1.50::Float64,
φ = 2.00::Float64,
proba_survival = 0.90::Float64,
w = 0.00::Float64,
h = "good"::AbstractString,
return_full_grid = false::Bool,
return_budget_balance = true::Bool)::NamedTupleMaster_Thesis_Paulogcd_2025.backwards_FOC_1_interpolated — Methodfunction backwards_FOC_1_interpolated(;s_range::AbstractRange,
sprime_range::AbstractRange,
consumption_range::AbstractRange,
labor_range::AbstractRange,
nperiods::Integer,
z = ones(nperiods)::Array,
β = 0.9::Float64,
r = final_r::Array,
ρ = 1.50::Float64,
φ = 2.00::Float64,
proba_survival = 0.90::Float64,
w = 0.00::Float64,
h = "good"::AbstractString,
return_full_grid = false::Bool,
return_budget_balance = true::Bool)::NamedTupleMaster_Thesis_Paulogcd_2025.backwards_FOC_2 — Methodfunction backwardsFOC2(;srange::AbstractRange, sprimerange::AbstractRange, consumptionrange::AbstractRange, laborrange::AbstractRange, nperiods::Integer, z = ones(nperiods)::Array, β = 0.9::Float64, r = finalr::Array, ρ = 1.50::Float64, φ = 2.00::Float64, probasurvival = 0.90::Float64, w = 0.00::Float64, h = "good"::AbstractString, returnfullgrid = false::Bool, returnbudgetbalance = true::Bool)::NamedTuple
Master_Thesis_Paulogcd_2025.backwards_FOC_2_interpolated — Methodfunction backwardsFOC2(;srange::AbstractRange, sprimerange::AbstractRange, consumptionrange::AbstractRange, laborrange::AbstractRange, nperiods::Integer, z = ones(nperiods)::Array, β = 0.9::Float64, r = finalr::Array, ρ = 1.50::Float64, φ = 2.00::Float64, probasurvival = 0.90::Float64, w = 0.00::Float64, h = "good"::AbstractString, returnfullgrid = false::Bool, returnbudgetbalance = true::Bool)::NamedTuple
Master_Thesis_Paulogcd_2025.backwards_numerical — Methodfunction backwards(;s_range::AbstractRange,
sprime_range::AbstractRange,
consumption_range::AbstractRange,
labor_range::AbstractRange,
nperiods::Integer,
z = ones(nperiods)::Array,
β = 0.9::Float64,
r = final_r::Array,
ρ = 1.50::Float64,
φ = 2.00::Float64,
proba_survival = 0.90::Float64,
w = 0.00::Float64,
h = "good"::AbstractString,
return_full_grid = false::Bool,
return_budget_balance = true::Bool)::NamedTupleMaster_Thesis_Paulogcd_2025.backwards_numerical_interpolated — Methodfunction backwards(;s_range::AbstractRange,
sprime_range::AbstractRange,
consumption_range::AbstractRange,
labor_range::AbstractRange,
nperiods::Integer,
z = ones(nperiods)::Array,
β = 0.9::Float64,
r = final_r::Array,
ρ = 1.50::Float64,
φ = 2.00::Float64,
proba_survival = 0.90::Float64,
w = 0.00::Float64,
h = "good"::AbstractString,
return_full_grid = false::Bool,
return_budget_balance = true::Bool)::NamedTupleMaster_Thesis_Paulogcd_2025.budget_surplus — MethodThe budget_surplus function computes the budget states for certain levels of consumption, labor supply, productivity, and savings.
Its syntax is:
budget_surplus(;c::Float64,
l::Float64,
sprime::Float64,
s::Float64,
z::Float64,
r::Float64)::Float64Master_Thesis_Paulogcd_2025.delete — MethodThe delete function deletes the generated plots and results. It checks if the "output" folder exists, and delete it if it is the case.
Master_Thesis_Paulogcd_2025.extra_health_survival — MethodThe extra_health_survival function generates an extra plot, of the logistic regression explaining living status with age and health. It is not directly used in my master thesis, but is useful for two reasons. First, I confirm that results are similar to articles studying this same relationship. Second, it allows to see the link between health state and survival without the effect of temperature.
Master_Thesis_Paulogcd_2025.health — MethodThe health function is not to be used alone. It returns the estimated health transition probabilities for a combination of age, temperature, and previous health state values.
Master_Thesis_Paulogcd_2025.health_transition_3D_plot — MethodThe health_transition_3D_plot function generates 3D plots of the health transition probabilities. It produces 5 html files, which correspond to transition probabilities from the 5 possible health states.
Master_Thesis_Paulogcd_2025.plot_demographic_comparison — MethodThis function plots the demographic evolution of the four different scenarios.
Master_Thesis_Paulogcd_2025.plot_policies_FOC_1 — MethodThe plot_policies_FOC_1 function generates the plot of the policies with an average per age category.
Master_Thesis_Paulogcd_2025.plot_policies_FOC_1_interpolated — MethodThe plot_policies_FOC_1_interpolated function generates the plot of the policies with an average per age category.
Master_Thesis_Paulogcd_2025.plot_pure_numerical — MethodThe plot_consumption_pure_numerical function generates the plot of the policies with an average per age category.
Master_Thesis_Paulogcd_2025.plot_pure_numerical_interpolated — MethodThe plot_pure_numerical_interpolated function generates the plot of the policies with an average per age category.
Master_Thesis_Paulogcd_2025.policy_comparison_plot — MethodThe policy_comparison_plot function generates plots displaying the policy functions with different temperature scenarios. It does so by averaging the policies accross all life, from 20 to 100 years old.
Master_Thesis_Paulogcd_2025.population_health_simulation — MethodThe population_health_simulation function is not to be used alone. It produces a population simulation in which individuals do not draw their living status, but draw their health status each period.
Master_Thesis_Paulogcd_2025.produce_graph — MethodThis function is not to be used alone. The produce_graph function generates a plot of demographic evolution with three different populations with three different temperature paths.
Master_Thesis_Paulogcd_2025.run — MethodThe run function generates all plots of the package, in an "output" folder.
Master_Thesis_Paulogcd_2025.survival — MethodThis function is not to be used alone. The survival function computes the probability of survival for a combination of age and temperature.
Master_Thesis_Paulogcd_2025.temperature — MethodThe temperature function returns the plot of average annual temperature from 1900 to 2022.
Master_Thesis_Paulogcd_2025.test — MethodThe test function ensures the package is well loaded.
Master_Thesis_Paulogcd_2025.utility — MethodThe utility function is defined such that its syntax is:
utility(;c,l,z,w,h,ρ=1.5,φ=2)It returns:
(abs(c)^(1-ρ))/(1-ρ) - ξ(w,h) *((abs(l)^(1+φ)/(1+φ)))Master_Thesis_Paulogcd_2025.ξ — MethodThe ξ function returns the disutility of work in the utility function.
Its syntax is:
ξ(w,h)For now, it returns 1.
# (1+abs(w))*(1+1(h=="bad"))