Stata Tutorial: Panel Data Formatting with the "reshape" command

  Рет қаралды 15,992

Mike Jonas Econometrics

Mike Jonas Econometrics

Күн бұрын

Using example data from the World Bank we show how to transform a "wide" format panel to a "long" format panel in Stata using the "reshape" command.
Link to "Gentle Introduction to Stata"
www.amazon.com...
Link to the excellent Introduction to Econometrics Textbook by AH Studenmund:
www.amazon.com...
Link to Jeffrey Wooldridge Introductory Econometrics Textbook:
www.amazon.com...

Пікірлер: 18
@cooper9658
@cooper9658 2 жыл бұрын
Literal life saver thank you so much!
@brimone1982
@brimone1982 4 жыл бұрын
Thanks, very clear!
@nazlicansahan4320
@nazlicansahan4320 4 жыл бұрын
How can I do the same exercise with more than one variables? I have the same worldbank data but including GDP per capita and GDP in constant prices. Thanks!
@krabbypatty6896
@krabbypatty6896 4 жыл бұрын
Thank you a lot
@ДарьяСамойлюкова
@ДарьяСамойлюкова 3 жыл бұрын
Thank you very much for this tutorial! It helped a lot :)
@eunhyukiee
@eunhyukiee Күн бұрын
Hi! I really appreciate the video. I faced a problem when I entered i(EntityID) j(Year) and it shows error message while it says "option i() required" while I already insert it. Do you have any idea or recommendations on what should I do in that situation?
@naureenmeghani3217
@naureenmeghani3217 Ай бұрын
Hi Mike, Thanks for the video. Is there any video available for multilevel mixed effect linear regression model in STATA please :)
@samanthacervantes5943
@samanthacervantes5943 3 жыл бұрын
this was so useful! thank you!
@yuceler77
@yuceler77 2 жыл бұрын
useful video. thanks.
@criticalthought7307
@criticalthought7307 3 жыл бұрын
If you're trying to go from Long to Wide.. and receive this error... what can I do values of variable year not unique within sid stateid Your data are currently long. You are performing a reshape wide. You specified i(sid stateid) and j(year). There are observations within i(sid stateid) with the same value of j(year). In the long data, variables i() and j() together must uniquely identify the observations.
@onwuchekwamalachky7373
@onwuchekwamalachky7373 4 жыл бұрын
Hi, thanks for the tutorial. I have more complex data from UNCTAD GVC data. it has no year but 184 countries with 26 sectors attached to it. how do i reshape such data from wide to long?
@mikejonaseconometrics1886
@mikejonaseconometrics1886 4 жыл бұрын
Good Question! The command is the same, but instead of a time indicator, the j(..) will contain the sector code. So each country will appear in 26 rows, one for each sector. Let me know if that works for you.
@Erqin
@Erqin 2 жыл бұрын
'command bbopendata is unrecognized'. maybe i should have added something that is not mentioned here, before running the command? how can I proceed?
@nikoskoutas3037
@nikoskoutas3037 2 жыл бұрын
Hey thanks a lot for the video, what do we do if the name of the year is not yr + year but just D, E, F and so on?
@123pharmacology
@123pharmacology 7 ай бұрын
I want to draw time graphs with panel data. For example I have a patient who had a procedure on Jan12024 and then on Jan 2, his pain score was 2, on Jan 3, his pain score was 6 and jan 10, his pain score was 12 . Let’s assume I have 100 patients, 50 who had the procedure and 50 did not. And so I want to draw time wise graphs for cumulative pain scores on days 1,2,3…….for both patient types in different colors. Is it possible to know this from you. I know I will have to calculate the days on my own which I can do
@123pharmacology
@123pharmacology 7 ай бұрын
By the way…excellent stuff. I subscribed you
@muhammadirfanislami818
@muhammadirfanislami818 3 жыл бұрын
What if we dont have year variable? It's in the same year
@mikejonaseconometrics1886
@mikejonaseconometrics1886 3 жыл бұрын
For it to be panel / longitudinal data, there will be a “time” or “date” variable to play this role. If all observations are from the same time period, it will be cross-sectional data, and the reshape command will not be necessary.
Stata Tutorial: Constructing a Panel using Append
5:33
Mike Jonas Econometrics
Рет қаралды 7 М.
Stata Tutorial: Intro Data Cleaning with Panel Data
22:07
Mike Jonas Econometrics
Рет қаралды 41 М.
How To Get Married:   #short
00:22
Jin and Hattie
Рет қаралды 27 МЛН
Incredible: Teacher builds airplane to teach kids behavior! #shorts
00:32
Fabiosa Stories
Рет қаралды 11 МЛН
РОДИТЕЛИ НА ШКОЛЬНОМ ПРАЗДНИКЕ
01:00
SIDELNIKOVVV
Рет қаралды 3,4 МЛН
Stata: Reshaping Data using World Bank Open Data Sets
11:59
Todd R. Yarbrough, Ph.D.
Рет қаралды 23 М.
Stata - How to Reshape Your Data
11:05
Steffen's Classroom
Рет қаралды 829
How to Reshape Data from Long to Wide form in Stata | Reshape Part 1
23:10
World Development Indicators: Reshaping Data using Stata
8:16
How to analyze data in STATA with the help of ChatGPT
10:20
Data for Development
Рет қаралды 17 М.
Collapsing Data in Stata
6:12
SebastianWaiEcon
Рет қаралды 39 М.
Transpose Data in Stata | Xpose, sxpose, sxpose2
10:34
The Data Hall
Рет қаралды 1,4 М.
Stata Tutorial: Basic Panel Regression
19:10
Mike Jonas Econometrics
Рет қаралды 20 М.
The very basics of Logit and Probit models in Stata.
28:33
Mike Jonas Econometrics
Рет қаралды 23 М.
How To Get Married:   #short
00:22
Jin and Hattie
Рет қаралды 27 МЛН