EVIEWS TUTORIAL BY DR. AHN 1 INSTRUCTION FOR ...

41 downloads 72 Views 8MB Size Report
USING EVIEWS. [1] Reading Eviews Data Files (files with wf1 extension) .... EVIEWS TUTORIAL BY DR. AHN. 28. [5] Transforming Data. STEP 1: Push the Genr ...
EVIEWS TUTORIAL BY DR. AHN INSTRUCTION FOR ACCESSING AN INSTRUCTOR VOLUME Special Note: To use the computers located at ASU, you must have an ASURITE ID. You may obtain the ASURITE ID at Computer Commons computing sites (see the support staff for assistance). Once you receive your ASURITE ID and have confirmed that it works, please follow the steps explained below to access my instructor volume. (Note: It would take a day until your ASURITE ID becomes effective.) Problem Tips: The computer may already be on. If the last student did not log out and the desktop screen still shows a set of icons, click on the Log Out icon and then click on Log Me Out. Accessing the Instructor's Volume 1. 2. 3. 4. 5. 6. 7. 8. 9

At the sign on screen enter your ASURITE ID and password. Enter both items in lower case. Then, click on OK. Wait during the message “Mounting AFS volumes.” Soon the Window desktop will be displayed. Double click on the Applications folder icon on the desktop. Double click on the Instructor Volumes folder icon on the desktop. Find the icon named ECN525 or ECN527 or ECN480, and double click on it. The U: drive instructor volume is now mounted but you cannot see it until the current window is closed. Close the instructor volume window by clicking on X in the upper right corner of the window. Click on the icon named iv-U: drive. Click on the icon named Eviews. Do whatever you want to do with Eviews. When all jobs are done, click the X button on the top right corner of your screen. Then, Eviews will ask you whether you want to save all jobs you have done. You can choose Yes or No depending on your preference.

1

EVIEWS TUTORIAL BY DR. AHN USING EVIEWS [1]

Reading Eviews Data Files (files with wf1 extension)

STEP 1:

Using your mouse, choose File/Open/workfile.

2

EVIEWS TUTORIAL BY DR. AHN STEP 2:

Find the driver and the folder where the file you want to read is located. Then, click on the file name. Then, click on Open button.

3

EVIEWS TUTORIAL BY DR. AHN [2]

Importing Data from Excel

For the following exercises, you need to download kmacro.xls and johndoe.xls from my web page for ECN 425 and locate them at your file folder. STEP 1:

Open kmacro.xls using Excel. Then, using your mouse, block the data and copy them.

4

EVIEWS TUTORIAL BY DR. AHN

5

EVIEWS TUTORIAL BY DR. AHN STEP 2:

Open Eviews. Then, type the following on the Eviews window (the narrow white window below the File, Edit, Objects buttons): create q 1988:1 1997:4 (enter).

6

EVIEWS TUTORIAL BY DR. AHN Then, a workfile window will pop up.

7

EVIEWS TUTORIAL BY DR. AHN Type the following on the Eviews window: data kcpi kcomr kgovr lkgdp (return)

8

EVIEWS TUTORIAL BY DR. AHN Then, a spreadsheet will pop up.

9

EVIEWS TUTORIAL BY DR. AHN Locate the cursor on the most north-west cell, and then paste the data.

10

EVIEWS TUTORIAL BY DR. AHN

11

EVIEWS TUTORIAL BY DR. AHN STEP 3:

Click X (exit button) in the top right corner of the spreadsheet. Then, Eviews will ask you whether you wish to delete untitled GROUP. Click the Yes button.

12

EVIEWS TUTORIAL BY DR. AHN Then, you are back to the workfile.

13

EVIEWS TUTORIAL BY DR. AHN STEP 1:

Open johndoe.xls using Excel. And block the data and copy them.

14

EVIEWS TUTORIAL BY DR. AHN STEP 2:

In the Eviews window, type: create u 15.

15

EVIEWS TUTORIAL BY DR. AHN Push the return button on your keyboard. Then you will see:

16

EVIEWS TUTORIAL BY DR. AHN STEP 3:

In the Eviews window, type: data x y (enter). Then, you will see:

STEP 4:

Do the same things as you have done above.

17

EVIEWS TUTORIAL BY DR. AHN [3]

Expanding Data

STEP 1:

In the Eviews window, type: expand. Then, “workfile structure” window will pop up. Change “10” to “15” in the Observations box. Then, click on the OK button.

18

EVIEWS TUTORIAL BY DR. AHN

19

EVIEWS TUTORIAL BY DR. AHN Then, you will see the following window. Click on the Yes button.

20

EVIEWS TUTORIAL BY DR. AHN Then, you will be back to the workfile.

21

EVIEWS TUTORIAL BY DR. AHN STEP 2:

Click on the Show button on the top of the workfile. Then, Show window will pop up. Type “x y” on it and push the OK button.

22

EVIEWS TUTORIAL BY DR. AHN Then, you will have a spreadsheet.

23

EVIEWS TUTORIAL BY DR. AHN Push the Edit+/- button. Then, revise the values of X for the 11th-15th observations as follows: X 300 400 500 600 700

Y NA NA NA NA NA

The purpose of this “expansion” exercise is to let you know how to forecast.

24

EVIEWS TUTORIAL BY DR. AHN [4]

Saving Data

STEP 1:

Push File/Save As button.

STEP 2:

Find the driver and the folder where you want to save your work file.

25

EVIEWS TUTORIAL BY DR. AHN STEP 3:

Go to File Names. Type, for example: johndoe.wf1 (return).

26

EVIEWS TUTORIAL BY DR. AHN Then, you will have the following window. Push the OK button.

27

EVIEWS TUTORIAL BY DR. AHN [5]

Transforming Data

STEP 1: STEP 2:

Push the Genr button on the workfile. Type on the Generate Series by Equation window: lnx = log(x) (return). [Here, log is the natural log.] Other Examples: invy = 1/y; xy = x*y; dum = x > 200. Here dum is a dummy variable which equals 1 if x > 200, and 0 if x ≤ 200.

28

EVIEWS TUTORIAL BY DR. AHN To see the variables you created, click on the Show button on the workfile and type “x y lnx xy dum”.

29

EVIEWS TUTORIAL BY DR. AHN Then, you will see:

30

EVIEWS TUTORIAL BY DR. AHN [6]

Choosing a sample range

STEP 1: STEP 2:

In the work file, push Sample button. In Sample Range Pairs box, type “1 10”. [Another example: In If Condition box, type “X>200”]

31

EVIEWS TUTORIAL BY DR. AHN [7]

Obtaining Data Statistics

STEP 1:

Push Show button. Type "x y". Then, click on OK.

32

EVIEWS TUTORIAL BY DR. AHN STEP 2:

Click View/Descriptive Stats/Individual Samples.

33

EVIEWS TUTORIAL BY DR. AHN Then, you will see:

34

EVIEWS TUTORIAL BY DR. AHN X

Y

Mean Median Maximum Minimum Std. Dev. Skewness Kurtosis

170.0000 170.0000 260.0000 80.00000 60.55301 0.000000 1.775758

111.0000 112.5000 155.0000 65.00000 31.42893 -0.037462 1.814310

Jarque-Bera Probability

0.624487 0.731803

0.588115 0.745234

Observations

10

10

2

Std. Dev . of X =

Σ i( X i - X) ; Std. Dev. of Y = n -1

2

Σ i( Y i - Y) . n -1

Skewness of X = Estimate of E[(X-µX)3/σX3]. [If X is normally distributed, Skewness is close to zero.] Kurtosis of X = Estimate of E[(X-µx)4/σX4]. [If X is normally distributed, kurtosis is close to 2.] Jarque-Bera statistic = a test statistic for normality of X or Y. [Under the null hypothesis of normality, the statistic is χ2(2)-distributed. Look at the p-value of the J-B statistic for X. If you choose α = 0.05, do not reject Ho.] STEP 3: STEP 4:

If you want to print out the results, push Print button. Click X in the top right corner of the spread sheet. When asked if you want to delete untitled GROUP, click on Yes.

35

EVIEWS TUTORIAL BY DR. AHN [8]

Scatter Diagram On the Group window, choose view/Graph/Scatter/Scatter with Regression.

36

EVIEWS TUTORIAL BY DR. AHN Then, you will have:

37

EVIEWS TUTORIAL BY DR. AHN Choose OK. Then,

38

EVIEWS TUTORIAL BY DR. AHN [9]

OLS Regression

STEP 1:

Push Objects/New Object on the workfile.

39

EVIEWS TUTORIAL BY DR. AHN STEP 2:

Choose Equation. Then, name the folder in which you wish to store estimation results. You may choose any name (e.g., “jim”). Then, push OK button.

Then, you will have Equation Estimation box.

40

EVIEWS TUTORIAL BY DR. AHN STEP 3:

In Equation Specification box, type: y c x (enter). [Another example: log(y) c log(x)]

41

EVIEWS TUTORIAL BY DR. AHN STEP 4:

Click on the Option button. Check on Heteroskedasticity Consistent Coefficient Covariance. Then click on the OK button. You are now back to the Equation Specification window.

42

EVIEWS TUTORIAL BY DR. AHN STEP 5:

Click on the OK button. Then, you will see:

Dependent Variable: Y Method: Least Squares Sample(adjusted): 1 10 Included observations: 10 after adjusting endpoints White Heteroskedasticity-Consistent Standard Errors & Covariance Variable

Coefficient

Std. Error

t-Statistic

Prob.

C X

24.45455 0.509091

7.453797 0.042212

3.280817 12.06035

0.0112 0.0000

R-squared Adjusted R-squared S.E. of regression Sum squared resid Log likelihood Durbin-Watson stat

0.962062 0.957319 6.493003 337.2727 -31.78092 2.680127

Mean dependent var S.D. dependent var Akaike info criterion Schwarz criterion F-statistic Prob(F-statistic)

43

111.0000 31.42893 6.756184 6.816701 202.8679 0.000001

EVIEWS TUTORIAL BY DR. AHN Note: (1)

24.45455 → βˆ0 ; 7.453797 → SE ( βˆ0 ) ; 0.509091 → βˆ1 ; 0.042212 → SE ( βˆ1 ) .

(2)

3.28 → t statistic for Ho: β0 = 0. 0.0112 → p-value for testing Ho: β0 = 0 against H1: β0 ≠ 0 . [If you choose α = 0.05, reject Ho; if α = 0.01, accept Ho.]

(3)

12.06 → t statistic for Ho: β1 = 0. 0.0000 → p-value for testing Ho: β1 = 0 against H1: β1 ≠ 0 . [If you choose α = 0.05, reject Ho; if α = 0.0001, reject Ho.] 2

(4)

R-Square → R2; Adjusted R-squared → R .

(5)

S.E. of regression → SSR = RSS /( n − k − 1) ; Sum squared resid → RSS

(6)

Adjusted R-Square → R 2 ;

(7)

S.D. dependent var →

(8)

F-statistic → F for Ho: β1 = 0; Prob(F-statistic) → p-value for the F test.

(9)

Durbin-Watson stat → a test for autocorrelation.

s = 2 y

Mean dependent var → Y . Σi (Yi − Y ) 2 . n −1

44

EVIEWS TUTORIAL BY DR. AHN STEP 6:

Click view/coefficient tests/Wald-coefficient restrictions.

45

EVIEWS TUTORIAL BY DR. AHN If you want to test for Ho: β0 = β1 = 0, type c(1) = 0, c(2) = 0 . Click on OK button.

46

EVIEWS TUTORIAL BY DR. AHN Then, you will see:

47

EVIEWS TUTORIAL BY DR. AHN Wald Test: Equation: Untitled Test Statistic F-statistic Chi-square

Value

df

Probability

1530.650 3061.300

(2, 8) 2

0.0000 0.0000

Value

Std. Err.

24.45455 0.509091

7.453797 0.042212

Null Hypothesis Summary: Normalized Restriction (= 0) C(1) C(2) Restrictions are linear in coefficients.

STEP 7:

Click the forecast button. Go to S.E. (Optional) and type "yse". Go to Sample range for forecast. and type "11 15". Click on the OK button.

48

EVIEWS TUTORIAL BY DR. AHN Then, you will see:

Click the X button in the top right corner of the graph window to close the graph window.

49

EVIEWS TUTORIAL BY DR. AHN STEP 9:

Push the show button on the workfile window. In sample range pairs box, type " 11 15" and click on the OK button.

50

EVIEWS TUTORIAL BY DR. AHN Click on the Show button on the workfile. Then, in the Show window, type “yf yse”.

51

EVIEWS TUTORIAL BY DR. AHN Click on the OK button. Then, you will see:

YF 177.181818182 228.090909091 279 329.909090909 380.818181818

YSE 8.75240608279 11.8676303576 15.5149488031 19.3964834549 23.3959494883

STEP 10:

Click the X button in the top right corner of the spread sheet.

STEP 11:

Click on the Save button on the workfile if you wish to save your estimation results. The results can be recalled by clicking on “jim” on the workfile later.

52