Announcement

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

  • Adding observations together if a condition is met

    I have a data set for the total wages for fast food workers for each different restaurant in a large region. The data is broken up by state, county, restaurant, and then wages by month. What I need is to do is add together all wages in each country, and eliminate the restaurant variable altogether. I.e. it doesn't matter to me if Burger King in County A paid 10k in wages this month but McDonalds in the same county only paid 8k, I just need to find the total amount spent on wages in each county.

    Thank you!

  • #2
    This sounds like a problem for egen: see its total() function.

    Comment

    Working...
    X