Hi,
I have attached a screenshot of my excel file containing world stock returns, world cases and deaths on the left hand side and the world indicators listed by country on the right hand side.
I was just wondering how to merge the datasets together to have a panel data structure, which I can then import into EViews. If I am not wrong, I need a cross-section ID series? Usually it would be the country, but surely it would not fit properly with the day dates and stock returns, cases and deaths as they far exceed the number of countries. I am unsure how to go about this.
Any help will be appreciated!
Help regarding formatting a panel data structure
Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator
Help regarding formatting a panel data structure
- Attachments
-
- Screenshot 2021-03-01 at 18.01.01.png (610.78 KiB) Viewed 11512 times
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13319
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Help regarding formatting a panel data structure
How do you want to merge these two data sets? One is purely cross-sectional, the other is purely time-series.
Follow us on Twitter @IHSEViews
Re: Help regarding formatting a panel data structure
I wanted to merge it to have the stock returns as the dependent variable in a panel pooled OLS and the other data series as independent and control variables. As one is purely time-series, I assume I will have to reformat it to cross-section?
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13319
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Help regarding formatting a panel data structure
Ignore all the fancy words for the moment.
To run a regression, you need observations. An observation is a single data point. That data point is identified by either time (2020/03/23), a country (Japan), or both (2020/03/23 in Japan).
The variables in your regression need to have the same identifying structure - all the observations for all the variables must be identified by either time, cross-section, or both.
Currently your dependent variable is time only. Your independent variables are cross-section only. They have different structures.
To run a regression, you need observations. An observation is a single data point. That data point is identified by either time (2020/03/23), a country (Japan), or both (2020/03/23 in Japan).
The variables in your regression need to have the same identifying structure - all the observations for all the variables must be identified by either time, cross-section, or both.
Currently your dependent variable is time only. Your independent variables are cross-section only. They have different structures.
Follow us on Twitter @IHSEViews
Re: Help regarding formatting a panel data structure
Thanks for breaking it down, I think I get it now. Basically I need to have the same structure as there are two different date series?
I have attached a screenshot where I have reformatted the world stock returns, world cases and deaths into the daily change of the stock index of that country, and the daily growth of cases and deaths for each country.
I would just need to calculate the rate of change for each, but it should work as a cross-sectional data series after, which I can then import into EViews and conduct a panel pooled OLS? Will I then be able to use daily change of stock returns as my dependent variable and the other datasets as independent variables?
I have attached a screenshot where I have reformatted the world stock returns, world cases and deaths into the daily change of the stock index of that country, and the daily growth of cases and deaths for each country.
I would just need to calculate the rate of change for each, but it should work as a cross-sectional data series after, which I can then import into EViews and conduct a panel pooled OLS? Will I then be able to use daily change of stock returns as my dependent variable and the other datasets as independent variables?
- Attachments
-
- Screenshot 2021-03-05 at 19.26.56.png (524.73 KiB) Viewed 11477 times
Who is online
Users browsing this forum: No registered users and 33 guests