Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solve ODE for ETI beliefs #36

Merged
merged 5 commits into from
Feb 25, 2025
Merged

Solve ODE for ETI beliefs #36

merged 5 commits into from
Feb 25, 2025

Conversation

john-p-ryan
Copy link
Contributor

In the case of variable ETI, we get an extra term for the JJZ formula:

$$g(z) = 1 + \theta_z \varepsilon(z) \frac{T'(z)}{1-T'(z)} + \varepsilon(z) \frac{zT''(z)}{(1-T'(z))^2}+ \varepsilon'(z)\frac{zT'(z)}{1-T'(z)}$$

If $T(z)$ and $g(z)$ are exogenous, we can view the endogenous $\varepsilon(z)$ as a first order differential equation from the JJZ formula with variable ETI above. This equation can be written as

$$ \varepsilon'(z)\left[\frac{zT'(z)}{1-T'(z)}\right] + \varepsilon(z)\left[\theta_z \frac{T'(z)}{1-T'(z)} +\frac{zT''(z)}{(1-T'(z))^2}\right]+ (1-g(z)) = 0$$

This is a differential equation of the form

$$ a(x) f'(x) + b(x) f(x) + c(x) = 0 $$

Renormalizing,

$$ f'(x) + P(x) f(x) = Q(x)$$

where $P(x) = \frac{b(x)}{a(x)}$ and $Q(x) = -\frac{c(x)}{a(x)}$. Let $\mu(x) = \exp(\int P(x) dx)$, and note that $\mu'(x) = \mu(x) P(x)$. Next, multiply by $\mu(x)$:

$$ \mu(x) f'(x) + \mu(x) P(x) f(x) = \mu(x) Q(x) $$ $$ \implies \frac{d}{dx}\left[\mu(x) f(x)\right] = \mu(x)Q(x) $$ $$ \implies f(x) = \frac{1}{\mu(x)}\left[\int \mu(x) Q(x) dx + C\right]$$ $$ = \exp\left(-\int \frac{b(x)}{a(x)}dx\right)\left[ \int \exp\left(\int\frac{b(y)}{a(y)}dy\right)dx + C\right] $$

Thus, our ETI formula becomes

$$\varepsilon(z) = \frac{1}{\mu(z)} \left[ \varepsilon_0 + \int_0^{z} Q(z') \mu(z')dz' \right] $$

Where:

$$\mu(z) = \exp \left(\int_0^z \frac{1}{z} + \frac{f'(z)}{f(z)} + \frac{T''(z)}{T'(z)(1-T'(z))}dz\right)$$ $$Q(z) = \frac{(g(z) - 1) (1-T'(z))}{z T'(z)}$$

Thus, in the thought experiment in which we ask "What beliefs on the ETI does Clinton need to justify her policies under Trump's social welfare weights?", we get the following result (assuming Trump's proposal is under $\varepsilon_z = .25$):

eti_clinton

The interpretation is that Clinton needs lower beliefs on the ETI to justify her policies assuming Trump's weights. However, the differences are modest. Clinton can justify her policy differences by only believing an average ETI of about $.242$ rather than $.25$.

@codecov-commenter
Copy link

codecov-commenter commented Feb 25, 2025

Codecov Report

Attention: Patch coverage is 20.00000% with 8 lines in your changes missing coverage. Please review.

Project coverage is 48.76%. Comparing base (10985c1) to head (bcaf193).
Report is 45 commits behind head on main.

Files with missing lines Patch % Lines
iot/inverse_optimal_tax.py 20.00% 8 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (10985c1) and HEAD (bcaf193). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (10985c1) HEAD (bcaf193)
unittests 3 2
Additional details and impacted files
@@             Coverage Diff             @@
##             main      #36       +/-   ##
===========================================
- Coverage   72.81%   48.76%   -24.06%     
===========================================
  Files           3        3               
  Lines         103      162       +59     
===========================================
+ Hits           75       79        +4     
- Misses         28       83       +55     
Flag Coverage Δ
unittests 48.76% <20.00%> (-24.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jdebacker
Copy link
Member

@john-p-ryan Thanks for working this out. LGTM. Merging.

@jdebacker jdebacker merged commit 5f27f7e into PSLmodels:main Feb 25, 2025
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants