Hello Stata Xperts!
Need some help.
I have the following panel data.
Year = year
Id = Identifier of the company
Emp = Total number of employees in the firm
I need to find the total number of employees for each year. i.e. in 1990, there are total 100 employees, while in 1991, there are total 250 employees.
I would like to find the sum of the number of employees (emp) for each year. i.e. for 1990, the total number of employees is 100 (25 + 75). Similarly, for 1991, the total number of employees is 250 (50 + 200). Thanks for your help, J
Need some help.
I have the following panel data.
Year = year
Id = Identifier of the company
Emp = Total number of employees in the firm
I need to find the total number of employees for each year. i.e. in 1990, there are total 100 employees, while in 1991, there are total 250 employees.
Code:
clear input float(Year Id Emp) 1990 1 25 1990 1 25 1990 1 25 1990 2 75 1990 2 75 1991 1 50 1991 1 50 1991 2 200 1991 2 200 1991 2 200
Comment