Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Make a weighted distribution

    I used to distribute national taxes X to households in Households Expenditure and Income Survey for measuring progressivity. I distributed all tax components by weight (distribution 1) and then divided them to weight for making household level values (distribution 2).
    when I compare these two distribution, the share in deciles are different, and also when use them for progressivity analysis by weight, the results are so different! what is wrong? Please! Regards.
    my syntax is:

    *Allocating national tax
    **Set national tax
    gen totaltax= 10*10^9
    **Allocating tax total tax to households
    format tax %20.0fc
    summ tax, format
    replace tax=0 if tax==.

    gen wtax= hhwt*tax
    egen totwtax=sum(wtax)
    gen basetax=wtax/totwtax
    gen alltax=totaltax*basetax
    table decile, c(mean alltax)/*(weighted distirbution 1)*/

    *National tax tax calculation
    gen ntaxtax=alltax/hhwt
    table decile, c(mean nalltax)/*(national distirbution 2)*/
    Last edited by mr Zakeri; 12 Jan 2018, 01:53.

  • #2
    You'll increase your chances of a useful answer by following the FAQ on asking questions - provide Stata code in code delimiters, readable Stata output, and sample data using dataex. Also, we normally use our real names (first and last) on this listserve.

    Without more information (e.g., what the different variables are), it is hard to know exactly what you've done. You have several different variables but how they relate is not obvious from the names. I would wonder about gen basetax=wtax/totwtax and gen alltax=totaltax*basetax. It looks like something should be additive in one of these equations. But, there seem to be simple multiplicative relations among many of these variables.

    Comment

    Working...
    X