Help regarding formatting a panel data structure

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator

Minhaz
Posts: 3
Joined: Thu Mar 04, 2021 1:01 pm

Help regarding formatting a panel data structure

Postby Minhaz » Thu Mar 04, 2021 1:21 pm

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!
Attachments
Screenshot 2021-03-01 at 18.01.01.png
Screenshot 2021-03-01 at 18.01.01.png (610.78 KiB) Viewed 11443 times

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13307
Joined: Tue Sep 16, 2008 5:38 pm

Re: Help regarding formatting a panel data structure

Postby EViews Gareth » Thu Mar 04, 2021 2:11 pm

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

Minhaz
Posts: 3
Joined: Thu Mar 04, 2021 1:01 pm

Re: Help regarding formatting a panel data structure

Postby Minhaz » Thu Mar 04, 2021 2:33 pm

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?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13307
Joined: Tue Sep 16, 2008 5:38 pm

Re: Help regarding formatting a panel data structure

Postby EViews Gareth » Thu Mar 04, 2021 2:42 pm

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.
Follow us on Twitter @IHSEViews

Minhaz
Posts: 3
Joined: Thu Mar 04, 2021 1:01 pm

Re: Help regarding formatting a panel data structure

Postby Minhaz » Fri Mar 05, 2021 1:22 pm

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?
Attachments
Screenshot 2021-03-05 at 19.26.56.png
Screenshot 2021-03-05 at 19.26.56.png (524.73 KiB) Viewed 11408 times


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 21 guests