Reputation: 191
I have the percentiles of profits of multiple firms and the costs of each firm. I want to calculate the average of the costs of the firms in each percentile group so that I can graph the average costs vs percentiles of profits.
How do I do this?
Upvotes: 0
Views: 202
Reputation: 19395
I suppose you have a variable percentile_group
that identifies the group, right? and some other variable cost
. then you just need to run
collapse cost, by(percentile_group)
Upvotes: 2