Hello!
I am currently working on a panel dataset containing, amongst others, the variables "companies", "year" (2010-2018), "sector" (arbitrary 4 digit number), and "net sales". Now,
I want to generate a new variable, namely, the sum of the net sales for all individual companies in each corresponding sector and the corresponding year.
I tried to find a command, however, I was unsuccessful.
Can anyone help me out?
Thank you in advance!
Related Posts with Creating a sum variable which depends on 2 other variables
List a single observation, formatted in a columnDear all, I would like to list the values of a single observation such that for each variable the o…
Mi predict basesurvHi all, I am having problems trying to get the baseline survivor function after mi predict. I am us…
How to transfer multiple values stored under a local macro into a variableHello, How can I transfer multiple values stored under a local macro into a variable? Below is wha…
Adding a new variable on Stata that has different dimensions than the variables from a dataset that is in useHello, Is there a way to add a new variable on Stata that has different dimensions than the dataset…
Merging two panel data set when name of countries differ slighltyI am using two different data sets from; one from World Bank and another one from IMF. The name of t…
Subscribe to:
Post Comments (Atom)
0 Response to Creating a sum variable which depends on 2 other variables
Post a Comment