Aggregating Data by Subgroups in STATA

  Рет қаралды 67,229

David Braudt

David Braudt

Күн бұрын

Пікірлер: 15
@mohamoudmohamedabdinoor5107
@mohamoudmohamedabdinoor5107 4 жыл бұрын
Really you are the best teacher i have ever seen thank you very much, you tough me something than i don't understand deeply from my teacher.
@desherilac9322
@desherilac9322 3 жыл бұрын
Thank you very helpful :)
@thomaskirkland3831
@thomaskirkland3831 10 жыл бұрын
David, how do you collapse dummy variables (1/0) or variables with numerical categories (1, 2, 3, 4)? I am assuming you can't take the mean of these variables.
@Carlos___Rz
@Carlos___Rz 10 жыл бұрын
You would probably just ignore the information given by dummy variables unless you actually want to aggregate by those dummy variables. eg by year and gender...
@boscokasundu8494
@boscokasundu8494 9 жыл бұрын
+Thomas Kirkland Hi you can actually create dummies from the a categorical variable ie Frequency of smoking with four options such as 1. Most often. 2. Rarely 3. Never by using tab freq, gen (most_often) command this will generate variables with the name most_often1, 2, 3 where 1=most_often, 2= rarely etc
@DavidBraudt
@DavidBraudt 9 жыл бұрын
+Thomas Kirkland +Bosco Kasundu Thanks for replying to this Bosco! I apparently missed it a year back. Hopefully you found an answer back then Thomas.
@estheramoako1197
@estheramoako1197 4 жыл бұрын
how do you add the result to the original data set for further analysis?
@DavidBraudt
@DavidBraudt 4 жыл бұрын
Use the merge command on the variable that was used to collapse the data. You will need to use either the m:1 or the 1:m version of merge. For example if you have the collapsed dataset in memory and are merging in the original data (let's assume a case is an individual) it would be a 1:m merge since there is one collapsed observation in the "master" dataset (Stata's language) that corresponds to many observations in the "using" dataset (i.e. the individual-level data you are merging back into the collapsed data). HTH.
@Bakoji2
@Bakoji2 7 жыл бұрын
I found the vedios very informative
@anasiqueira5920
@anasiqueira5920 7 жыл бұрын
David, how can I regress in loop by firm and save the coefficient as a variable in the dataset?
@aung9211
@aung9211 4 жыл бұрын
Thank you
@1ivoleuppi
@1ivoleuppi 5 жыл бұрын
i have an urgent question: im trying to make a longitudional file from multiple eurobarometer files. i want to measure the changes in issues mentioned as the most important problem over time. can anyone help me. i know so little about stata i dont even know what to look for
@eyita_admas
@eyita_admas 7 жыл бұрын
how do we collapse if our variables of interest dummy in nature
@riddhimastakar
@riddhimastakar 5 жыл бұрын
Hi, did you figure out how to do this?
@krabbypatty6896
@krabbypatty6896 6 жыл бұрын
thanksss!!!!
Categorical Variables in Stata
7:56
SebastianWaiEcon
Рет қаралды 140 М.
It’s all not real
00:15
V.A. show / Магика
Рет қаралды 20 МЛН
Арыстанның айқасы, Тәуіржанның шайқасы!
25:51
QosLike / ҚосЛайк / Косылайық
Рет қаралды 700 М.
BAYGUYSTAN | 1 СЕРИЯ | bayGUYS
36:55
bayGUYS
Рет қаралды 1,9 МЛН
Fill Gaps in Timeseries or Panel Data in Stata
15:06
The Data Hall
Рет қаралды 4,2 М.
Using local macros in Stata
28:37
Alan Neustadtl
Рет қаралды 37 М.
How to analyze data in STATA with the help of ChatGPT
10:20
Data for Development
Рет қаралды 20 М.
Data management: How to merge files into a single dataset
5:24
StataCorp LLC
Рет қаралды 205 М.
Collapsing Data in Stata
6:12
SebastianWaiEcon
Рет қаралды 39 М.
How to group data in STATA with SORT and BY
8:56
Lucas Reis
Рет қаралды 33 М.
Fixed Effects in Stata
13:41
SebastianWaiEcon
Рет қаралды 215 М.
Dealing with Duplicate Observations in STATA
14:44
David Braudt
Рет қаралды 29 М.
How to create variables in STATA using GENERATE and EGEN
7:31
Lucas Reis
Рет қаралды 40 М.
It’s all not real
00:15
V.A. show / Магика
Рет қаралды 20 МЛН