Hello Stata people,
I have a panel dataset where the cross-sectional variable is wage (for different individuals) and the longitudinal variable is time.
I only want a time-series of total(wage) (sum of all employees' wages in a given year). I'm not interested in the wages of individuals.
I have used this command: bysort year: egen tot_wage=total(total_income)
Now I have a time series of the tot_wage variable. Unfortunately, because there were i observations in each year, the tot_wage series is replicated i times in each year. These values appear sequentially e.g.
...
2012 | 5000
2012 | 5000
2012 | 5000
2013 | 5500
2013 | 5500
...
Not ideal.
The individuals participating in the wage survey are not the same from year to year so I can't drop all but one person's observations. How might I obtain the simple time series I am after?
Best,
Pascal
Related Posts with Dropping duplicated results with panel data
Problem with DID interpretationDear all, I am trying to analyse the effect of higher tuition fees on grade outcomes. My data is un…
fuzzydid and twowayfeweights applicationDear all, I am attempting to estimate the effect of the change in temperature and precipitation (at …
question about sparkline with by() and over()With great delight, I was reviewing some of Nick Cox's presentations and notes on data visualization…
number of observations using the blow-up and cluster (buc) modelDear Stata users, I have a query about the number of observations using the blow-up and cluster (bu…
Stacking results from multiple matrices using putexcelHi all, First Statalist post and beginner on Stata so thank you for your patience! I am trying to …
Subscribe to:
Post Comments (Atom)
0 Response to Dropping duplicated results with panel data
Post a Comment