Clyde Schechter Thanks for the help. Yes, I guess I've changed the code because I've used it on other databases, I guess I did make some changes in the process, and now when I wanted to use it again, it gave me that error message. Thanks for the help anyway.
Still, here, there is a problem that I do want to get your advice on if it is possible: The current database I'm using (the one on #14) is about taxes people pay according to their revenus, yet, there are some people (those with revenu that doesn't exceed a certain amount, the poor classes if you want to call them that way) who don't pay taxes (the variable "Taxe_Payé" for those people is 0), but still they do have a revenu. The problem that these people are creating when I apply the code is that when dividing the "Taxe_Payé" by "Revenu_Annéeé", it is a divison of 0 by a positive value, and that gives me a result that's a bit weird to analyse, here's the result:
The proble is that, for the first class, it gives me a "wrong" "effective_tax_rate", since I guess the "gen effective_tax_rate = Impot_Payé/Revenu_Année" command of the code created some distortion for that first class, since it had to use 0 paid taxes and divide it by a positive revenu for that first poor class.
Is there a way to correct this please? I do want to show the first class, and I guess for those people, they should have a really small "effective_tax_rate" that could be close to zero, since they pay about nothing in taxes compared to the small revenus they earn. Yet, the code gets me an effective_tax_rate of about 337% for that first class, and that doesn't make sense.
Any help please? With many thanks!
Still, here, there is a problem that I do want to get your advice on if it is possible: The current database I'm using (the one on #14) is about taxes people pay according to their revenus, yet, there are some people (those with revenu that doesn't exceed a certain amount, the poor classes if you want to call them that way) who don't pay taxes (the variable "Taxe_Payé" for those people is 0), but still they do have a revenu. The problem that these people are creating when I apply the code is that when dividing the "Taxe_Payé" by "Revenu_Annéeé", it is a divison of 0 by a positive value, and that gives me a result that's a bit weird to analyse, here's the result:
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float bracket long id_num double Revenu_Année float(Impot_Payé effective_tax_rate) double total_income 1 11293 327.03265967772097 74.21466 3.3798416 3693179.825740503 10 105704 2061.5124999654527 31.88242 .02203993 217910117.2963482 20 108870 3529.9655197542434 57.90738 .016248617 384307346.1356445 40 225867 8787.90451409199 728.749 .06950825 1984897628.8844154 60 225867 16971.8567085875 2620.085 .15248114 3833382359.198533 80 225868 23487.14526649053 4180.503 .1777457 5304994527.051683 90 112933 27809.098754913826 5194.637 .186663 3140564949.688683 95 56469 35072.8734448177 6954.365 .1980317 1980530090.5554106 99 45171 46170.90434383673 10492.78 .22471543 2085585920.115449 99.9 10164 107625.7937056832 27840.965 .25883132 1093908567.224564 100 1129 465566.7259929141 120939.2 .26597884 525624833.646 end
Is there a way to correct this please? I do want to show the first class, and I guess for those people, they should have a really small "effective_tax_rate" that could be close to zero, since they pay about nothing in taxes compared to the small revenus they earn. Yet, the code gets me an effective_tax_rate of about 337% for that first class, and that doesn't make sense.
Any help please? With many thanks!
Comment