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
RECODE helpI have a variable that states the name of the assurance provider called NewNumVerifiers. Originally,…
How does rforest handle missing values?Hi, I am trying to understand how the rforest command in Stata handles missing values in the indepe…
xi: areg and aregHi! I am running regressions involving patient fixed effects and year fixed effects. I am not quite…
Multivariate Local Linear Polynomial Regression (lpoly)Hello, I want to perform a multivariate linear polynomial regression on STATA. I am working with el…
Psmatch2 and next steps for survival analysisHello, I have run psmatch2 on my observational dataset and would appreciate some guidance on how to…
Subscribe to:
Post Comments (Atom)
0 Response to Dropping duplicated results with panel data
Post a Comment