importing and autofilling countries into panel

For requesting general information about EViews, sharing your own tips and tricks, and information on EViews training or guides.

Moderators: EViews Gareth, EViews Moderator

dsdsdsdsd
Posts: 21
Joined: Sun Sep 06, 2020 7:33 pm

importing and autofilling countries into panel

Postby dsdsdsdsd » Mon Sep 07, 2020 1:18 am

hello ...

I wish to make a panel using the 37 oecd countries over the years from 1990 to 2020. I set up a basic, empty new workfile using 1990-2020 with 37 cross sections. Eviews created it with two columns: crossid and dateid.

In excel I have a column with the 37 countries: (AUSTRALIA , AUSTRIA , BELGIUM , ... ... UNITED STATES).

in eViews I have spreadsheet:
CROSSID | DATEID
1 | 1980
1 | 1981
1 | 1982
.
.
2 | 1980
2 | 1981
2 | 1982
.
.
.
3 | 1980
3 | 1981
3 | 1982
.
.
.
.
.
.
37 | 1980
37 | 1981
37 | 1982


I want to bring in the excel list such that eViews automatically creates the new column, COUNTRY, and correctly assigns a country to a CROSSID:
CROSSID | DATEID | COUNTRY
1 | 1980 | AUSTRALIA
1 | 1981 | AUSTRALIA
1 | 1982 | AUSTRALIA
.
.
2 | 1980 | AUSTRIA
2 | 1981 | AUSTRIA
2 | 1982 | AUSTRIA
.
.
.
3 | 1980 | BELGIUM
3 | 1981 | BELGIUM
3 | 1982 | BELGIUM
.
.
.
.
.
.
37 | 1980 | UNITED STATES
37 | 1981 | UNITED STATES
37 | 1982 | UNITED STATES


is this possible? Or is there a better approach?


- thanks, Shannon

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

Re: importing and autofilling countries into panel

Postby EViews Gareth » Mon Sep 07, 2020 6:55 am

Create a new page that is undated with 37 observations. Create a series called "Crossid" that is equal to @trend+1:

Code: Select all

series crossid=@trend+1

Bring the country data into that page. Now copy from that page to the panel page, using General Match Merge and crossid as the identifier series on both pages.
Follow us on Twitter @IHSEViews


Return to “General Information and Tips and Tricks”

Who is online

Users browsing this forum: No registered users and 13 guests