Professional Documents
Culture Documents
Edward Omey
1. What is econometrics?
2. The method of least squares
3. Selection of variables
4. The basic assumtions
5. Checking the basic assumptions
6. Making Predictions
7. Some references
Together with this text is an example that is called
’EconometricsExampleText.xls’.
There is also a …le called
’BBA3EconometricsAndExcel’
and there is a table with critical values of the Kolmogorov-Smirnov test.
Both are available in "Teaching material BBA3" on www.edwardomey.com.
1
1 What is econometrics?
1.1 Introduction
Econometrics can be seen as scienti…c research in which we complete the
results of economic assumptions and theories with quantitative information
that is based on real data.
In economic theory, usually there is a qualitative analysis based on some
reasonable assumptions. As an example, in economic theory one argues that
an increase in the price of a product will result in a decrease of the demand
of that product. In econometrics we want to quantify this theoretical result
to know what will be the resulting demand if we increase the price by, for
example, 1 euro.
In mathematical economics one tries to present economic theory in a
mathematical, formal way. In econometrics we want to verify these mathe-
matical models by using real data. As a result we can eventually decide that
the theory is a good or a bad representation of the real world.
Economic statisticiens usually collect data and present data in various
ways. Usually these data form the basis of further statistical analysis.
2
resp. causal relations between - one group of variables on other groups of
variables.
Sometimes one uses economic models which give a "simple" representa-
tion of the real life.
Example. Keynes examined the relations between consumption and sav-
ings and he found that "people tend to spend more when income goes up".
A simple model is the following model: C = a + bY , 0 < b < 1, where
C = consumption and Y = income.
This formula is an example of a mathematical model. It consists of 2
variables and 1 relation. On a graph the model corresponds to a straight line
with slope b. The graph intersects the vertical axis in a.
In econometric models it is important to answer the following questions:
- how many variables are we going to include in a model?
- which variables are we going to include in a model?
- how many relations and which relations are we going to include in the
model?
Example
In studying the income Y of individual workers, economic theory leads to
a formal relation of the form
Y = f (age, sexe, level of education, years of experience, knowledge
of languages,...)
To formulate an econometric model it is necessary to know how many
variables and which variables to include ànd to specify the relation Y =
f (::::).
3
a2) Ordinal data: these are nominal data which can be sorted in a mean-
ingful way
Examples: the stars of hotels; the size of shoes; the highest diploma;...
b) Quantitative - the data can be represented by meaningful numbers
b1) Interval data
b2) Ratio data
Ratio data are based on real variables that have a natural zero. The
number zero means that the characteristic is absent.
Example: income (my income is zero); points (I obtained zero points);
revenue (I sold zero products);...
When we deal with ratio data, then the words "double" or "halve" make
sense.
In dealing with interval data we have a variable without a natural zero
and it doesn’t make sense to use the words "double" or "halve".
Typical examples are:degrees in C or in F ; all IQ-scales.
1.4.2 Dummy
In many econometric models we have to deal with qualitative variables. In
order to include such variables in a mathematical model it will be useful to
quantify these qualitative variables. To this end we are going to use 1 or
more dummy variables. A dummy variable is a variable that can take on
only 2 values: 1 or 0.
Example. When we have a qualitative variable with 2 categories, we use
1 dummy variable. Suppose that we have to deal with the sexe of people, we
can de…ne D = 1 if the person is female, and D = 0 if the person is
male.
Example. When we have a qualitative variable with 3 categories, we use
2 dummies. Suppose that we want to model the colours at a tra…c light. We
can de…ne
D(1) = 1 if light is red D(1) = 0 otherwize
D(2) = 1 if light is green D(2) = 0 otherwize
In this case we …nd the following possibilities
D(1) D(2) result
1 0 red
0 1 green
0 0 orange
1 1 impossible
4
1.4.3 Quality of data
Many companies and government organisations collect data and construct
(huge) databases. Some of these are freely available on internet.
Using these data one has to be careful about the quality of the data. In
many cases the published data suggest a higher precision than in reality. One
often publishes rounded numbers or (weekly, monthly,...) averages. Some
always round down and others round in another way.
In collecting data one often has problems with validity: do the data
measure what we really want to measure? For one variable it is often the
case that people use several proxies. To measure - for example - poverty in
a country, one can use several variables:
- Gini - coe¢ cient
- the proportion of people living below the poverty line
- the ratio Q(3)=Q(1)
etc.
5
- We study the 2010 unemployment rate in the di¤erent countries of
the EU and we use (for example) the mean income, the interest rate, the
population density, the ratio new companies/failed companies, etc.
Y = f (X; Z; U; V; :::)
Y = f (X; Z; U; V; ").
6
* Y = a + bX + cX 2
* Y = a + bX + cZ + d exp(X)
* Y = a + b log(X) + c log(Z)
etc.
Y = a + bX + cZ + dU + eV + ::: + "
= f (X; Z; U; V; :::; a; b; c; :::; ").
Here
* Y is the variable that we want to explain;
* X; Z; U; V; ::: are the explanatory variables, the variables that we use to
explain Y ;
* a; b; c; d; ::: are the parameters in the model;
* " is the (stochastic) error term.
7
By de…nition, we assume that each of these data points satis…es the "for-
mula":
Method
In the formula
we know the values of Yi ; Xi ; Zi ; ::: but not the values of a; b; c; ::: and "i .
Hoping that "i is "small", we delete "i and we approximate Yi by Ybi :
1X
n
mean error = e = ei
n i=1
or
X
n
AD = absolute deviation = jei j ,
i=1
or
X
n
SSE = sum or squared errors = e2i .
i=1
8
1.5.5 Least squares method
A popular and attractive method in econometrics is the least squares
method (LSE). In this method we estimate the papameters by solving the
following mathematical problem:
min SSE.
a;b;c;:::
X Y
3 10
6 15
9 30
12 35
15 25
18 30
21 45
24 45
Model 1: Yb = 8 + 1; 6 X
Model 2: Yb = 8; 5 + 1; 5 X
9
Model 1 Model 2
e -0,225 0,625
AD 39,4 39
SSE 241,96 243
If we use AD, then model 2 performs better than model 1. If we use SSE,
then model 1 performs better than model 2.
10
2 The method of least squares
2.1 Introduction
Recall from the previous chapter that we are going to use the method of least
squares. To this end we need a model and data!
Model
In general we are going to use models of the form
Y = a + bX + cZ + dU + eV + ::: + ".
Data
To estimate the parameters, we need data about Y; X; Z; U; V; :::We sup-
pose that we have n datapoints:
* Y1 ; X1 ; Z1 ; U1 ; V2
* Y2 ; X2 ; Z2 ; U2 ; V2
...
* Yn ; Xn ; Zn ; Un ; Vn .
By de…nition, we have
We assume that the parameters are independent of the index i but that the
error term may be di¤erent for di¤erent values of the index.
Method
We delete "i and …nd the following approximation:
11
The least squares method (LSE): we estimate the papameters by solv-
ing the following mathematical problem:
min SSE.
a;b;c;:::
12
Simplifying, we …nd that
X X
SSE = (Yi Y )2 + b2 (Xi X)2 + n(Y a bX)2
X
2b (Yi Y )(Xi X)
X V (Y )
V (Y ) = (Yi Y )2 and s2 (Y ) =
n 1
X V (X)
V (X) = (Xi X)2 and s2 (X) =
n 1
X V (X; Y )
V (X; Y ) = (Yi Y )(Xi X) and Cov(X; Y ) = .
n 1
We call V (Y ) the variation of Y and V (X; Y ) the covariation of X and
Y . It is clear that this is highly related to covariance and correlation:
1 X
Cov(X; Y ) = (Yi Y )(Xi X),
n 1
Cov(X; Y ) V (X; Y )
r(X; Y ) = =p .
s(X)s(Y ) V (X)V (Y )
Note that the last term in this expression is always zero or positive for
all values of a; b.
To omit any contribution of this term, we impose the condition that this
term is zero:
Y a bX = 0
or equivalently
Y = a + bX.
We can simplify SSE and …nd
13
This is a quadratic relation in b and from mathematics we know that
SSE is a convex parabola.
(See e.g. at the website: http://en.wikipedia.org/wiki/Parabola)
This parabola reaches a minimum in the value
V (X; Y )
b= ,
V (X)
and the value at this mimimum is given by
V 2 (X; Y )
SSE = V (Y ) .
V (X)
As a conclusion, we have solved the mathematical problem. The optimal
a and bb. We …nd
values of a and b will be denoted by b
bb = V (X; Y ) = Cov(X; Y ) ,
V (X) s2 (X)
a = Y bbX,
b
Yb = ba + bbX.
ei = Yi Ybi
= Yi a bbXi .
b
e=Y b
a bbX = Y b
a bbX = 0.
14
For the variation of the errors V (e), we …nd
X X
V (e) = (ei e)2 = e2i = SSE.
Recall that
V 2 (X; Y )
V (e) = SSE = V (Y ) .
V (X)
V (Yb ) = V (b a + bbX)
= bb2 V (X)
V 2 (X; Y )
= .
V (X)
V (e) = V (Y ) V (Yb ),
or
V (Y ) = V (Yb ) + V (e).
For this simple model the variation of Y can divided into two parts:
the total variation is the sum of the variation explained by the model
(V (Yb )) and the variation that can not be explained by the model
(V (e)).
15
X Y
3 10
6 15
9 30
12 35
15 25
18 30
21 45
24 45
and we consider the following model: Y = a + bX + ".
In this example we …nd:
X = 13; 5 V (X) = 378 s2 (X) = 378=8
Y = 29; 375 V (Y ) t 1121; 9 s2 (Y ) t 1121; 9=8
V (X; Y ) = 577; 5 Cov(; Y ) = 577; 5=8
The least squares estimators are given by
bb = Cov(X; Y ) = 1; 5278
s2 (X)
a = Y bbX = 8; 75
b
and the regression line of Y on X is given by
Yb = 8; 75 + 1; 5278X.
For the model we …nd the following errors and estimates (we rounded the
numbers)
X Y Yb e e2
3 10 13,3334 -3,3334 11,11
6 15 17,9168 -2,9168 8,51
9 30 22,5002 7,4998 56,25
12 35 27,0836 7,9164 62,67
15 25 31,667 -6,667 44,45
18 30 36,2504 -6,2504 39,07
21 45 40,8338 4,1662 17,36
24 45 45,4172 -0,4172 0,17
One can verify that e = 0 and that V (Yb ) t 882; 3, V (e) t 239; 6.
Note that V (Y ) t 1121; 9 = 882; 3 + 239; 6.
16
2.2.4 The quality of the model
From the mathematical point of view, if s2 (X) 6= 0, we can always calculate
the regression of Y on X. In this section we brie‡y discuss how to measure
the quality of the model. We want to measure how "good" the model …ts
the data.
V (Y ) = V (Yb ) + V (e).
The third indicator is the ratio of what we can explain divived by what
we have to explain:
V (Yb )
R2 = .
V (Y )
It is not a mistake to use the same notation R2 : one can provethe following
property
Property
For linear models with a constant term, we have
V (Yb )
R2 = = r2 (Y; Yb ).
V (Y )
17
2.3 Example 2: The model Y = a + bX + cZ + "
2.3.1 The least squares method
In this model we have only 2 explanatory variables (X and Z) and 3 para-
meters (a; b; c). Now we have
Model: Y = a + bX + cZ + ";
Data: Y1 ; X1 ; Z1 ; Y2 ; X2 ; Z2 ; ::::; Yn ; Xn ; Zn and Yi = a + bXi + cZi + "i ;
Approximation: Ybi = a + bXi + cZi ;
Approximation error:Pei = YiP Ybi = Yi a bXi cZi ;
Global error: SSE = e2i = (Yi a bXi cZi )2 ;
LSE: we have to solve the problem
X
min SSE = min (Yi a bXi cZi )2 .
a;b;c a;b;c
Solution
From Example 1 recall that the optimal values of a and b were given by
In the new 3 parameter model one can show that the optimal values of
a; b; c are the solutions (if they exist) of the following system of equations:
5 = b6 + c10
7 = b12 + c20
18
It is clear that the second equation can be simpli…ed and we …nd
5 = b6 + c10
3; 5 = b6 + c10
6 10
12 20
and we see that the second row is a multiple of the …rst row!
Example 2
Let us consider the system
5 = b6 + c10
10 = b12 + c20
5 = b6 + c10
5 = b6 + c10
6 10
12 20
and we see that the second row is a multiple of the …rst row!
Example 3
Let us consider the system
5 = b6 + c10
10 = b + c
In this case the second equation gives b = 10 c and as a result, for equation
1 we …nd that
5 = (10 c)6 + c10
19
or 55 = 4c, or c = 55=4 and then b = 10 c.
Note that if we look at the coe¢ cients of b and c in the system, we have
6 10
1 1
and we see that the second row is a multiple of the …rst row!
u s2 (X) = Cov(X; Z)
u Cov(X; Z) = s2 (Z)
20
De…nition
In the model Y = a + bX + cZ + ", we have MC (multicolinearity) if
X and Z are linearly related, i.e. if r2 (X; Z) = 1.
When the variables X and Z are not linearly related, but almost linearly
related, we say that we have a problem of quasi-multicolinariry (QMC).
This happens when r2 (X; Z) is "close" to 1.
In econometrics, we want to avoid QMC!
Y X Z
4 1 1
1 2 0
6 3 1
2 4 0
11 5 1
5 6 0
11 7 1
7 8 0
15 9 1
9 10 0
21
the system of equations. We …nd
b
a = 2; 4; bb = 1; 2 and b
c = 5; 8;
b
Y = 2; 4 + 1; 2X + 5; 8D.
22
3 Selection of variables
3.1 Introduction
When studying a variableY , usually we aregoing to start with many explana-
tory variables. In this section we show how to select the variables in a suitable
way. We are going to study the so-called "forward selection".
The basic ideas are the following:
3.2 Selection
We are going to explain the steps by an example.
The data and the di¤erent parts of the calculations are available
from the website: www.edwardomey.com (teaching - econmetrics).
The problem is the following. We want to …nd a model for the price Y of
cars. To this end we collected information about cars and the collected data.
The variables that we intend to use are the following:
Y: the price of a car
X(1): Power (pk)
X(2): Length (mm)
X(3): Weight (kg)
X(4): Fuel amount (l)
X(5): size backspace (l)
X(6): # doors
X(7): Gasoil? (yes = 1)
X(8): Computer? (yes=1)
23
3.2.1 Step 1: correlation coe¢ cients
As a starting point, we calculate all correlations between Y and all variables.
In our example we …nd the following table:
Y X(1) X(2) X(3) X(4) X(5) X(6) X(7) X(8)
Y 1
X(1) 0,80 1
X(2) 0,68 0,58 1
X(3) 0,86 0,62 0,76 1
X(4) 0,62 0,42 0,51 0,80 1
X(5) 0,60 0,50 0,81 0,69 0,45 1
X(6) 0,24 0,25 0,70 0,23 0,13 0,58 1
X(7) 0,21 -0,16 0,14 0,39 0,33 0,17 -0,06 1
X(8) 0,60 0,54 0,49 0,52 0,31 0,45 0,29 0,06 1
Sign of the correlation coe¢ cients From the theoretical point of view,
we expect that X(1) and Y have a positive correlation. In the table, we see
that the data con…rm our theoretical expectiations. We can check all the
sign to see whether or not they con…rm the theoretical expectations.
If we notice that a sign is wrong, it is possible that our theoretical motiva-
tion is wrong. It is also possible that the correlation coe¢ cient has the wong
sign, but that it si statistically not signi…cant. For the t test, see below.
Finally it is also possible that we have a problem with outliers.
Sort the variables w.r.t. Y In the table we can see that X(3) has the
highest correlation with Y . If we select variables, X(3) will be our natural
…rst choice.
Sorting the correlations (in absolute value) w.r.t. Y we …nd the following
table:
24
Variable X r(Y; X)
X(3) 0; 86
X(1) 0; 80
X(2) 0; 68
X(4) 0; 62
X(5) 0; 60
X(8) 0; 60
X(6) 0; 24
X(7) 0; 21
The table shows us the order in which variables are going to enter the
model.
Small correlations Before studying the problem we hope that all variables
will be important in the model. Sometimes some correlation coe¢ cients are
very small and maybe the variable is not as important as we thought.
When we see small correlation coe¢ cients, several cases can occur
* the correlation measures a linear relationship. Maybe the relationship
in our case is not linear but some other nonlinear relationship. To check this,
we make an X Y -scatter and decide to transform the variable(s) or not.
* it is possible indeed that the value of the variable is small and perhaps
we can delete the variable from the model.
H0 : = 0 vs Ha : 6= 0
Using the sample correlation coe¢ cient r we calculate the t statistic:
r
n 2
t(r) = r
1 r2
and under suitable conditions, we have t(r) s tn 2 , the Student t distribution
with parameter n 2. Using prob-values we can decide to reject H0 or not.
In our example we perform the t test for r(X(6); Y ) and r(X(7); Y ). We
…nd n = 106 and
r(X(6); Y ) = 0; 24; t(r) = 2; 53; Prob-value (two-sided): 0; 012
r(X(7); Y ) = 0; 20; t(r) = 2; 24; Prob-value (two-sided): 0; 027
If we choose = 5%, then we can reject H0 in both cases.
25
3.2.2 Choice of the …rst variable
It is clear that the …rst variable in the model will be X(3) because X(3) has
the highest correlation w.r.t. Y . Now we construct a …rst model:
Note that the coe¢ cient of X(3) is positive. This corresponds to the
theoretical expextations and with the positive correlation coe¢ cient that we
found earlier.
To see if this model 1 is statistically signi…cant, we perform an F test.
We have the following
R2 (p 1)
F (R2 ) = F =
(1 R2 )=(n p)
Here we use n = the sample size, and p = the number of parameters in the
model.
If R2 is small (resp. not small), we …nd an F value that is small (resp.not
small). In order to decide whether or not the calculated F value is su¢ -
ciently large, we calculate its prob-value by using a Fisher F distribution
F (p 1; n p)
For our example, we have
R2 = 0; 73
F = 283; 6
n = 106 and p = 2
Prob-value is 1; 76 10 31
We conclude that our model 1 is a statistically relevant model.
26
3.2.3 Choice of a second variable
Taking into account QMC
The next candidate is X(2) and now we …nd r(X(2); X(3)) = 0; 76 and
again QMC
For the same reason X(5) has to be kicked out of the model.
For X(8) we …nd that r(X(8); X(3)) = 0; 52 and this value is acceptable
from the QMC-point of view.
Note that the coe¢ cients of X(3) and X(8) are positive. This corresponds
to the theoretical expextations and with the positive correlation coe¢ cients
that we found earlier.
To see if the model is relevant, we perform the F test as before. We …nd
R2 = 0; 76
F = 166; 6
n = 106 and p = 3
Prob-value is 5; 17 10 33
We conclude that our model 2 is a statistically relevant model.
27
Marginal contribution of X(8) Before we decide that we are going to
keep X(8) as a second variable, we have to check whether or not the contri-
bution of X(8) to the model is statistically signi…cant.
We de…ne the M C(X(8)) = the marginal contribution of X(8) as the
change in the value of R2 .
Model 1: R2 = 0; 73
Model 2: R2 = 0; 764
MC(X(8)) = 0; 764 0; 73 = 0; 034.
28
It turns out that we can explain 9; 4% of the variation in X(6) by X(3); X(8).
This small number indicates that there is no problem with QMC.
29
We calculate the prob-value by using an F (1; n pmod el3 ) distribution
In our example we …nd n = 106 and p = 4 so that
F =0
Prob-value = 100%
Since the prob-value is large, the marginal contribution of X(6) is statis-
tically irrelevant!
Note that the coe¢ cient of X(7) is negative. From the correlation table
we expected a positive contribution.
To see if the model is relevant, we perform the F test as before. We …nd
R2 = 0; 774
30
F = 116
n = 106 and p = 4
Prob-value is 8; 55 10 33
We conclude that our new model 3 is a statistically relevant model.
M C(X(7))
F = 2
(1 Rmod el3 )=(n pmod el3 )
31
4 The basic assumptions
4.1 Introduction
Up to now, we have devoted attention to the technique of selecting variables
and estimating parameters in linear models. As usual in statistics, we want
to obtain con…dence statements about the parameters. To this end we have
to formulate some basic assummptions.
Recall that we consider models of the form
Y = a + bX + cZ + ".
The basic assumptions are assumptions about "i and about QMC.
2
4.2.2 BA2: V ar("i ) = ; 8i
This assumptions states that the variance of the model-error term is a con-
stant: it is independent of Y; X; Z and independent of the index i. If the
assumption holds we have homogeneity of the variance and we call the model
a homoscedastic model. If the assumption doesn’t hold, we have a problem
of heteroscedasticity.
32
2
4.2.4 BA4: "i s N (0; ); 8i
The normality assumption allows us to obtain con…dence statements for the
parameters. Also, we are allowed to perform the F tests (cf. selection of
variables) if this basic assumption holds.
bb = V (X; Y ) ,
V (X)
a = Y bbX.
b
The parameters of the model are a; b and 2 . The estimates for a and b
a and bb. We have the following important result.
are b
where
2 X2 2
b
a = V ar(b
a) = ,
ns2 (X)
1
2
b
b
= V ar(bb) = 2 2 ,
ns (X)
X
a; bb) = 2 2
Cov(b .
ns (X)
33
I would like to stress that we are making all calculations in EXCEL. These
formulas are important to obtain some information about the quality of the
estimators.
We see that the variance of bb depends on 3 elements:
dependence on 2 : if 2 = V ar(") is larger, then V ar(bb) is larger. This
means that if we allow larger ‡uctuations in the error term, there will
be larger ‡uctuations in the parameter estimates.
dependence on n: if n increases, then V ar(bb) dexreases. This means
that we well have better results if the sample size is bigger.
dependence on s2 (X): if s2 (X) increases, then V ar(bb) decreases. This
means that if we are far away from MC and QMC, then the estimates
are better.
The previous result can be used to obtain con…dence intervals for a and
for b. We …nd the following 95% c.i.:
a = ba z2;5% a,
b
b = bb z2;5% bb .
Although these formulas are correct, the are without use! In order to use
the formulas, we need b2a and to …nd this,we need 2 !
2
Theorem 2 Suppose that all basic assumptions hold. Then we have that
can be estimated by s2e , where
SSE
s2e = .
n p
2 2
Moreover, b
a and b
b
can be estimated by sb2a and sb2b , where
X2 1
sb2a = s2e
2
, sb2b = s2e 2 .
ns (X) ns (X)
As a compensation, in the con…dence statements we have to replace the
normal distribution by a t distribution. We …nd the following 95% c.i.:
a = ba tn a,
p;2;5% sb
b = bb tn b.
p;2;5% sb
34
4.4 Example
We have a look at Model 3B of the previous section. The model was the
following:
model : Y = a + bX(3) + cX(8) + dX(7) + ".
Regression Statistics
Multiple R 0,879
R square 0,774
Adjusted R square 0,767
Standard Error 4356,7
Observations 106
ANOVA
df SS MS F Signi…cance F
Regression 3 6,6E09 2,21E09 116,32 8,55E-33
Residual 102 1,9E09 1,9E07
Total 105 8,6E09
Part 1
In part 1 we get the regression statistics. Important for us is the R2 value.
In our case it is R2 = 77; 4%.
The standard error of the model is given by se = 4356; 7. It means that
with the model we make errors that have ‡uctuations around 0 and the size
of the ‡uctuations is around se = 4356; 7.
It is wize to compare the size of the errors with the size of Y . The mean
price of the cars in our example is given by Y = 32473; 6. The relative error
in our model is given by
se 4356; 7
= t 0; 13.
Y 32473; 6
35
With the model we make relative errors around 13%. As a rule of the thumb,
we are glad if the relative error is less than 10%.
Part 2
Part 2 is devoted to the analysis of the variance
In our notations, we have
(regression) SSR = 6623984149
(residuals) SSE =1936113261
(total) SST = 1936113261
This is s2e = 18981502; 56. Calculating the square root gives se = 4356; 7
which we got in part 1.
The F value is the F statistic that we use to see if R2 is su¢ ciently
large. The prob-value of the F value is given by "F-signi…cance".
Part 3
Part 3 gives the detailed statistical analysis of the parameter estimates.
We consider b, the coe¢ cient of X(3).
From the excel output, we see that
bb = 22; 68
sbb = 1; 723
b = bb tn p;2;5% sb
b
= 22; 68 1; 98 1; 723
= [19; 24 26; 11]
36
and let us use = 5%.
The …rst method to choose between H0 and Ha is based on con…dence
intervals. Since the 95% c.i. is given by [19; 24; 26; 11],we conclude that we
reject H0 .
A second method is based on calculating prob-values. The t value of the
sample result is given by
bb b0 bb 22; 68
t value = = = t 13; 11.
sbb sbb 1; 723
37
5 Checking the basic assumptions
5.1 Introduction
In view of the previous section, the basic assumptions are crucial for all
statistical properties of the estimators and the models in econometrics. In
the section we discuss how the check whether or not the basic assumptions
hold. If the basic assumptions do not hold, we have a problem with the
statistical properties and this may contaminate any conclusions we make.
38
BA 1
12000
8000
4000
0
e
10000 15000 20000 25000 30000 35000 40000 45000 50000 55000
-4000
-8000
-12000
Y
39
BA 2
140000000
120000000
100000000
80000000
e²
60000000
40000000
20000000
0
10000 20000 30000 40000 50000 60000
Y
In our example, we …nd the following graphs (Y; e2 ) and (X(3); e2 ). Graphs
of the dummies are not useful.
The graphs show a more or less horizontal box. There is possibly one
outlier that we missed earlier.
40
BA2
140000000
120000000
100000000
80000000
e²
60000000
40000000
20000000
0
1000 1500 2000 2500
X(3)
41
we …nd:
number of parameters: 4
R2 = 0; 629
se (II) = 3641; 08
Observations: 53
Bartlett’s test allows us to choose between the following set of hypothesis:
2 2 2 2
H0 : (I) = (II) vs Ha : (I) 6= (II).
s2e (I)
=
s2e (II)
42
histogram
0,2
0,18
0,16
0,14
0,12
0,1
0,08
0,06
0,04
0,02
0
-8500 -6500 -4500 -2500 -500 1500 3500 5500 7500 9500 11500
T DF (ei ) = P (X ei ).
43
The EDF is the empirical distribution of errors, this is, for each of the
residuals, we calculate
1
EDF (ei ) = #(errors ei ).
n
If BA4 holds, then we expect T DF t EDF . If,on the other hand, there
is a major di¤erence between T DF and EDF , we don”t believe that BA4
holds. As a test-statistic, Kolmogorov and Smirnov use the largest di¤erence
between the EDF and the T DF :
KS = max jEDF T DF j
Clearly the two distribution functions are rather close to each other. For
the KS-statistic we …nd
For KS, we don’t calculate the prob-value, but for small samples, we use
tables with critical values.
Such tables can be downloaded from
www.york.ac.uk/depts/maths/tables/pdf.htm
44
EFD and TDF
1
0,9
0,8
0,7
0,6
0,5
0,4
0,3
0,2
0,1
0
-12000 -7000 -2000 3000 8000 13000
e
45
or from
www.edwardomey.com
For large samples, we use the critical values given by:
r
ln( )
KS( ) = .
2n
p
In our case we …nd KS(5%) = 1; 22= 106 = 0; 118.
Since the calculated value (0; 054) is less than the critical value, we don’t
reject BA4.
46
6 Making predictions
After constructing a model, it is interesting to …nd information about the
quality of the predictions made by the model. To this end we have to use
NEW. For our example, we obtained 10 new data lines:
For the …rst data line, the real price is given by Y (1) = 22990. On the
other hand, we have X(3) = 1530, X(8) = X(7) = 0. Using the formula
from Model 3B, we have the followin prediction from our model:
We can make similar calculations for the other data entries, and we …nd
the following table:
47
Y P
22990 30089,06
29215 23035,58
35980 35591,25
23800 23058,26
17699 22151,06
40750 38653,05
31500 38528,09
31500 34570,65
24995 26233,46
36450 40220,04
At …rst view, some of the predictions look good and other prediction look
bad. We are going to evaluate the quality of the predictions by using several
methods.
6.2 Scatter
To see if (Y; P ) are close to the …rst diagonal, we make an XY-scatter plot.
In our example, we …nd that
From the graph we see that the points are spread around the …rst diagonal.
48
45000
40000
35000
30000
P
25000
20000
15000
15000 20000 25000 30000 35000 40000 45000
Y
49
1 X
M AD = jYi Pi j ,
K
1 X Yi P i
M ARD = .
K Yi
In the example, we …nd the following numbers:
We have
Y = 29487; 9
P = 31213; 05
M AD = 3606; 5
M ARD = 0; 134.
Our data ‡uctuate around the central value Y = 29487; 9 and we have
M AD = 3606; 5. Our predictions are predictions with an absolute error of
around 3606. Related to Y this is an error of around 12%.
Looking at the relative deviations, we …nd a relative error of around
13; 4%.
50
These measure are used when we want to compare the quality of predic-
tions of several models.
6.5 More
More measures can be found on the following website:
http://en.wikipedia.org/wiki/Forecasting#Forecasting_accuracy
51
7 Some references
7.1 Internet
1. http://en.wikipedia.org/wiki/Econometrics
2. Econometric Theory on Wikibooks:
http://en.wikibooks.org/wiki/Econometric_Theory
3. B.E. Hansen, Econometrics:
http://www.ssc.wisc.edu/~bhansen/econometrics/
4. Econometrics Resources on internet:
http://www.oswego.edu/~kane/econometrics/
5. Empirics and Econometrics:
http://homepage.newschool.edu/het//schools/metric.htm
6. Links to Online Texts and Notes in Econometrics:
http://www.economicsnetwork.ac.uk/teaching/text/econometrics.htm/
7. Startpagina econometrie:
http://econometrie.startpagina.nl/
7.2 Books
1. A.P.Barten,Econometrische lessen Schoonhoven: Academic Service, Economie
en Bedrifjskunde, 1989
2. W.S. Brown, Introducing econometrics. West Publishing Company,
1991.
3. P. Kennedy, A quide to econometrics, 3rd edition, MIT Press, Cam-
bridge, Mass. 1992.
4. D.N.Gujarati, Essentials of Econometrics. Mc Graw Hill International
Edition, New York, 2006
5. D.N.Gujarati, Basic Econometrics, 4th editions, Mc Graw Hill Inter-
national Edition, New York, 2003.
52
6. G.S. MADDALA, Econometrics, McGraw-Hill Ltd., New York, 1977.
10. R.J. Wonnacott and T.H. Wonnacott, Econometrics, 2nd edition, Wi-
ley, New York, 1979.
53