Sie sind auf Seite 1von 19

PGPEX

Session 1
2016
Understanding Econometrics
A case of Simple Regression

Data types we face in Real World


Cross Section: bank wagesbankwages.csv
Time series: Stock return data
Panel data

1/28/2016

Understanding Econometrics

Graphical illustration of the correlation coefficient


2

1
vv
v

y
3

x
Algebraic Signs of the Quantities (yi y ) and (xi x )

1/28/2016

Quadrant

yi -y

xi - x

(yi y) (xi x)

Understanding Econometrics

Fail to capture

40
30
Y
20
10

X
-7
-6
-5
-4
-3
-2
-1
0
1
2
3
4
5
6
7

The data:

Y
1
14
25
34
41
46
49
50
49
46
41
34
25
14
1

50

The relationship: Y=50-X^2

-10

1/28/2016

Understanding Econometrics

-5

0
X

10

Flaw in Correlation Coefficient


Y1
8.04
6.95
7.58
8.81
8.33
9.96
7.24
4.26
10.84
4.82
5.68

X1
10
8
13
9
11
14
6
4
12
7
5

Y2
9.14
8.14
8.74
8.77
9.26
8.1
6.13
3.1
9.13
7.26
4.74

X2
10
8
13
9
11
14
6
4
12
7
5

Y3
7.46
6.77
12.74
7.11
7.81
8.84
6.08
5.39
8.15
6.42
5.73

X3
10
8
13
9
11
14
6
4
12
7
5

Y4
6.58
5.76
7.71
8.84
8.47
7.04
5.25
12.5
5.56
7.91
6.89

X4
8
8
8
8
8
8
8
19
8
8
8

use http://www.ats.ucla.edu/stat/stata/examples/chp/p025b, clear


Correlation=.82

1/28/2016

Understanding Econometrics

10

12

10

Flaw in Correlation Coefficient

10

12

14

12

14

Y2

Fitted values

Fitted values

10

10

12

12

14

Y1

10
X2

X1

10

12

14

10

Y3

1/28/2016

Y4

Fitted values

Understanding Econometrics

15

20

X4

X3

Fitted values

A flowchart illustrating the dynamic iterative regression process


Start

Formulate the problem


Fit the model
No

Validate assumptions

Choose a set of variables


Choose form of model
Choose method of fitting
Specify assumptions
Use method of fitting
Residual plots
Outliers detection
Sensitivity analysis

OK?

Yes
Evaluate the fitted
model
No

Goodness of fit tests

Ok?

Yes
1/28/2016

Stop

Understanding Econometrics

Use the model for the


intended purpose

9.5

10

10.5

11

11.5

12

Bank wage
Sctatter: A starting point

10

15

20

EDUC

Correlation: 0.6967
1/28/2016

Understanding Econometrics

Simple Linear Regression


Although we could fit a line "by eye" e.g. using a
transparent ruler, this would be a subjective
approach and therefore unsatisfactory.
An objective, and therefore better, way of
determining the position of a straight line is to
use the method of least squares.
Using this method, we choose a line such that the
sum of squares of distances of all points from the
line is minimized.

1/28/2016

Understanding Econometrics

Least-squares or regression line


These distances, i.e., the distance between y
values and their corresponding estimated
values on the line are called residuals
The line which fits the best is called the
regression line or, sometimes, the leastsquares line
The line always passes through the point
defined by the mean of Y and the mean of X

1/28/2016

Understanding Econometrics

10

Steps involved
1. Statement of theory: Labour
Economics: Salary depends on
education Y = f ( X )
Step 2: Econometric Model
log( salary ) = y = 1 + 2 education + u

Step 3: data : bank wage

1/28/2016

Understanding Econometrics

11

Econometric model Building Step


Why error term is appearing?.
1. Omission of other explanatory variables
examples?
Note that there can be many x variables:
Multiple regression model
2. Measurement Error & Model Misspecification
3. Purely random
4. Linear approximation
1/28/2016

Understanding Econometrics

12

Statistical Inference(step 4)
4. Next task is to estimate the parameters of the
model so that we can say show relative increase in
salary due to one year of additional education.
To obtain a fitted line
Y = b1 + b2 X
Where y=log(salary) and X=education

1/28/2016

Understanding Econometrics

13

DERIVING LINEAR REGRESSION COEFFICIENTS: method of OLS


Y

True model : Y = 1 + 2 X + u
Fitted line : Y = b1 + b2 X
Yn = b1 + b2 X n

Yn
Y1

b1

b2

Y1 = b1 + b2 X 1
X1

1/28/2016

Xn

Understanding Econometrics

14

14

DERIVING LINEAR REGRESSION COEFFICIENTS


Y

True model : Y = 1 + 2 X + u
Fitted line : Y = b1 + b2 X
en

Yn = b1 + b2 X n

Yn
Y1

e1
b1

b2

e1 = Y1 Y1 = Y1 b1 b2 X 1

Y1 = b1 + b2 X 1

.....
en = Yn Yn = Yn b1 b2 X n

X1

1/28/2016

Xn

Understanding Econometrics

15

16

9.5

10

10.5

11

11.5

12

Bank wage Data

10

15

20

EDUC
y

1/28/2016

Fitted values

Understanding Econometrics

16

Actual and Fitted Model

1/28/2016

Understanding Econometrics

17

DERIVING LINEAR REGRESSION COEFFICIENTS

RSS = e12 + ... + en2 = (Y1 b1 b2 X 1 ) 2 + ... + (Yn b1 b2 X n ) 2


=

Y12 + b12 +

b22 X 12

2b1Y1

2b2 X 1Y1 +

2b1b2 X 1

b22 X n2

2b1Yn

2b2 X nYn +

2b1b2 X n

+ ...
+

Yn2 + b12 +

= Yi 2 + nb12 + b22 X i2 2b1 Yi 2b2 X iYi + 2b1b2 X i


RSS
= 0 2nb1 2 Yi + 2b2 X i = 0
b1
nb1 = Yi b2 X i

b1 = Y b2 X

RSS
= 0 2b2 X i2 2 X iYi + 2b1 X i = 0
b2
1/28/2016

Understanding Econometrics

18

19

b1 = y b2 x
b2

( y y )( x x )

=
(x x)
i

b2

1/28/2016

X Y n XY

=
X nX
i

i
2
i

Understanding Econometrics

19

Das könnte Ihnen auch gefallen