Hi all,
I have a question.
I have a dataset like the left table in my screenshot (small example). In this dataset, there are different combinations between origin and destination which each the number of employees working in each sector and the total listed.
Now I want to transform/reshape this dataset to the right table, where each origin is listed only once. For this origin, now the sum of all destinations that belong to that origin are listed.
The variables remain the same (S1, S2, S3, S4, S5, Total)
Thank you in advance!
Romy
Array
Related Posts with Taking the sum of some observations
How to merge multiple data sets without id variable?Hi, I want to merge multiple cross-sectional micro data files for each year (1992-2003) to make a si…
Include N (counts) as bar labelsHi Stata users, I am interested in having N/counts in a graph apart from the current label (percent…
Bug in asreg?I believe there is a bug in the asreg function. When I run rolling window regressions on panel data …
making a number of variables based on values of other variablesHello, I have been receiving great help from the Stata Forum by searching - but today I have encount…
Categorize Date VariablesIs there a way to categorize or recode date variables (say which is in %td format) in Stata? This wo…
Subscribe to:
Post Comments (Atom)
0 Response to Taking the sum of some observations
Post a Comment