Hello everybody;
I'am new in this forum. I've studied Stata at my university for about 2 years, and now i'am preparing a paper for my graduation. And I needed Stata to deal with a 25000 observation dataset
Here's a little of it:
id region salaries weight
1 1 1200 23.15
2 1 500 7.65
3 2 100 10.12
4 2 1700 2.95
5 3 2050 14.00
6 3 1435 3.60
My goal is to calculate weighted totals (sums) of salaries by region
I've tried most of the commun commands: bysort egen, bysort asgen (bysort doesn't allow weights), i've tried collapse but i didn't understand how to use it with all it's options for my kinda of data and goal
I would be so happy to hear your suggestions about a Stata comman or algorithm that could help me get the total of salaries, by region, considering the weights
THANKS VERY MUCH !
I'am new in this forum. I've studied Stata at my university for about 2 years, and now i'am preparing a paper for my graduation. And I needed Stata to deal with a 25000 observation dataset
Here's a little of it:
id region salaries weight
1 1 1200 23.15
2 1 500 7.65
3 2 100 10.12
4 2 1700 2.95
5 3 2050 14.00
6 3 1435 3.60
My goal is to calculate weighted totals (sums) of salaries by region
I've tried most of the commun commands: bysort egen, bysort asgen (bysort doesn't allow weights), i've tried collapse but i didn't understand how to use it with all it's options for my kinda of data and goal
I would be so happy to hear your suggestions about a Stata comman or algorithm that could help me get the total of salaries, by region, considering the weights
THANKS VERY MUCH !
Comment