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 to count a variable based on an if conditionHello everyone, I have a big doubt about this counting issue: Array Let's suppose we have to coun…
Measuring Overeducation with Marsh CPS DataDear all, i'm trying to compute the level of education to occupation mismatch for the individuals …
Understanding interactions between 2 multi-categorical variablesDear community, In an experiment I conducted where i implemented different gamification strategies …
Panel ARDL (PMG, MG, DFE) do fileHello All, I was wondering if you could help me with the do file for Panel ARDL (PMG, MG, DFE) I ne…
Difficulty with for loop with a conditional by() statementHello, I am working with a data-set with analyst forecasts for certain firms, in a certain period. …
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