Hello everyone,
I am modelling optimal marginal income tax rates. I use two models. One is very volatile for extremely high incomes, which is why I use a second model which works only for very high incomes. To compute my final marginal tax rates, I need to merge the results of the two models based on where they intersect for high incomes. I know this is always the second time they intersect. The image below shows an example of the situation:
Array
Variables are mtr and mtrh
Essentially, I want Stata to find where the two variables intersect for the second time. Then, have Stata generate a new variable which equals mtr for all levels of income below the intersection, and the then equal the rate of the intersection (constant) for the high levels of income.
I could easily do this manually, but since I want to simulate this endless times using different income distributions, I would much rather have Stata do it for me.
If I could get Stata to return the level of income for which mtr and mtrh intersect for the second time, I would be able to generate the desired variable easily. Can anyone help me with this?
Kind regards,
Patrick Lambertus
Related Posts with How to get Stata to return where two variables intersect for the second time
How can I show my matrix here?I know -dataex- can upload variables on this website. But I want to upload a matrix on this website.…
How to suppress the title name and column name in -estout- command?My dataset (matrix): Code: * Example generated by -dataex-. To install: ssc install dataex clear in…
How can i split a variable?Hello everybody I have a problem I am looking for how to solve it. In my database I have a variable…
Diff-in-Diff with Kernel PSM: R-Square and CoefficientsHi! I try to estimate 3 consecutive models using the "diff" command in Stata: 1. Diff model: Code…
Using svyset and switching between two datasets with two-stage designI have two datasets of a sample that were created using Probability Proportional to Size (PPS) sampl…
Subscribe to:
Post Comments (Atom)
0 Response to How to get Stata to return where two variables intersect for the second time
Post a Comment