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!
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?
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.
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?
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.
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
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.
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!
Hi Mike, Thanks for the video. Is there any video available for multilevel mixed effect linear regression model in STATA please :)
Literal life saver thank you so much!
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?
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.
'command bbopendata is unrecognized'. maybe i should have added something that is not mentioned here, before running the command? how can I proceed?
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?
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.
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?
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
By the way…excellent stuff. I subscribed you
What if we dont have year variable? It's in the same year
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.
Thanks, very clear!
this was so useful! thank you!
Thank you a lot
Thank you very much for this tutorial! It helped a lot :)
useful video. thanks.