Announcement

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

  • "xtile" for each country and each year separately

    Hi all,

    I have a dataset with individuals as observations. Each individual belongs to one of 25 countries (cntrycode) and one of two years (year; 2007, 2011). For each observation I have income (y). I would like to construct a variable which would be the same as if I did -xtile- for y for each country and year. I tired with bysort cntrycode year: xtile newvar = y, n(4), but xtile is not by-able unfotunately. Any ideas? Thanks.

    i
    // ivica_rubil //

  • #2
    egenmore (SSC) includes an xtile() function that supports this.

    Comment

    Working...
    X