Sie sind auf Seite 1von 8

w7\E380-W\ EVIEWS 1

============================================================================================================

EVIEWS: The Basics


EVIEWS NOTES: CH. 2
A First Look at EVIEWS. PS02_C3
The purpose of this exercise is to introduce you to EVIEWS and to relate
the statistical output in EVIEWS to those produced by your STATPACK.

a. Refer to the instructions at the end of this problem set chapter on


how to import data from a spreadsheet into EVIEWS.

b. Load EVIEWS which you have previously installed on your WINDOWS


based computer, in DMH 148 the EVIEWS password is: 4230.
c. OPEN a new workfile, and either import the data from an Excel/Ascii
data file, or simply type the data from scratch:
Data GPA PYD
Enter the data from PS02_A1, the student GPA exercise.

d. Run a regression using the OLS command in the form:

LS Dependent-Variable C Independent-Variable

Your actual OLS command would be:

LS GPA C PYD

SAVE the EVIEWS data file, and PRINT a copy of your OLS output to bring
it to class along with a copy of your STATPACK output for the same data
set.
w7\E380-W\ EVIEWS 2
============================================================================================================

A. CREATE A WORKFILE
1. Load EVIEWS.
2. Click: File/New/Workfile.
a. Click the type of data you wish to enter: e.g., Undated
b. Click the End Observation Box and Enter: 8
c. Click: o.k.
3. Enter the data.
a. Click: Quick/Empty Group(edit series).
b. Enter the 1st variable’s values (GPA). Use the down arrow.
c. Enter the second series (parent’s income: PYD) values.
d. Click: Name and change SER1 to GPA.
e. Click: Name and change SER2 to PYD (for family/parent’s income).
f. Click: [-] to close the window.

4. Save the file. Click: File/Save as. Pick a name.


e.g., PS02-C3 or GPA-Study

5. Make a Graph.
a. Click(maximize) the data “spreadsheet.”
b. Select the data.
c. Select: View.
d. Select: Graph. Two line series show.
e. To change graph’s appearance, double click the graph.
-Change: line graph to scatter diagram.
-Click: Regression line.
-Click: o.k.
-Close window when done.

6. Calculate OLS parameters.


In the EVIEWS command line, enter:
Eviews Command/Dependent Variable/Intercept/Independent Variable
e.g., type: LS GPA C PYD
Eviews Output will display and for the GPA exercise, you should see
that your STATPACK results are duplicated.

7. To view residuals, click: View/Actual,fitted residual/table


w7\E380-W\ EVIEWS 3
============================================================================================================

EVIEW NOTES: CH.3


A. IMPORTING EXCEL TO EVIEWS
1. In EXCEL/LOTUS, open the spreadsheet file containing the desired
data set.
a. Note location of upper leftmost observation. e.g., A5
b. Note variable names:
e.g., RENT NO RM SEX DIST RPP
c. Note the 1st and last value of the first variable.
e.g., RENT (230, 480)
d. Note the count (or dates for a time series data set)

2. Close the Excel file (n.b., Save in Excel 4 format)

3. Load EVIEWS
a. Select: New file/ Workfile/ undated/ End obs.
e.g., 32
b. Select: PROCS/ Import Data/location
e.g., Drive:A:
List file type: Excel/ Select: desired file/ o.k.
c. Type upper left data cell in target file (e.g., A5)
1.) Type names of variables in order
e.g., RENT NO RM SEX DIST RPP
2.) Click: [o.k.]

4. In EVIEWS Check for successful import:


i.e., Type: SHOW RENT NO RM SEX DIST RPP
Do 1st and last values of the 1st variable (e.g., RENT 230, 480)?
If yes, you are ready to go to work!
w7\E380-W\ EVIEWS 4
============================================================================================================

A. Access an EXCEL file


1. Load Excel
Load EX32.XLS EVIEWS data disk
Note: cell (B2) & N (54:3 95:6)
Close file

2. OPEN EVIEWS
FILE
NEW
WORKFILE
[QUARTERLY]
START [54:1]
END [95:2]
3. PROCS
IMPORT DATA
TYPE: [EXCEL]
DRIVES: [A:]
FILE NAME: [ex32.xls] ok
ORDER OF DATA: COL or ROWS
SERIES NAMES: GC GYD ok

4. VIEW DATA
a. D-CLICK GC & GYD TO RAISE SPREADSHEET
OPEN GROUP
or
b. COMMAND LINE: SHOW GC GYD

5. VIEW GRAPH While in spreadsheet


VIEW
GRAPH
D-CLICK GRAPH
TYPE: SCATTER

6. LS GC C GYD

What if there are too many variables to import (>19)?


1. Use Cut and Paste in Excel to rearrange the data set so that the
variables you need for EVIEWS reside next to one another.
When you import in EVIEWS if you list only 6 variables, that is all
the EVIEWS will read even if your Excel data file had 100 variables.
or
2. Import the variables you want individually. That is, if you tell
EVIEWS that variable XYZ starts in cell AA5, it will disregard all
the other variables before or after that column.

I think that procedure #1 will be generally easier to apply, but


procedure #2 provides an easy way to add a variable or two to an
existing EVIEWS file. e.g., The variables you import for a file to do a
w7\E380-W\ EVIEWS 5
============================================================================================================

Chapter 3 exercise may be insufficient for a Chapter 7 exercise using


the same data set

B. CHANGE SAMPLE SIZE


1. SMPL 59:1 95:2

2. LS GC C GYD p.20
w7\E380-W\ EVIEWS 6
============================================================================================================

C. GENERATE A VARIABLE
1. SMPL 54:1 95:2

2. RANDOM GENERATOR FUNCTION p.21


µ = 50 σ = 5

GENR X = 50 + 5*NRND

3. SMPL 59:1 95:2

4. LS GC C X
Is GC = ƒ(GYD) better than a guess?

REPEAT EXPERIMENT:
Redisplay GENR function in command window
Press: [E]
LS GC C X
D. ADD TO A DATA SET
1. If you are luck enough to come across more data after you have
created a new workfile, you do not have to start from scratch.

Assume that your data set currently has 14 observations and you have
just found another 10.

To add observations, use the EXPAND command.

In the command window, enter:

EXPAND 24

DATA X1 X2 Y
Go to the end of the data and enter the additional 10 rows of data.
To check for success:
SMPL 1 24
SHOW X1 X2 Y

E. STATISTICAL COMMANDS
COR X1 X2 Returns the correlation coefficient

STATS X1 X2 Returns a collection of standard statistics


w7\E380-W\ EVIEWS 7
============================================================================================================

EVIEW NOTES CH.4


A. INTRO
Skip Ex4.1. Data is quarterly. Dependent variable (GCDAN) is in EX32 as
monthly.

B. EX4.2 (TBILLS)
1. Load EVIEWS: ex04-2.WF1

2. RENAME GPW PW

3. GENR %change GENR GPW = ……………..


GENR GM2 =

4. SMPL 60:2 95:8

5. LS R C IP GM2 GPW(-1) p.31

6. Repeat #5 using @PCH(PW(-1))


SMPL 59:1 96:2 Estimate for entire period.
LS R C IP @PCH(FM2) @PCH(GPW(-1)) p.31

7. p.32?
8. Read rest of chapter
9. Do M-C exercise from handouts.
Put data on computer

EVIEWS NOTES CH.10

A. GENERATE AN ANNUAL TIME TREND


Say that the data set you have is for the years 1959 to 1983. For what
ever reason, you forgot to import the time variable.
1. Use the EXPAND command:
Type: EXPAND 58 83
EVIEWS will increase the space allocated to your data set by one
row.

2. Create a base value (i.e., a scalar)


Type: SMPL 58 58
Type: GENR YEAR = 1958

3. Create the new data series


Type: SMPL 59 83
w7\E380-W\ EVIEWS 8
============================================================================================================

Type: GENR YEAR = YEAR(-1) + 1

4. Check your work


Type: SHOW YEAR

B. GENERATE A QUARTERLY TIME TREND


Say that the data set you have is for the years 1977.4 to 1983.1 For
what ever reason, you forgot to import the time variable.
1. Use the EXPAND command:
Type: EXPAND 77.3 77.3
EVIEWS will increase the space allocated to your data set by one
row.

3. Create a base value (i.e., a scalar)


Type: SMPL 77.3 77.3
Type: GENR QTR = 77.75

3. Create the new data series


Type: SMPL 77.4 83.1
Type: GENR QTR = QTR(-1) + 0.25

4. Check your work


Type: SHOW QTR

eof

Das könnte Ihnen auch gefallen