further regression topics ii

Upload: thrphys1940

Post on 02-Jun-2018

221 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/11/2019 Further Regression Topics II

    1/32

    1/32

    EC114 Introduction to Quantitative Economics20. Further Regression Topics II

    Marcus Chambers

    Department of EconomicsUniversity of Essex

    20/22 March 2012

    EC114 Introduction to Quantitative Economics 20. Further Regression Topics II

    http://find/
  • 8/11/2019 Further Regression Topics II

    2/32

    2/32

    Outline

    1 Introduction

    2 Heteroskedasticity

    3 Autocorrelation

    4 Dynamic Models

    Reference : R. L. Thomas, Using Statistics in Economics ,McGraw-Hill, 2005, sections 15.3, 15.4 and 16.1.

    EC114 Introduction to Quantitative Economics 20. Further Regression Topics II

    http://find/
  • 8/11/2019 Further Regression Topics II

    3/32

    Introduction 3/32

    Many applications in Econometrics are based around themultiple linear regression model

    Y = 1 + 2 X 2 + . . . + k X k + ,

    which can be used to test hypotheses arising in economicmodels using observed data.A popular method of estimating the unknown parameters 1 , . . . , k is Ordinary Least Squares (OLS), resulting in theestimators b1 , . . . , bk .Under the Classical assumptions on the regressors( X 2 , . . . , X k ) and the disturbance ( ) it follows that the OLSestimators are unbiased and have minimum variance;these are desirable properties for an estimator to possess.

    EC114 Introduction to Quantitative Economics 20. Further Regression Topics II

    http://find/http://goback/
  • 8/11/2019 Further Regression Topics II

    4/32

  • 8/11/2019 Further Regression Topics II

    5/32

  • 8/11/2019 Further Regression Topics II

    6/32

    k d

  • 8/11/2019 Further Regression Topics II

    7/32

    Heteroskedasticity 7/32

    What are the consequences for OLS estimation of

    heteroskedasticity?Assuming the other assumptions (apart from IIB) hold, wend that:

    1. the OLS estimators remain unbiased; but

    2. the OLS estimators are no longer BLUE; and3. the usual formulae for estimating the standard errorsof the OLS estimators are incorrect.

    The fact that OLS is no longer a best linear unbiasedestimator means that we can nd other linear unbiasedestimators with smaller variance and which are thereforepreferred to OLS.

    EC114 Introduction to Quantitative Economics 20. Further Regression Topics II

    H k d i i 8/32

    http://find/
  • 8/11/2019 Further Regression Topics II

    8/32

    Heteroskedasticity 8/32

    A serious consequence of heteroskedasticity is that theformulae for the OLS standard errors are incorrect.

    This is because the formulae are derived assuming aconstant variance, 2 , which we estimate using s2 ; this isno longer correct if the variance isnt constant.This means that, for example, any t -statistics we construct

    will be using the wrong standard errors, and so we maydraw the wrong inferences from our hypothesis tests.For example, we may conclude that a variable X j is asignicant determinant of Y when in fact it isnt i.e. wereject H 0 : j = 0 when in fact the null is true!Conversely, we may conclude that a variable X j is not asignicant determinant of Y when in fact it is i.e. we do notreject H 0 : j = 0 when in fact the null is false!

    EC114 Introduction to Quantitative Economics 20. Further Regression Topics II

    Heteroskedasticity 9/32

    http://find/http://goback/
  • 8/11/2019 Further Regression Topics II

    9/32

    Heteroskedasticity 9/32

    It is often the case that the variance is associated with oneor more of the regressors.

    In the two-variable model, suppose that

    E (Y i) = 7 + 0 .8 X i.

    If X 3 = 10 then E (Y 3 ) = 7 + ( 0 .8 10 ) = 15 whereas if

    X 30 = 100 then E (Y 30 ) = 7 + ( 0 .8 100 ) = 87 .Now, suppose that the actual Y 3 varies (in repeatedsamples) in a band of width 10 around the value 15i.e. Y 3 = 15 5 .

    Is it likely that Y 30 will also uctuate in the same size bandi.e. is it likely that Y 30 = 87 5 ?Often, for larger values, the range of variation will also belarger e.g. Y 30 = 87 29 , as illustrated on the next slide:

    EC114 Introduction to Quantitative Economics 20. Further Regression Topics II

    Heteroskedasticity 10/32

    http://find/
  • 8/11/2019 Further Regression Topics II

    10/32

    Heteroskedasticity 10/32

    The range of variation of Y is greater the larger the value of X i.e. the variance increases with X .

    EC114 Introduction to Quantitative Economics 20. Further Regression Topics II

    Heteroskedasticity 11/32

    http://find/
  • 8/11/2019 Further Regression Topics II

    11/32

    Heteroskedasticity 11/32

    Given the potentially serious consequences ofheteroskedasticity, particularly for inferences, it is importantto be able to test whether it is present (or absent).Given that we dont observe we have to base any test onthe residuals e1 , . . . , en .

    If we suspect that the variance is associated with aparticular regressor, X , one thing we can do is plot thesquared residuals against X .Why squared residuals? Note that E ( 2i ) =

    2i and so e

    2i is

    taken as a measure of the variation in the residuals.An example is given in the following diagram:

    EC114 Introduction to Quantitative Economics 20. Further Regression Topics II

    http://find/
  • 8/11/2019 Further Regression Topics II

    12/32

    Heteroskedasticity 13/32

  • 8/11/2019 Further Regression Topics II

    13/32

    y

    A very general test is the Breusch-Pagan test , or BP test,which is an example of what is known as a Lagrangemultiplier test.The test that is used in Stata assumes that

    V ( i) = 1 + 2 Y 2i , i = 1 , . . . , n,

    where Y i denotes the tted value from the regression.The null and alternative hypotheses are:

    H 0 : 2 = 0 , H A : 2 = 0 .

    Note that, under H 0 , V ( i) = 1 (constant) while under H Athe variance depends on i through Y 2i .

    EC114 Introduction to Quantitative Economics 20. Further Regression Topics II

    Heteroskedasticity 14/32

    http://find/
  • 8/11/2019 Further Regression Topics II

    14/32

    y

    Although we shall not go into details of how the statistic iscomputed, we do need to know how to use it.

    In fact, the test statistic, TS , has a 21 distribution under H 0 .

    If c0 .05 denotes the (upper-tail) 5% critical value from the 21distribution, then the decision rule is:

    if TS > c0 .05 reject H 0 in favour of H A;

    if TS < c0 .05 do not reject H 0 i.e. reserve judgment.Lets return to the money demand example of 30 countriesin 1985, and estimate the equation

    M i = 1 + 2 G i + i, i = 1 , . . . , 30 ,

    where M denotes money stock and G denotes GDP.The Stata output for the regression and the BP test is asfollows:

    EC114 Introduction to Quantitative Economics 20. Further Regression Topics II

    Heteroskedasticity 15/32

    http://find/
  • 8/11/2019 Further Regression Topics II

    15/32

    . regress m g

    Source | SS df MS Number of obs = 30-------------+------------------------------ F( 1, 28) = 94.88

    Model | 20.3862321 1 20.3862321 Prob > F = 0.0000Residual | 6.01600434 28 .214857298 R-squared = 0.7721

    -------------+------------------------------ Adj R-squared = 0.7640Total | 26.4022364 29 .910421946 Root MSE = .46353

    ------------------------------------------------------------------------------m | Coef. Std. Err. t P>|t| [95% Conf. Interval]

    -------------+----------------------------------------------------------------g | .1748489 .0179502 9.74 0.000 .1380795 .2116182

    _cons | .0212579 .1157594 0.18 0.856 -.2158645 .2583803------------------------------------------------------------------------------

    . hettest

    Breusch-Pagan / Cook-Weisberg test for heteroskedasticityHo: Constant varianceVariables: fitted values of m

    chi2(1) = 14.10Prob > chi2 = 0.0002

    We nd that TS = 14 .10 > 3 .841 (the 5% critical value forthe 21 distribution) and so we reject H 0 i.e. there isevidence of heteroskedasticity.

    EC114 Introduction to Quantitative Economics 20. Further Regression Topics II

    http://find/http://goback/
  • 8/11/2019 Further Regression Topics II

    16/32

    Heteroskedasticity 17/32

  • 8/11/2019 Further Regression Topics II

    17/32

    . regress lm lg

    Source | SS df MS Number of obs = 30-------------+------------------------------ F( 1, 28) = 232.11

    Model | 57.4853608 1 57.4853608 Prob > F = 0.0000Residual | 6.93446511 28 .247659468 R-squared = 0.8924

    -------------+------------------------------ Adj R-squared = 0.8885Total | 64.4198259 29 2.22137331 Root MSE = .49765

    ------------------------------------------------------------------------------lm | Coef. Std. Err. t P>|t| [95% Conf. Interval]

    -------------+----------------------------------------------------------------lg | 1.04467 .068569 15.24 0.000 .9042126 1.185127

    _cons | -1.912253 .104309 -18.33 0.000 -2.12592 -1.698586------------------------------------------------------------------------------

    . hettest

    Breusch-Pagan / Cook-Weisberg test for heteroskedasticityHo: Constant varianceVariables: fitted values of lm

    chi2(1) = 0.19

    Prob > chi2 = 0.6603

    Here we nd that TS = 0 .19 < 3 .841 and so we do not reject H 0 i.e. there is no signicant evidence of heteroskedasticity.

    EC114 Introduction to Quantitative Economics 20. Further Regression Topics II

    Heteroskedasticity 18/32

    http://find/
  • 8/11/2019 Further Regression Topics II

    18/32

    The output also tells us that there is 66.03% of the

    distribution to the right of 0.19, so this statistic is highlyinsignicant.This example indicates that the regression in levels may bemisspecied in that there is evidence of a non-constantvariance in the residuals.Specifying the relationship between the variables in thelogarithmic form appears to result in a better speciedequation (at least, one in which we are unable to reject thenull hypothesis of homoskedasticity).

    We shall now examine another situation in which one ofthe Classical assumptions is violated. . .

    EC114 Introduction to Quantitative Economics 20. Further Regression Topics II

    Autocorrelation 19/32

    http://find/http://goback/
  • 8/11/2019 Further Regression Topics II

    19/32

    Autocorrelation (or serial correlation ) occurs when there iscorrelation between the disturbances at different points inthe sample.Recall that Assumption IIC requires

    Cov ( i, j) = 0 for i = j.

    However, if it is the case thatCov ( i, j) = 0 for at least one pair i, j,

    then the disturbances are said to be autocorrelated .

    Such a situation is common in time series in which effectsfrom one period persist into the next.If the disturbance this period, t , is affected by thedisturbance last period, t 1 , then Cov( t , t 1 ) = 0 .

    EC114 Introduction to Quantitative Economics 20. Further Regression Topics II

    Autocorrelation 20/32

    http://find/http://goback/
  • 8/11/2019 Further Regression Topics II

    20/32

    What are the consequences for OLS estimation of

    autocorrelation?Assuming the other assumptions (apart from IIC) hold, wend that:

    1. the OLS estimators remain unbiased; but2. the OLS estimators are no longer BLUE; and3. the usual formulae for estimating the standard errors

    of the OLS estimators are incorrect.The fact that OLS is no longer a best linear unbiasedestimator means that we can nd other linear unbiased

    estimators with smaller variance and which are thereforepreferred to OLS.

    EC114 Introduction to Quantitative Economics 20. Further Regression Topics II

    Autocorrelation 21/32

    http://goforward/http://find/http://goback/
  • 8/11/2019 Further Regression Topics II

    21/32

    A serious consequence of autocorrelation is that theformulae for the OLS standard errors are incorrect.

    This is because the formulae are derived assumingCov ( i, j) = 0 for all i = j; this is no longer correct underautocorrelation.This means that, for example, any t -statistics we construct

    will be using the wrong standard errors, and so we maydraw the wrong inferences from our hypothesis tests.For example, we may conclude that a variable X j is asignicant determinant of Y when in fact it isnt i.e. wereject H 0 : j = 0 when in fact the null is true!Conversely, we may conclude that a variable X j is not asignicant determinant of Y when in fact it is i.e. we do notreject H 0 : j = 0 when in fact the null is false!

    EC114 Introduction to Quantitative Economics 20. Further Regression Topics II

    Autocorrelation 22/32

    http://goforward/http://find/http://goback/
  • 8/11/2019 Further Regression Topics II

    22/32

    In view of the potential for making incorrect inferences it isimportant to be able to test for autocorrelation.

    Most tests are concerned with autocorrelation being of anautoregressive form.For example, a rst-order autoregressive process is

    t = t 1 + ut ,

    where 1 < < 1 and ut is a disturbance that satises theClassical assumptions.As t depends on t 1 it follows that Cov( t , t 1 ) = 0 .

    When > 0

    we have positive autocorrelation: positivevalues of t 1 tend to be followed by positive values of t .When < 0 we have negative autocorrelation: positivevalues of t 1 tend to be followed by negative values of t .

    EC114 Introduction to Quantitative Economics 20. Further Regression Topics II

    Autocorrelation 23/32

    http://find/http://goback/
  • 8/11/2019 Further Regression Topics II

    23/32

    Note that, when = 0 , there is no autocorrelation becauset = ut , which is Classical and, hence, uncorrelated.

    A test for rst-order autocorrelation can be regarded as atest of H 0 : = 0 against H A : = 0 .More generally, an autoregressive process of order p is

    t = 1

    t 1

    + . . . + p t

    p + ut ,so that t depends on its own value in the p preceedingperiods.When all the parameters ( 1 , . . . , p) are zero there is no

    autocorrelation.A test for pth-order autocorrelation can be regarded as atest of H 0 : 1 = . . . p = 0 against H A : at least one j = 0 .

    EC114 Introduction to Quantitative Economics 20. Further Regression Topics II

    Autocorrelation 24/32

    http://goforward/http://find/http://goback/
  • 8/11/2019 Further Regression Topics II

    24/32

    How can we test for serial correlation in disturbances?

    A widely used test is the Breusch-Godfrey test , or BG test,which is another example of a Lagrange multiplier test.Under the null hypothesis of no autocorrelation, thestatistic has a 2 p distribution, where p denotes the highestorder of autocorrelation being tested for.If c0 .05 denotes the (upper-tail) 5% critical value from the 2 pdistribution, then the decision rule is:

    if TS > c0 .05 reject H 0 in favour of H A;if TS < c0 .05 do not reject H 0 i.e. reserve judgment.

    In other words, a signicant value of TS indicatesautocorrelation in the disturbances.

    EC114 Introduction to Quantitative Economics 20. Further Regression Topics II

    http://find/http://goback/
  • 8/11/2019 Further Regression Topics II

    25/32

    Autocorrelation 26/32

  • 8/11/2019 Further Regression Topics II

    26/32

    . regress lrc lry

    Source | SS df MS Number of obs = 39-------------+------------------------------ F( 1, 37) = 9563.63

    Model | 2.7811551 1 2.7811551 Prob > F = 0.0000Residual | .010759799 37 .000290805 R-squared = 0.9961

    -------------+------------------------------ Adj R-squared = 0.9960Total | 2.7919149 38 .073471445 Root MSE = .01705

    ------------------------------------------------------------------------------lrc | Coef. Std. Err. t P>|t| [95% Conf. Interval]

    -------------+----------------------------------------------------------------lry | 1.005177 .0102785 97.79 0.000 .9843504 1.026003

    _cons | -.1666405 .0988785 -1.69 0.100 -.3669873 .0337063------------------------------------------------------------------------------

    . estat bgodfrey, lags(1)

    Breusch-Godfrey LM test for autocorrelation---------------------------------------------------------------------------

    lags(p) | chi2 df Prob > chi2-------------+-------------------------------------------------------------

    1 | 23.776 1 0.0000---------------------------------------------------------------------------

    H0: no serial correlation

    We nd that TS = 23 .776 > 3 .841 (the 5% critical value forthe 21 distribution) and so we reject H 0 i.e. there isevidence of rst-order autocorrelation.

    EC114 Introduction to Quantitative Economics 20. Further Regression Topics II

    Dynamic Models 27/32

    http://find/
  • 8/11/2019 Further Regression Topics II

    27/32

    What do we do if we nd evidence of autocorrelation?A possible cause of autocorrelation in disturbances is thatgenuine dynamic factors have been ignored in theregression.Suppose, in the consumption example, that currentconsumption depends not only on current income but also

    the values of these variables in the previous period.This means that we should be estimating the model

    ln (RC ) t = 1 + 2 ln (RY) t + 3 ln (RY) t 1 + 4 ln (RC ) t 1 + t ,

    and because we ignore the lagged values theautocorrelation shows up in the residuals instead.The resulting regression output is:

    EC114 Introduction to Quantitative Economics 20. Further Regression Topics II

    Dynamic Models 28/32

    http://find/
  • 8/11/2019 Further Regression Topics II

    28/32

    . regress lrc lry L.lry L.lrc

    Source | SS df MS Number of obs = 38-------------+------------------------------ F( 3, 34) = 8252.01

    Model | 2.55683972 3 .852279906 Prob > F = 0.0000

    Residual | .00351157 34 .000103281 R-squared = 0.9986-------------+------------------------------ Adj R-squared = 0.9985Total | 2.56035129 37 .069198683 Root MSE = .01016

    ------------------------------------------------------------------------------lrc | Coef. Std. Err. t P>|t| [95% Conf. Interval]

    -------------+----------------------------------------------------------------lry |--. | .8875018 .1034194 8.58 0.000 .6773282 1.097675L1. | -.7417126 .1410369 -5.26 0.000 -1.028334 -.4550912

    |lrc |L1. | .8614589 .1065743 8.08 0.000 .644874 1.078044

    | _cons | -.0828006 .0666774 -1.24 0.223 -.2183054 .0527042

    ------------------------------------------------------------------------------

    . estat bgodfrey, lags(1)

    Breusch-Godfrey LM test for autocorrelation---------------------------------------------------------------------------

    lags(p) | chi2 df Prob > chi2-------------+-------------------------------------------------------------

    1 | 0.030 1 0.8631---------------------------------------------------------------------------

    H0: no serial correlation

    EC114 Introduction to Quantitative Economics 20. Further Regression Topics II

    Dynamic Models 29/32

    http://goforward/http://find/http://goback/
  • 8/11/2019 Further Regression Topics II

    29/32

    We nd that TS = 0 .030 < 3 .841 and so we do not reject H 0

    i.e. there is no evidence of rst-order autocorrelation.Incorporating lagged values of the dependent variable andthe regressor has allowed us to model (or account for) theautocorrelation in a more direct way.It is usually a good idea to try to model dynamic featuresrather than let the unobserved part of the model (thedisturbance) account for them this can be particularlyimportant when using the model for forecasting.One of the implications of a dynamic model is that the

    effects of changes in the regressors are different in theshort run and the long run.

    EC114 Introduction to Quantitative Economics 20. Further Regression Topics II

    Dynamic Models 30/32

    http://find/
  • 8/11/2019 Further Regression Topics II

    30/32

    Suppose we have the model

    Y t = 1 + 2 X t + 3 X t 1 + 4 Y t 1 + t .

    The immediate impact of a unit change in X t is representedby the coefcient 2 , but it will also affect Y t + 1 via thecoefcient 3 .

    What is the long run effect?Lets dene the long run as a situation when all variablesare in equilibrium, so that

    Y t = Y t 1 = Y and X t = X t 1 = X .

    Plugging these values into the model (and ignoring ) gives

    Y = 1 + 2 X + 3 X + 4 Y .

    EC114 Introduction to Quantitative Economics 20. Further Regression Topics II

    Dynamic Models 31/32

    http://goforward/http://find/http://goback/
  • 8/11/2019 Further Regression Topics II

    31/32

    Collecting terms we obtain

    (1

    4 )Y = 1 + ( 2 + 3 ) X which results in

    Y = 1

    (1 4 ) +

    ( 2 + 3 )(1 4 )

    X .

    Hence the long run effect of a unit change in X is equal to

    ( 2 + 3 )/ (1 4 )

    which can be compared to the impact effect of 2 .Dynamic models therefore allow for different short run andlong run properties.

    EC114 Introduction to Quantitative Economics 20. Further Regression Topics II

    http://goforward/http://find/http://goback/
  • 8/11/2019 Further Regression Topics II

    32/32