TSNotes 1
TSNotes 1
Introduction
The regression analysis is one of the most important and widely used
statistical techniques in business and economic analysis for examining
the functional relationships between two or more variables. One
variable is specified to be the dependent/response variable (DV), denoted
by Y, and the other one or more variables are called the
independent/predictor/explanatory variables (IV), denoted by Xi, i=1,2, …
k.
There are two different situations:
(a) Y is a random variable and Xi are fixed, no-random
variable, e.g. to predict the sales for a company, the Year is
the fixed Xi variable.
(b) Both Xi and Y are random variables, e.g. all survey data are of
this type, in this situation, cases are selected randomly from the
population, and both Xi and Y are measured.
2
Main Purposes
The simple regression analysis means that the value of the dependent
variable Y is estimated on the basis of only one independent variable.
Y = f(X) + u .
On the other hand, multiple regression is concerned with estimating the
value of the dependent variable Y on the basis of two or more
independent variables.
Y = f(X1 , X2 ... Xk) + u , where k 2 .
4
Linear Regression Model
6
The Least Squares Method
8
The Least Squares Method (Cont.)
(1)Gauss-Markov Theorem
Under the conditions of the regression model, the least squares
estimators b0 and b1 are unbiased estimators
(i.e., E(b0) = 0 and E(b1) = 1) and have minimum variance among
all unbiased linear estimators.
(2) The estimated value of Y (i.e. = b0 + b1X) is an unbiased
estimator of E(Y) = 0 + 1 X, with minimum variance in the class of
unbiased linear estimators.
Note that the common variance 2 can not be estimated by LSM. We can
prove that the following statistic is an unbiased point estimator of 2
s2 = SSE/(n-k-1) = (SSyy- b1SSxy)/(n-k-1)
where k is the number of independent variables in the model.
10
Normal Error Regression Model
No matter what may be the form of the distribution of the error terms i
(and hence of the Yi), the LSM provides unbiased point estimators of 0
and 1 that have minimum variance among all unbiased linear
estimators.
To set up interval estimates and make tests, however, we need to make
an assumption about the form of the distribution of the i . The standard
assumption is that the error terms i are normally distributed, and we
will adopt it here.
Since now the functional form of the probability distribution of the error
terms is specified, we can use the maximum likelihood method to obtain
estimators of the parameters 0, 1 and 2. In fact, MLE and LSE for 0
and 1 are the same.
A normal error term greatly simplifies the theory of regression analysis.
11
12
Inferences Concerning 1
Inferences Concerning 0
14
Inferences Concerning E(Y)
(1) The sampling distribution of i is normal for the normal error model.
(2) i is an unbiased estimator of E(Yi).
Because E(Yi) = 0 + 1Xi and
E( i) = E(b0 + b1 Xi) = 0 + 1Xi = E(Yi).
Note that the confidence limits for E(Yi) are not sensitive to moderate
departures from the assumption that the error terms are normally
distributed. Indeed, the limits are not sensitive to substantial departures
from normality if the sample size is large.
15
Some Considerations
16
Prediction of New Observation
17
Prediction Interval
Prediction Prediction
limits limits
if E(Yi) here if E(Yi) here
18
Prediction Interval (cont.)
19
20
Types of Data
• The data may be quantitative (e.g. exchange rates, stock prices, number of
shares outstanding), or qualitative (e.g. day of the week).
21
• In all of the above cases, it is clearly the time dimension which is the most
important, and the analysis will be conducted using the values of the
variables over time.
22
Cross-sectional Data
• Cross-sectional data
Cross-sectional data are data on one or more variables collected at a single
point in time, e.g.
- A poll of usage of internet stock broking services
- Cross-section of stock returns on the New York Stock Exchange
- A sample of bond credit ratings for UK banks
23
Panel Data
• Panel data
Panel Data has the dimensions of both time series and cross-sections, e.g. the
daily prices of a number of blue chip stocks over two years. The estimation of
panel regressions is an interesting and developing area, and will not be discussed
in this course.
• Notation
It is common to denote each observation by the letter t and the total number of
observations by T for time series data, and to denote each observation by the
letter i and the total number of observations by N for cross-sectional data.
• Quality of Data
The researchers should always keep in mind that the results of research are only
as good as the quality of the data.
24
Steps involved in formulating an econometric model
25
26
Violation of the Assumptions of the CLRM
1. Var(ut) = 2 <
2. Cov (ui, uj) = 0 for i ≠ j
3. ut N(0,2)
27
• We will now study these assumptions further, and in particular look at:
- How we test for violations
- Causes
- Consequences
in general we could encounter any combination of 3 problems:
- the coefficient estimates are wrong
- the associated standard errors are wrong
- the distribution that we assumed for the
test statistics will be inappropriate
- Solutions
- the assumptions are no longer violated
- we work around the problem so that we
use alternative techniques which are still valid
28
Assumption: Var(ut) = 2 <
• We have so far assumed that the variance of the errors is constant, 2 - this
is known as homoscedasticity. If the errors do not have a constant variance,
we say that they are heteroscedastic e.g. say we estimate a regression and
calculate the residuals, .
29
• Graphical methods
1. Split the total sample of length T into two sub-samples of length T1 and T2.
The regression model is estimated on each sub-sample and the two
residual variances are calculated.
2. The null hypothesis is that the variances of the disturbances are equal,
H0:
30
The GQ Test (Cont’d)
4. The test statistic, denoted GQ, is simply the ratio of the two residual
variances where the larger of the two variances must be placed in the
numerator.
A problem with the test is that the choice of where to split the sample is
that usually arbitrary and may crucially affect the outcome of the test.
31
32
Performing White’s Test for Heteroscedasticity
33
• OLS estimation still gives unbiased coefficient estimates, but they are
no longer BLUE.
• Whether the standard errors calculated using the usual formulae are too
big or too small will depend upon the form of the heteroscedasticity.
34
How Do we Deal with Heteroscedasticity?
• If the form (i.e. the cause) of the heteroscedasticity is known, then we can use
an estimation method which takes this into account (called generalised least
squares, GLS). GLS is also known as weighted least squares (WLS).
35
36
Assumption: Cov(ui, uj) = 0 for i ≠ j
• If the errors are not uncorrelated with one another, it would be stated that
they are “autocorrelated” or that they are “serially correlated”. A test of this
assumption is therefore required.
• Before we proceed to see how formal tests for autocorrelation are formulated,
the concept of the lagged value of a variable needs to be defined.
• The lagged value of a variable (which may be yt, xt or ut) is simply the value
that the variable took during a previous period, e.g. the value of yt lagged one
period, written yt-1, can be constructed by shifting all of the observations
forward one period in a spreadsheet, as illustrated in the table below:
37
t yt yt-1 yt
1989M09 0.8 - -
1989M10 1.3 0.8 1.3-0.8=0.5
1989M11 -0.9 1.3 -0.9-1.3=-2.2
1989M12 0.2 -0.9 0.2--0.9=1.1
1990M01 -1.7 0.2 -1.7-0.2=-1.9
1990M02 2.3 -1.7 2.3--1.7=4.0
1990M03 0.1 2.3 0.1-2.3=-2.2
1990M04 0.0 0.1 0.0-0.1=-0.1
. . . .
. . . .
. . . .
38
Autocorrelation
• We assumed of the CLRM’s errors that Cov (ui , uj) = 0 for ij.
This is essentially the same as saying there is no pattern in the errors.
• If there are patterns in the residuals from a model, we say that they are
autocorrelated.
39
Positive Autocorrelation
40
Negative Autocorrelation
41
42
Detecting Autocorrelation:
The Durbin-Watson Test
43
44
The Durbin-Watson Test: Interpreting the Results
45
46
Consequences of Ignoring Autocorrelation
if it is Present
• The coefficient estimates derived using OLS are still unbiased, but they
are inefficient, i.e. they are not BLUE, even in large sample sizes.
• Thus, if the standard error estimates are inappropriate, there exists the
possibility that we could make the wrong inferences.
47
• Example – CAPM
– Y = excess return on shares in Company A (percentage)
– X1 = excess return on a stock index (percentage)
– X2 = the sales of Company A (thousands of dollars)
– X3 = the debt of Company A (thousands of dollars)
48
Example - CAPM
Dependent Variable: Y
Method: Least Squares
Date: 15/08/10 Time: 18:03
Sample: 1 120
Included observations: 120
49
Example – Sale
50
Example – Sale (cont.)
Dependent Variable: SALE
Method: Least Squares
Date: 15/08/10 Time: 17:52
Sample: 1 35
Included observations: 35
51
• Denote the first difference of yt, i.e. yt - yt-1 as yt; similarly for the x-
variables, x2t = x2t - x2t-1 etc.
52
Testing the Normality Assumption
53
54
Leptokurtic versus Normal Distribution
55
• Bera and Jarque formalise this by testing the residuals for normality by
testing whether the coefficient of skewness and the coefficient of excess
kurtosis are jointly zero.
56
Testing for Normality - Camp.xls
57
58