Eviews Training: Frequency Conversion
Eviews Training: Frequency Conversion
Frequency Conversion
Note: Information for examples in this tutorial can be found in these files.
Data: Data.xlsx and Data_panel.xlsx
Results: Results.wf1 and Results_panel.xlsx
Practice Workfile: Data.wf1 and Data_panel.wf1
Frequency Conversion:
Data and Workfile Documentation
• Data.wf1 and Data.xlsx consist of four pages (tabs) with the following data:
• Workfile Page: Quarterly (Data.xlsx tab Quarterly): quarterly data 1980Q1 -2012Q4
GDP – US GDP, billions of dollars (source: Bureau of Economic Analysis)
• Workfile Page: Monthly (Data.xlsx tab Monthly): monthly data 1980m1 -2012m12
payroll – nonfarm payroll, monthly changes, thousand of employees (source: Bureau of Labor
Statistics)
• Workfile Page: Weekly (Data.xlsx tab Weekly): weekly data 1980/01/01 -2012/12/25
claims – initial jobless claims, 4-week average (source: St. Louis Federal Reserve, FRED
Database)
2
Frequency Conversion:
Data and Workfile Documentation (cont’d)
• Data_panel.wf1 and Data_panel.xlsx consist of five pages (tabs) with the
following data:
• Workfile Page: Annual_panel (Data.xlsx tab Annual_panel): panel annual data, 1995-
2000.
pop – population data, thousands (source: OECD)
6 countries: Canada, France, Germany, Italy, Japan, and UK.
3
Frequency Conversion:
Data and Workfile Documentation (cont’d)
• Data_panel.wf1 and Data_panel.xlsx (cont’d)
4
Frequency Conversion
• Every series in EViews has an associated frequency which is the frequency
of the workfile (or to be precise of the workfile page).
• Frequency conversion allows you to convert a series of data from one
workfile frequency to another.
• The easiest way in EViews to perform frequency conversion it to copy a
series from one page of a workfile to another page with a different
frequency.*
• This tutorial demonstrates how to perform frequency conversion from:
Low Frequency to High Frequency data
High Frequency to Low Frequency data
Panel Frequency Conversion
*Although EViews also allows you copy from one workfile to another workfile, it often makes
sense to perform the copy between pages of the same workfile.
5
Frequency Conversion:
Low to High Frequency Data
Note: Information for examples in this portion of the tutorial can be found in these files.
Data: Data.xlsx
Results: Results.wf1
Practice Workfile: Data.wf1
Frequency Conversion:
Low to High
• It is really easy in EViews to convert lower frequency data (e.g. quarterly
frequency) to higher frequency data (e.g. monthly frequency).
• Suppose you have quarterly GDP data and wish to convert to monthly data.
7
Frequency Conversion:
Low to High (cont’d)
3. Click on the Monthly page
(anywhere on the white workfile
space), right-click and select
Paste Special.
8
Frequency Conversion:
Low to High (cont’d)
4. The “Paste Special” dialog box opens up. This is a quick review of the main elements:
Constant-match average
Constant-match sum
Quadratic-match average.
Quadratic-match sum
Linear-match last
Cubic-match last
10
Frequency Conversion: Low to High
Example 1: Constant-Match Average
• Constant-match average: repeats the value of low frequency data for each of the
high frequency observations associated with a particular low frequency period.
Low to High Conversion: Example 1
1. Click on the Quarterly page of the
Data.wf1 workfile.
2. Right-click on GDP series and select
Copy.
3. Click on the Monthly page, right-click
and select Paste Special.
4. On the Paste Special dialog box,
select Link under Paste as section.
5. Select Date with frequency
conversion under Merge by section.
6. Select Constant-match average
under “Low to high frequency
method.”
7. Click OK.
• As you can see here, this method repeats the same low-frequency value
(quarterly, in our case) for all high-frequency observations in the high
frequency file (all months in that particular quarter).
11
Frequency Conversion: Low to High
Example 2: Constant-Match Sum
• Constant-match sum: divides the low frequency value by the number of
observations in the high frequency page associated with a particular low
frequency period.
Low to High Conversion: Example 2
1. Follow steps 1-5 from Example 1.
2. Under Pattern, name this series gdp1
(so as to not confuse it with the previous
example).
3. On the Paste Special dialog box, select
Constant-match sum under “Low to
high frequency method.”
4. Click OK.
• As you can see, all observations in
the high frequency series are filled
with low frequency data divided by
the number of periods in the high
frequency page. • In this example, each month in a given quarter
has the same value as the quarterly data
divided by 3 (since there are 3 months in a
quarter).
12
Frequency Conversion: Low to High
Example 3: Quadratic-Match Average
• Quadratic-match average: performs a proprietary local quadratic interpolation of
the low frequency data to fill in the high observations.
• As another example, let’s convert the annual debt data from the Annual page
into quarterly data (in the Quarterly page) using this conversion method.
Low to High Conversion: Example 3
1. Click on the Annual page of the
Data.wf1 workfile. Right-click on debt
series and select Copy.
2. Click on the Quarterly page, right-
click and select Paste Special.
3. On the Paste Special dialog box,
select Link under Paste as section.
4. Select Date with frequency
conversion under Merge by section.
5. Select Quadratic-match average
under “Low to high frequency
method”.
6. Click OK.
13
Frequency Conversion: Low to High
Example 3: Quadratic-Match Average (cont’d)
• As you can see, this method fits a local quadratic polynomial by taking sets of three
adjacent points from the low frequency data (annual data in this example) and fitting
a quadratic so that the average of the high frequency points matches the low
frequency data actually observed.
Average of four
quarters = 901.46
(same as annual
1980)
Average of four
quarters = 996.73
(same as annual
1981)
14
Frequency Conversion: Low to High
Example 4: Linear-Match Last
• Linear-match last: inserts the low frequency observation into the last period of
the high frequency data, then performs linear interpolation on the other values.
• As another example, consider the case of converting monthly payroll data into
weekly data by using the “Linear-Match Average” conversion method.
15
Frequency Conversion: Low to High
Example 4: Linear-Match Last (cont’d)
• This method first places the monthly observation into the last weekly observation in the
corresponding month. In-between weekly observations are filled by performing a linear
interpolation between the last week of the previous month and the last week of the
current one.
Difference from
week-to-week is
constant
(employment
grows at a linear
rate over the
month)
16
Frequency Conversion: Low to High
Example 5
• Let’s consider another example. Suppose you have annual debt data that you
would like to:
Convert to quarterly frequency.
Associate the annual number only with the first quarter of that year.
Place missing values (NA) in other quarters (this may be needed in mixed frequency regressions).
Low to High Conversion: Example 5 7. Now, let’s insert “NA” values for quarters 2, 3, and
1. Click on the Annual page. Right-click 4 of the year. For this, type in the command
on debt series and select Copy. window:
2. Click on the Quarterly page, right- smpl if @quarter=2 or @quarter=3 or
click and select Paste Special.
@quarter=4
3. On the Paste Special dialog box,
debt1=NA
under Pattern, name this series debt1
(so as to not confuse it with an earlier 8. Press Enter (please type the first line of the
example). command in one line).
4. On the Paste Special dialog box,
under Paste as, select Series (by
Value).
5. Click OK.
17
Frequency Conversion: Low to High
Example 5 (cont’d)
• The annual value is placed in Q1 of each year, while all the other quarters show
“NA.”
NOTE: In order to modify the new series in the quarterly file (such as filling quarters
with NA values), you should copy/paste Series (by Value) and NOT as a Link)
18
Frequency Conversion:
High to Low Frequency Data
Note: Information for examples in this portion of the tutorial can be found in these files.
Data: Data.xlsx
Results: Results.wf1
Practice Workfile: Data.wf1
Frequency Conversion:
High to Low
• It is just as easy in EViews to convert higher frequency data (e.g. monthly
frequency) to lower frequency data (e.g. quarterly frequency).
• Suppose you have monthly payroll data and wish to convert to quarterly data.
20
Frequency Conversion:
High to Low (cont’d)
3. Click on Quarterly page
(anywhere on the white workfile
space).
4. Right-click and select Paste
Special.
5. The Paste Special dialog box
opens up. On the left hand-side,
select Link under the Paste as
section.
6. Select Date with frequency
conversion under Merge by
section.
21
Method of Conversion:
High to Low
7. Under “Frequency Conversion Options” select High to Low. There are a few
methods of conversion.
Average Observations: Sets the low
frequency data equal to the average of the
observations in the corresponding high
frequency data.
Sum Observations: Sets the low frequency
data equal to the sum of observations in the
corresponding high frequency data.
First Observation: Sets the low frequency
data equal to the value of the first
observation in the corresponding high
frequency data.
Last Observation: Sets the low frequency
data equal to the value of the last
observation in the corresponding high
frequency data. Min Observation: Sets the low frequency
Max observation: Sets the low frequency data equal to the minimum values of the
data equal to the maximum value of the corresponding high frequency observations.
corresponding high frequency observations.
22
Frequency Conversion: High to Low
Example 1: Average Observations
• Average Observations: Sets the low frequency data equal to the average of
the observations in the corresponding high frequency data.
High to Low Conversion: Example 1
1. Click on the Monthly page of the
Data.wf1 workfile.
2. Right-click on payroll series and
select Copy.
3. Click on the Quarterly page, right-
click and select Paste Special.
4. On the Paste Special dialog box,
select Link under Paste as section.
5. Select Date with frequency
conversion under Merge by section.
6. Select Average observations under
“High to low frequency method.”
7. Click OK.
23
Frequency Conversion: High to Low
Example 1: Average Observations (cont’d)
• Results are shown here.
As you can see, this method fills in the observation of the low frequency data with
the average of observations in the high page corresponding to that time period.
For example, the average value for Jan 1980, Feb 1980 and March 1980 is 107.33
and is placed in Q1 1980.
24
Frequency Conversion: High to Low
Example 2: Sum Observations
• Sometimes it may make more sense for data to be summed up rather than
averaged.
• If you have monthly employment data, you might want to convert this to quarterly
data by summing up net employment gains in each month of the quarter.
High to Low Conversion: Example 2
1. Click on the Monthly page of the
Data.wf1 workfile. Right-click on
payroll series and select Copy.
2. Click on the Quarterly page, right-
click and select Paste Special.
3. On the Paste Special dialog box,
name this series payroll1 (so as to not
confuse it with the previous example).
4. Select Link under Paste as section.
5. Select Date with frequency
conversion under Merge by section
6. Select Sum Observations under
“High to low frequency method.”
7. Click OK.
25
Frequency Conversion: High to Low
Example 2: Sum Observations (cont’d)
• Notice that Q1 1980 consists of the sum of observations for Jan, Feb and March of
1980.
26
Frequency Conversion: High to Low
Example 3: Last Observations
• In some cases, you might want to convert high-to-low frequencies by preserving
the last observation (or the first observation). This is a particularly useful feature
for financial data.
• Suppose you want to convert quarterly GDP data into annual data by setting the value of
the entire year equal to that of the last quarter:
27
Frequency Conversion:
Panel Data
Note: Information for examples in this portion of the tutorial can be found in these files.
Data: Data_panel.xlsx
Results: Results_panel.wf1
Practice Workfile: Data_panel.wf1
Panel Frequency Conversion:
Data and Workfile Documentation
• Data_panel.wf1 and Data_panel.xlsx consist of five pages (tabs) with the
following data:
• Workfile Page: Annual_panel (Data.xlsx tab Annual_panel): panel annual data, 1995-
2000.
pop – population data, thousands (source: OECD)
6 countries: Canada, France, Germany, Italy, Japan, and UK.
29
Panel Frequency Conversion:
Data and Workfile Documentation (cont’d)
• Data_panel.wf1 and Data_panel.xlsx (cont’d)
30
Panel Frequency Conversion
• There are three main types of frequency conversions for panel data:
Panel to Panel
Low Frequency to High-Frequency
High-Frequency to Low Frequency
Panel to Non-Panel (Time Series and Cross-Section)
Same Frequency Conversion (Annual to Annual, Quarterly to Quarterly, etc.)
Low Frequency Panel to High-Frequency Time Series
High-Frequency Panel to Low Frequency Time Series
Panel to Cross-Section
Non-Panel to Panel (Time Series and Cross-Section)
Same Frequency Conversion (Annual to Annual, Quarterly to Quarterly, etc.)
Low Frequency Time-Series to High-Frequency Panel
High-Frequency Time Series to Low Frequency Panel
Cross Section to Panel
31
Panel Data Workfile Pages
• Consider the two workfile pages shown below:
You can see that the COUNTRY identifiers are the same in both pages (CAN for
CANADA, etc.).
The Quarterly_Panel page has more observations than the Annual_Panel page
(one more country (US) and 1 more year of data).
32
Panel to Panel Workfile Pages (cont’d)
• A couple of things to remember:
Simple panel frequency conversion requires that the cross-section
identifier names in the two panel pages be identical.
In our case we are using COUNTRY as cross-section IDs in both pages.
One page could have fewer (or more) cross-section identifiers (as in this
example where US is excluded from the annual file).
The important thing is that there is some cross-section ID overlap.
33
Panel-to-Panel Conversion
Example 1: Low to High Frequency
• Suppose we wish to convert pop data from the Annual_Panel page to
quarterly data in the Quarterly_Panel page.
Panel-to-Panel Conversion: Example 1
1. Open Data_panel.wf1 workfile. Click on the Annual_Panel page.
2. Right-click on pop series and select Copy.
3. Click on the Quarterly_Panel page, right-click and select Paste Special.
34
Panel-to-Panel Conversion
Example 1: Low-to-High Frequency (cont’d)
4. The Paste Special dialog box opens up. Under Paste as section, select Link.
5. Under the Merge by section, choose General match merge criteria.
• This changes the options on the right-
hand side of the Paste Special box.
You can now see a new section Match
merge options. Let’s review:
Under “Match merge Options”, the
Source ID and the Destination ID are
set (by default) at @date country
which tells EViews that the conversion
will be done by date and by country.
Under Contraction method, there
are a number of options. However, the
only frequency conversion method for
panel data from low-to-high frequency
is the Constant-Match Average
(repeating values of the low frequency
data). So here, there is no need to
pick any options since they all revert
to the same thing.
35
Panel-to-Panel Conversion
Example 1: Low-to-High Frequency (cont’d)
6. Click OK.
• The Constant-Match Average
option repeats the annual value
for all quarters of the
corresponding year in the high-
frequency file (when the data are
available).
• It shows NA for countries and
dates for which the annual data
are not available. For example
here, the data for all quarters of
1994 are missing because the
annual data starts in 1995.
36
Panel-to-Panel Conversion
Example 2: Low-to-High Frequency
• What happens if instead of the Source and Destination ID being @date
country, we simply choose @date?
• This instructs EViews to ignore country ID and perform conversion across all
cross-country identifiers.
Panel-to-Panel Conversion: Example 2
1. Click on the Annual_Panel page. Right-
click on pop series and select Copy.
2. Click on the Quarterly_Panel page and
select Paste Special.
3. The Paste Special dialog box opens up.
Change the name of the series to pop1 (so
as not to replace the existing series),
select Link under Paste as section, and
General match merge criteria under
Merge by section.
4. Under Match merge options, type @date
in Source ID and Destination ID fields.
37
Panel-to-Panel Conversion
Example 2: Low-to-High Frequency (cont’d)
5. Under Contraction Method you can now specify the method through which EViews will
aggregate the data across cross-section identifiers. Let’s choose Mean as a contraction method.
This computes the average population for all six countries in the annual page. EViews then uses
Constant-Match Average to convert the annual data to quarterly.
6. Click OK.
Average of all
countries in 1995
= 68,637.4
Average of all
countries in 1996
= 68,861.5
39
Panel-to-Panel Conversion
Example 3: High-to-Low Frequency
• Now suppose we wish to convert the GDP data from the Quarterly_Panel
page to the Annual_panel page.
Panel to Panel Conversion: Example 3
1. Click on the Quarterly_Panel page. Right
click on the GDP series and select Copy.
2. Click on the Annual_Panel page and
select Paste Special.
3. The Paste Special dialog comes up. As in
the previous example, select Link under
Paste as section, and General match
merge criteria under Merge by section.
4. Set @date country for Source ID and
Destination ID.
5. Under Contraction method, note that
now you can choose any of the options
from the drop down menu.
In fact, while EViews supports only
Constant-Match Average when
going from low-to-high frequency, ALL
contraction methods are available for
high-to-low frequency conversion.
40
Panel-to-Panel Conversion
Example 3: High-to-Low Frequency (cont’d)
6. Let’s select Sum under Contraction Method. This means that annual GDP will be
created by summing the quarterly GDP data for each individual country over a given year.
7. Click OK.
41
Panel-to-Panel Conversion
Example 4: High-to-Low Frequency
• What if we chose again @date as the Source ID and Destination ID rather
than @date country?
• Similar to the example shown earlier, this instructs EViews to ignore the
country ID and perform conversion across all cross-section identifiers.
Panel to Panel Conversion: Example 4
1. Click on the Quarterly_Panel page.
Right-click on GDP series and select
Copy.
2. Click on the Annual_Panel page and
select Paste Special.
3. The Paste Special dialog box opens
up. Change the name of the series to
gdp1 (so as not to replace the existing
series), select Link under Paste as
section, and General match merge
criteria under Merge by section.
4. Under Match merge options, type
@date in Source ID and Destination
ID fields.
42
Panel-to-Panel Conversion
Example 4: High-to-Low Frequency (cont’d)
5. Let’s choose Sum as a contraction method. This computes:
The sum of GDP over four quarters for each country (contraction by date)
The sum of GDP for any given year across all countries (contraction by country)
6. Click OK.
43
Panel-to-Panel Conversion
Example 4: High-to-Low Frequency (cont’d)
• There is a problem in the previous example. The Annual_Panel page (the destination
page) consists of 6 countries (excluding the US), whereas the Quarterly_Panel page
(the source page) has 7 countries (including the US).
• The contraction (sum) was carried out based on the sample of the source page (all 7
countries). There is no good reason to sum over all 7 countries, if the destination page
(Annual_Panel) has only 6 countries.
• To fix this, we need to exclude “US” from the sample. We can do so by changing the
Source Sample on the dialog box as follows:
44
Panel-to-Panel Conversion
Example 4: High-to-Low Frequency (cont’d)
• Results are shown here.
45
Panel-to-Panel Conversion
A few notes: High-to-Low Frequency
• Note that when the Source ID and Destination ID fields are set at @date ,
EViews will aggregate across the cross-country IDs.
• EViews performs the following operations when going from high-to-low
frequency:
By country (cross-section contraction)
By date (frequency conversion).
• The type of contraction/conversion chosen will apply to both identifiers (date
and country).
• For example, if you select Mean, the data will average across four quarters of
the year and across all countries.
46
Panel to Non-Panel
Frequency Conversion
• In this section, we illustrate how to perform Frequency Conversions between a
Panel data page and Non-Panel page.
• Here is an (exhaustive) list of the type of conversions from Panel-to Non Panel:
Panel to Time Series: Same Frequency
Panel to Time Series: Low Frequency Panel to High-Frequency Time Series
Panel to Time Series: High-Frequency Panel to Low Frequency Time Series
Panel to Cross-Section
47
Panel to Non-Panel Conversion
Example 1: Same Frequency
• Suppose we want to copy the GDP data from the Quarterly_Panel page to
the TimeSeries_Quarterly page(which has quarterly data).
Panel to Non Panel: Example 1
1. Click on Quarterly_Panel page, right-click on GDP series and select Copy.
2. Next, click on TimeSeries_Quarterly page, right-click and select Paste Special.
48
Panel to Non-Panel Conversion
Example 1: Same Frequency (cont’d)
3. As usual, the Paste Special dialog box
opens up. Select Link under Paste as
section. Under the Merge by section,
choose General match merge criteria .
Under Match merge Options, the Source ID
and the Destination ID are set at @date (by
default). This instructs EViews that the
conversion will be done by date (i.e. use the
date structure in the panel page to align
observations with the date structure in the
non-panel page).
4. Set the Contraction method. This instructs
EViews on how to contract (aggregate) the
cross-sections data in order to compute one
single time series. There is an entire drop-
down menu of options, but the most
commonly used conversions are:
Sum (sums up the cross-section
observations for each time period).
Mean (averages the cross-section
observations for each time period).
49
Panel to Non-Panel Conversion
Example 1: Same Frequency (cont’d)
5. Let’s choose Mean as a contraction method. This computes the average GDP
for all seven countries in the Quarterly_Panel page and places that
value in the corresponding quarter in the TimeSeries_Quarterly page.
6. Click OK.
50
Panel to Non-Panel Conversion
Ex. 2: Low Freq. Panel to High Freq. Non Panel
• Now suppose you want to convert population data from the Annual_Panel
page into the TimeSeries_Quarterly page.
Panel to Non Panel: Example 2
1. Click on Annual_Panel page, right-click
on pop series and select Copy.
2. Click on TimeSeries_Quarterly page
and select Paste Special.
3. The Paste Special dialog opens up.
Select Link under Paste as section and
General match merge criteria under
Merge by section.
4. Under Match merge Options, set
Source ID and the Destination ID to
@date.
51
Panel to Non-Panel Conversion
Ex. 2: Low Freq. Panel to High Non Panel (cont’d)
5. Remember that EViews needs to know:
how to aggregate the data across countries
how to perform low-to-high frequency conversion.
To instruct EViews on the method of contraction across countries, select one of the
options under Contraction method. Let’s choose Sum.
This instructs EViews to sum the population data across all countries for
each year (country aggregations/contraction).
The low-to-high frequency conversion is accomplished by using Constant-
match average (this is the only option), meaning the low value is repeated
for each corresponding high-frequency period.
• NOTE: If we select another method of conversion (i.e., Mean), then the data is
averaged across all countries (to compute a single time series) and then repeated
for each corresponding quarter in the high-frequency file.
6. Click OK.
52
Panel to Non-Panel Conversion
Ex. 2: Low Freq. Panel to High Non Panel (cont’d)
• Results are shown here.
Note that the low-to-high frequency
conversion is performed by using
“constant-match average” which
means EViews simply repeats the
annual value for each quarter in the
TimeSeries_Quarterly page.
53
Panel to Non-Panel Conversion
Ex. 3: High Freq. Panel to Low Freq. Non Panel
• Suppose instead, you would like to copy GDP data from the Quarterly_Panel
page to the TimeSeries_Annual page.
Panel to Non panel: Example 3
1. Click on Quarterly_Panel page, right-
click on gdp series and select Copy.
2. Click on the TimeSeries_Annual
page, right click and select Paste
Special.
3. The Paste Special dialog opens up.
Select Link under Paste as section
and General match merge criteria
under Merge by section.
4. Under Match merge Options, set
Source ID and the Destination ID to
@date.
54
Panel to Non-Panel Conversion
Ex. 3: High Freq. Panel to Low Non Panel (cont’d)
5. Remember that EViews needs to know:
how to aggregate the data across countries
how to perform high-to-low frequency conversion.
To instruct EViews on the method of contraction across countries, select one of the
options under Contraction method. Let’s choose Sum.
This instructs EViews to sum the GDP data across countries for each quarter
(country aggregations/contraction).
This also instructs EViews to sum the GDP data across each quarter of the
year (frequency conversion).
• NOTE: the contraction method used for cross-section identifiers will also be applied
to frequency conversion. For example, if you chose Sum, the data will sum over all
four quarters of the year and then sum over all countries.
• If we select another method of conversion (i.e., Mean), then the data is averaged
across all countries (to compute a single time series) and then averaged across the
four quarters (to obtain the annual value).
6. Click OK.
55
Panel to Non-Panel Conversion
Ex. 3: High Freq. Panel to Low Non Panel (cont’d)
• Results are shown here. You can see the same method is used to contract data
across time and across cross-section identifiers (in this case Sum).
Sum of GDP data for all countries for all four quarters of
1994 = 65,073.52
Panel to Non-Panel Conversion:
Example 4: Panel to Cross-Section
• Now suppose you would like to copy the quarterly GDP data from the
Quarterly_Panel page to the Cross_Section page (which has the same cross-
section identifiers (or at least some overlap).
Panel to Non Panel: Example 4
1. Click on the Quarterly_Panel page, right-click on GDP series and select Copy.
2. Click on the Cross_Section page, right-click and select Paste Special.
57
Panel to Non-Panel Conversion:
Example 4: Panel to Cross-Section (cont’d)
3. The Paste Special dialog box opens up.
Under the Paste as section select Link.
4. Under Merge by box, choose General
match merge criteria.
5. Under Match merge Options you will
see that the Source ID and the
Destination ID are set at @country. This
tells EViews that the conversion will be
done by country (i.e. use the cross-
section structure in the panel page to
align observations with the cross-section
structure in the non-panel page).
6. Set the Contraction method. This tells
EViews how to contract the time series
data into a single cross-section series.
There are many options, but the most
used ones are Mean and Sum. Let’s
select Mean.
7. Click OK.
58
Panel to Non-Panel Conversion:
Example 4: Panel to Cross-Section (cont’d)
• EViews averages across all quarters for each country and places that value in the
cross-section page.
Panel to Non-Panel Conversion:
Example 4a: Panel to Cross-Section
• Now suppose you would like to copy only the maximum GDP data from the
Quarterly_Panel page to the Cross_Section page, but you would also like to
exclude the period from Q1 1998 to Q1 2000.
Panel to Non Panel: Example 4a
1. Follow steps 1-4 in the previous example
(let’s rename the series gdp1 so it does
not override the previous example).
2. Now, let’s set the Contraction method.
Since we want the max GDP, select
Maximum under Contraction method.
3. Define the sample to exclude Q1 1998 to
Q1 2000 by typing in the Source
sample:
@first 1981Q1 2000Q1 @last
4. Click OK.
60
Panel to Non-Panel Conversion:
Example 4a: Panel to Cross-Section (cont’d)
• Note that this picks the maximum GDP for each country over the defined sample.
61
Panel to Non-Panel Conversion:
Example 4b: Panel to Cross-Section
• As a final example, consider the case when you would like to bring GDP
information data from the Quarterly_Panel page into the Cross_Section.
• Specifically, you would like to find out the number of observations (quarters) for
which GDP was higher than the previous quarter.
Panel to Non Panel: Example 4b
1. Follow steps 1-4 in the previous example
(let’s rename the series gdp2 so it does not
override the previous example).
2. Now, let’s set the Contraction method.
Since we want the number of observations
for which GDP was higher than the previous
quarter, select Number of obs under
Contraction method.
3. Define the sample over those quarters when
GDP rose relative to the previous quarter, by
typing in the Source sample:
if gdp-gdp(-1)>0
4. Click OK.
62
Panel to Non-Panel Conversion:
Example 4b: Panel to Cross-Section
• For each country we now have the number of quarters out of the entire sample
(out of 28 quarters) when GDP was greater than the previous quarter.
63
Non-Panel to Panel
Frequency Conversion
• In this section, we illustrate how to perform Frequency Conversions between a
Non-Panel page and a Panel page.
• Here is an (exhaustive) list of the type of conversions from Non-Panel to Panel:
Time Series to Panel: Same Frequency
Time Series to Panel: Low Frequency Time Series to High-Frequency Panel
Time Series to Panel: High-Frequency Time Series to Low Frequency Panel
Cross-Section to Panel
64
Non-Panel to Panel Conversion
Example 1: Same Frequency
• Suppose we want to copy the consumption data from the TimeSeries_Annual
page to the Annual_Panel page.
Non-Panel to Panel: Example 1
1. Click on TimeSeries_Annual page, right-click on consumption series and select Copy.
2. Next, click on Annual_Panel page, right-click and select Paste Special.
65
Non-Panel to Panel Conversion
Example 1: Same Frequency (cont’d)
3. As usual, the Paste Special dialog box
opens up. Under Paste as section select
Link. Under the Merge by section,
choose General match merge criteria .
Under Match merge Options, the Source
ID and the Destination ID are set at @date
(by default). This instructs EViews that the
conversion will be done by date (i.e. use the
date structure in the TimeSeries page to
align observations with the date structure in
the panel page).
4. Contraction method. There is no need to
pick any option here. EViews will repeat the
same time series value for each cross-
section observation in the panel page (for
each country).
5. Click OK.
66
Non-Panel to Panel Conversion
Example 1: Same Frequency (cont’d)
• Results are shown here. As you can see, EViews repeats the same annual
consumption value for all countries (cross-section identifiers).
• Note also that EViews matches the calendar dates (in this case years) in the
non-panel file to the panel file and places the observations accordingly.
67
Non-Panel to Panel Conversion
Ex. 2: Low Freq. Non-Panel to High Freq. Panel
• Now suppose you want to convert consumption data from the
TimeSeries_Annual page into the Quarterly_panel page.
Non Panel to Panel: Example 2
1. Click on TimeSeries_Annual page,
right-click on consumption series and
select Copy.
2. Click on Quarterly_panel page and
select Paste Special.
3. The Paste Special dialog opens up.
Select Link under Paste as section and
General match merge criteria under
Merge by section.
4. Under Match merge options, set
Source ID and the Destination ID to
@date.
5. Contraction method. Again, there is no
need to pick any option here: The low-to-high frequency conversion is
EViews will repeat the same value accomplished by using Constant-match
from the non-panel page for each average (this is the only option), meaning the
cross section (country) identifier in low value is repeated for each corresponding
the panel page. high-frequency period.
6. Click OK.
68
Non-Panel to Panel Conversion
Ex. 2: Low Freq. Non-Panel to High Panel (cont’d)
• Results are shown here. As you can see, EViews repeats the same annual
consumption value for all countries (cross-section identifiers) and for each
corresponding quarter of a particular year in the Quarterly_Panel page.
69
Non-Panel to Panel Conversion
Ex. 3: High Freq. Non-Panel to Low Freq. Panel
• Now suppose you want to convert investment data from the
TimeSeries_Quarterly page into the Annual_panel page.
Non Panel to Panel: Example 3
1. Click on TimeSeries_Quarterly page,
right-click on investment series and
select Copy.
2. Click on Annual_panel page and select
Paste Special.
3. The Paste Special dialog opens up.
Select Link under Paste as section and
General match merge criteria under
Merge by section.
4. Under Match merge Options, set
Source ID and the Destination ID to
@date.
5. Contraction method. Here you need to
instruct EViews on how to perform high-
to-low frequency conversion. You can
select any method from the drop-down
menu. Let’s choose Sum.
6. Click OK.
70
Non-Panel to Panel Conversion
Ex. 3: High Freq. Non-Panel to Low Panel (cont’d)
• Results are shown here. As you can see, EViews sums all the values of the
quarterly investment data in order to create an annual value (high-to-low
frequency conversion).
• Then, EViews repeats these values for all cross-section identifiers (countries) in
the Annual_panel page.
71
Non-Panel to Panel Conversion
Example 4: Cross-Section to Panel
• Now suppose you would like to copy the debt data from the Cross_Section
page to the Annual_panel page (which has the same cross-section identifiers
(or some overlap).
Non Panel to Panel: Example 4
1. Click on Cross_Section page, right-
click on debt series and select Copy.
2. Click on Annual_panel page and select
Paste Special.
3. The Paste Special dialog opens up.
Select Link under Paste as section and
General match merge criteria under
Merge by section.
4. Under Match merge Options, set
Source ID and the Destination ID to
country (it is set to country by default).
5. Contraction method. Again, there is no
need to pick any options here. EViews
will repeat the same cross-section value
for all years for each country.
6. Click OK.
72
Non-Panel to Panel Conversion
Example 4: Cross-Section to Panel (cont’d)
• EViews repeats the debt value for each country across all years in the
Annual_panel page.
73