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
Stata triple interaction and base categoryI have four variables: panid (id variable), period (categorical going from 0 to 2), size (categorica…
How to perform an interrupted time series analysis with multiple treatment groups?Hi all, I'm do a controlled interrupted time series analysis on Stata 15.1. I have five years of p…
Compustat-Calculating a firms age (not based on IPO-data)Hello! For my masterthesis I am using the Gfunda as well as the Northamerica Database in Compustat.…
Is quantile regression with clustered standard errors a good option?I'm working with panel data with evidence of heteroskedasticity. I am looking at returns to college …
Problem with calculating functions over subgroupsHi, I am having some troubles in computing functions over subgroups. Basically, I have some financ…
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