Announcement

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

  • sum of variables by group

    Dear Statalists,
    I would like to perform some easy arithmetic operations. I have a panel dataset. In the dataset I have a cohort variable, called cohort, which contains people born from 1950-1954, people 1955-1959 and so on. I have another variable, yrcategory, which expresses the age bracket for every cohort. I also have another variable expressing the income of the cohort for every age bracket.
    I would like to just sum the incomes of a cohort for a number of age brackets, and then subtract the incomes for a different cohort for the same age brackets.
    Can anybody help me?
    Please let me know if I have not expressed myself clearly

  • #2
    I would like to just sum the incomes of a cohort for a number of age brackets, and then subtract the incomes for a different cohort for the same age brackets.
    On the surface, yes. These seem possible to achieve.

    Please let me know if I have not expressed myself clearly
    The description of the data is severely lacking in details for users here to provide anything useful. For starter, follow the FAQ (http://www.statalist.org/forums/help) and use -dataex- to provide some data example that would help illustrating 1) what the data actually look like, make sure to show at enough cohorts and age categories, and 2) how you'd carry out the calculation.

    Comment

    Working...
    X