using eviews - gbv

6
Using EViews Vox Principles of Econometrics, Third Edition WILLIAM E. GRIFFITHS University of Melbourne R. CARTER HILL Louisiana State University GUAY С LIM University of Melbourne JOHN WILEY & SONS, INC

Upload: others

Post on 24-Oct-2021

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Using EViews - GBV

Using EViews Vox Principles of Econometrics, Third Edition

WILLIAM E. GRIFFITHS University of Melbourne

R. CARTER HILL Louisiana State University

GUAY С LIM University of Melbourne

JOHN WILEY & SONS, INC

Page 2: Using EViews - GBV

CONTENTS

CHAPTER 1 Introduction to EViews 1 1.1 Using EViews for Principles of

Econometrics 1 1.1.1 Installing EViews 6 student version 2 1.1.2 Checking for updates 2 1.1.3 Obtaining data workfiles 2

1.2 Starting EViews 3 1.3 The Help System 4

1.3.1 EViews help topics 4 1.3.2 The READ ME file 5 1.3.3 Quick help reference 5 1.3.4 EViews Illustrated 6 1.3.5 Users guides and command

reference 6 1.4 Using a Workfile 7

1.4.1 Setting the default path 7 1.4.2 Opening a workfile 8 1.4.3 Examining a single series 9 1.4.4 Changing the sample 12 1.4.5 Copying a graph into a document 13

1.5 Examining Several Series 14 1.5.1 Summary statistics for several

series 15 1.5.2 Freezing a result 16 1.5.3 Copying and pasting a table 17 1.5.4 Plotting two series 17 1.5.5 A scatter diagram 18

1.6 Using the Quick Menu 19 1.6.1 Changing the sample 20 1.6.2 Generating a new series 20 1.6.3 Plotting using Quick/Graph 21 1.6.4 Saving your workfile 22 1.6.5 Opening an empty group 23 1.6.6 Quick/Series statistics 25 1.6.7 Quick/Group statistics 26

1.7 Using EViews Functions 27 1.7.1 Descriptive statistics functions 27 1.7.2 Using a storage vector 30 1.7.3 Basic arithmetic operations 33 1.7.4 Basic math functions 34

KEYWORDS 35

CHAPTER 2 The Simple Linear Regression Model 36

2.1 Open the Workfile 36 2.1.1 Examine the data 3 7 2.1.2 Checking summary statistics 38 2.1.3 Saving a group 39

2.2 Plotting the Food Expenditure Data 40 2.2.1 Enhancing the graph 42 2.2.2 Saving the graph in the workfile 44 2.2.3 Copying the graph to a document 44 2.2.4 Saving a workfile 45

2.3 Estimating a Simple Regression 45 2.3.1 Viewing equation representations 47 2.3.2 Computing the income elasticity 48

2.4 Plotting a Simple Regression 49 2.5 Plotting the Least Squares Residuals 51

2.5.1 Using View options 51 2.5.2 Using Resids 52 2.5.3 Using Quick/Graph 52 2.5.4 Saving the residuals 53

2.6 Estimating the Variance of the Error Term 54

2.7 Coefficient Standard Errors 54 2.8 Prediction Using EViews 55

2.8.1 Using direct calculation 55 2.8.2 Forecasting 56

KEYWORDS 59

CHAPTER 3 Interval Estimation and Hypothesis Testing 60

3.1 Interval Estimation 61 3.1.1 Constructing the interval estimate 62 3.1.2 Using a coefficient vector

62 3.2 Right-tail Tests ..64

3.2.1 Test of significance 64 3.2.2 Test of an economic hypothesis 65

3.3 Left-tail Tests 65 3.3.1 Test of significance 65 3.3.2 Test of an economic hypothesis 66

3.4 Two-tail Tests 67 3.4.1 Test of significance 67 3.4.2 Test of an economic hypothesis 69

KEYWORDS 69

CHAPTER 4 Prediction, Goodness-of-Fit and Modeling Issues 70

4.1 Prediction in the Food Expenditure Model 70 4.1.1 A simple prediction procedure 71

ix

Page 3: Using EViews - GBV

4.1.2 Prediction using EViews 72 4.2 Measuring Goodness-of-Fit 75

4.2.1 Calculating R2 75 4.2.2 Correlation analysis 76

4.3 Modeling Issues 76 4.3.1 The effects of scaling the data 76 4.3.2 The log-linear model 78 4.3.3 The linear-log model 79 4.3.4 The log-log model 79 4.3.5 Are the regression errors normally

distributed? 80 4.3.6 Another example 81

4.4 The Log-Linear Model 85 4.4.1 Prediction in the log-linear model 86 4.4.2 Alternative commands in the log-

linear model 87

4.4.3 Generalized R2 89 KEYWORDS 89

CHAPTER 5 The Multiple Regression Model 90

5.1 The Workfile: Some Preliminaries 91 5.1.1 Naming the page 91 5.1.2 Creating objects: a group 92

5.2 Estimating a Multiple Regression Model 94 5.2.1 Using the Quick menu 94 5.2.2 Using the Object menu 96

5.3 Forecasting from a Multiple Regression Model 97 5.3.1 A simple forecasting procedure 97 5.3.2 Using the forecast option 99

5.4 Interval Estimation 102 5.4.1 The least squares covariance

matrix 102 5.4.2 Computing interval estimates 103

5.5 Hypothesis Testing 104 5.5.1 Two-tail tests of significance 104 5.5.2 A one-tail test of significance 105 5.5.3 Testing nonzero values 106

5.6 Saving Commands 108 KEYWORDS 109

CHAPTER 6 Further Inference in the Multiple Regression Model 110

6.1 F and Chi-Square Tests 110 6.1.1 Testing significance: a coefficient 111 6.1.2 Testing significance: the model 115

6.2 Testing in an Extended Model 116 6.2.1 Estimating the model 116 6.2.2 Testing: a joint Я 0 , 2 coefficents 117 6.2.3 Testing: a single Я0 ,

2 coefficents 118 6.2.4 Testing: a joint Я0 , 4 coefficents 121

6.3 Including Nonsample Information 122 6.4 The RESET Test 124

6.4.1 The short way 124 6.4.2 The long way 126

6.5 Viewing the Correlation Matrix 127 6.5.1 Collinearity: An exercise 128

KEYWORDS 129

CHAPTER 7 Nonlinear Relationships 130 7.1 Polynomials 130 7.2 Dummy Variables 134

7.2.1 Creating dummy variables 135 7.3 Interacting Dummy Variables 136 7.4 Dummy Variables with Several

Categories 138 7.5 Testing the Equivalence of Two

Regressions 140 7.6 Interactions Between Continuous

Variables 143 7.7 Log-Linear Models 144 KEYWORDS 146

CHAPTER 8 Heteroskedasticity 147 8.1 Examining Residuals 147

8.1.1 Plot against observation number 148 8.1.2 Plot against an explanatory

variable 149 8.1.3 Plot of least squares line 152

8.2 Heteroskedasticity-Consistent Standard Errors 154

8.3 Weighted Least Squares 155 8.3.1 A short way 155 8.3.2 A long way 156

8.4 Estimating a Variance Function 157 8.4.1 Variance function estimates 157 8.4.2 Generalized least-squares 159

8.5 A Heteroskedastic Partition 159 8.5.1 Least-squares estimates:

one equation 160 8.5.2 Least-squares estimates:

two equations 160

x

Page 4: Using EViews - GBV

8.5.3 Generalized least-squares estimates 162

8.6 The Goldfeld-Quandt Test 163 8.6.1 The wage equation 164 8.6.2 The food expenditure equation 164

8.7 Testing the Variance Function 166 8.7.1 The Breusch-Pagan test 167 8.7.2 The White test 168

KEYWORDS 169

CHAPTER 9 Dynamic Models, Autocorrelation, and Forecasting 170

9.1 Least-Squares Residuals: Sugarcane Example 170 9.1.1 Correlation between e, and <?,_, 172

9.2 Newey-West Standard Errors 174 9.3 Estimating an AR(1) Error Model 175

9.3.1 A short way 175 9.3.2 A long way 176 9.3.3 A more general model 178 9.3.4 Testing the AR(1) error

restriction 178 9.4 Testing for Autocorrelation 179

9.4.1 Residual correlogram 179 9.4.2 Lagrange multiplier (LM) test 182 9.4.3 Durbin-Watson test 183

9.5 Autoregressive Models 184 9.5.1 Workfile structure for time series

data 184 9.5.2 Estimating an AR model 185 9.5.3 Forecasting with an AR model 187

9.6 Finite Distributed Lags 189 9.7 Autoregressive Distributed Lag Models 190

9.7.1 Graphing the lag weights 191

KEYWORDS 193

CHAPTER 10 Random Regressors and Moment Based Estimation 194

10.1 The Inconsistency of the Least Squares Estimator 194

10.2 Instrumental Variables Estimation 199 10.3 The Hausman Test 201 10.4 Test for Weak Instruments 202 10.5 Test Instrument Validity 203

10.6 A Wage Equation 204

KEYWORDS 210

CHAPTER 11 Simultaneous Equations Models 211

11.1 Examining the Data 211 11.2 Estimating the Reduced Form 212 11.3 TSLS Estimation of an Equation 213 11.4 TSLS Estimation of a System of

Equations 214 11.5 Supply and Demand at Fulton Fish

Market 216

KEYWORDS 218

CHAPTER 12 Nonstationary Time Series Data and Cointegration 219

12.1 Stationary and Nonstationary Variables 219

12.2 Spurious Regressions 221

12.3 Unit Root Tests for Stationarity 222

12.4 Cointegration 224

KEYWORDS 226

CHAPTER 13 VEC and VAR Models: An Introduction to Macroeconometrics 227

13.1 VEC and VAR Models 227 13.2 Estimating a VEC Model 227 13.3 Estimating a VAR Model 230 13.4 Impulse Responses and Variance

Decompositions 233

KEYWORDS 233

CHAPTER 14 Time-Varying Volatility and ARCH Models: An Introduction to Financial Econometrics 234

14.1 Time-Varying Volatility 234 14.2 Testing for ARCH Effects 236 14.3 Estimating an ARCH Model 239 14.4 Generalized ARCH 242 14.5 Asymmetric ARCH 243

14.6 GARCH in Mean Model 245

KEYWORDS 246

XI

Page 5: Using EViews - GBV

CHAPTER 15 Panel Data Models 15.1 Granfeld Data: Two Equations

15.1.1 Separate least squares estimation

15.1.2 Stacking the data 15.1.3 Least squares estimation with

dummy variables 15.1.4 Introducing the pool object 15.1.5 Seemingly unrelated

regressions 15.1.6 Testing contemporaneous

correlation 15.1.7 Testing cross-equation

restrictions 15.2 Granfeld Data: Ten Firms

15.2.1 Structuring the workfile 15.2.2 Fixed effects using dummy

variables 15.2.3 Testing the effects 15.2.4 Pooled least squares 15.2.5 The fixed effects estimator

15.3 NLS Panel Data 15.3.1 Fixed effects estimation 15.3.2 Random effects estimation 15.3.3 The Hausman test

KEYWORDS

247 247

248 249

251 252

254

255

256 257 258

258 260 260 261 263 264 265 266 268

16.4.2 Tobit estimation and interpretation

296 16.4.3 The Heckit selection bias

model KEYWORDS

CHAPTER 17 Importing and Exportir Data

17.1 Obtaining Data from the Internet 17.2 Importing An Excel Data File 17.3 Date Conventions 17.4 Importing a Text (Ascii) Data File 17.5 Entering Data Manually 17.6 Exporting Data from EViews KEYWORDS

APPENDIX A Review of Math Essentials

A. 1 Mathematical Operations A.2 Logarithms and Exponentials A.3 Graphing Functions KEYWORDS

APPENDIX В Statistical Distribution Functions

298 304

'g 305 305 310 313 314 316 318 318

319 319 320 322 325

326

CHAPTER 16 Qualitative and Limited 269 Dependent Variables

16.1 Models with Binary Dependent Variables 16.1.1 Examine the data 16.1.2 The linear probability model 16.1.3 The probit model 16.1.4 Predicting probabilities 16.1.5 Marginal effects in the probit model

16.2 Ordered Choice Models 16.2.1 Ordered probit predictions 16.2.2 Ordered probit marginal effects 284

16.3 Models for Count Data 286 16.3.1 Examine the data 288 16.3.2 Estimating a Poisson model 290 16.3.3 Prediction with a Poisson

model 290 16.3.4 Poisson model marginal effects 292

16.4 Limited Dependent Variables 293 16.4.1 Least squares estimation 294

269 270 271 273 275

277 279 281

B.l Cumulative Normal Probabilities 327 B.2 Using Vectors 329 B.3 Computing Normal Distribution

Percentiles 331 B.4 Plotting Some Normal Distributions 332 B.5 Plotting the/-Distribution 335 B.6 Plotting the Chi-square Distribution 335 B.7 Plotting the F Distribution 336 B.8 Probability Calculations for the t, F and

Chi-square 337 KEYWORDS 337

Appendix С Review of Statistical Inference 338

C.l A Histogram 338 C.2 Summary Statistics 340

C.2.1 The sample mean 340 C.2.2 Estimating higher moments 341 C.2.3 Create a table 342 C.2.4 Using the estimates 345

C.3 Interval Estimation 346

xii

Page 6: Using EViews - GBV

C.4 Hypothesis Tests About the Population Mean 348 C.4.1 One-tail test using the hip data 348 C.4.2 Two-tail test using the hip data 348 C.4.3 Testing the normality of the

population 349

KEYWORDS 350

INDEX 351