Course lecture notes 6, 7 & 8 or ECON2300 PDF

Title Course lecture notes 6, 7 & 8 or ECON2300
Author Nicholas Lambourne
Course Introductory Econometrics
Institution University of Queensland
Pages 8
File Size 489.4 KB
File Type PDF
Total Downloads 107
Total Views 156

Summary

Download Course lecture notes 6, 7 & 8 or ECON2300 PDF


Description

Heteroskedasticity   

Violation of MR3: Var(ei) = σ2 o Basically says that all individual observations share a common (homo) variance (spread). Replace with MR7: Var(ei) = σ2 o Allows each observation to have it's own individual (hetero = different) variance. Heteroskedasticity is more commonly observed in cross-sectional data, rather than time-series data.



 

 



Red arrows = the variance is increasing over time -> Heteroskedasticity Under Heteroskedasticity: o OLS is unbiased and consistent  Unbiased: the estimations are right, on average, even when the sample sizes are small.  Consistent: the variance gets smaller as the sample size gets larger. o Standard errors are no longer given by standard formulas -> effects HTs and CIs. o OLS is inefficient (no longer BLUE: Best Linear Unbiased Estimator = smallest variance). If there is a heteroskedasticity problem, the BLUE is the Generalised Least Squares (GLS) model. To overcome the two problems caused by heteroskedasticity, we can: o Continue to use OLS but with different calculations for standard errors. o Use Generalised Least Squares. Methods for Detecting Heteroskedasticity o Plot the residuals (or squared residuals) against potentially heteroskedastic IVs and observe for systematic variation. o White’s General Test  H0: σi2 = σ2 for all i; H1: not H0.  Test Statistic: WG = N x R2 ~ X2S1.  Where R2 is the coefficient of determination regressing ei2 on a constant and all explanatory variables, their squares and their cross products. S = the number of coefficients (d.f.).  Tests for relationships between EVs and the error -> if it has a high R2, then a relationship may exist.  May have low power (low probability of correctly rejecting H0) and is nonconstructive (doesn’t tell us what to do next).  Eviews: Estimate Equation > Output > View > Residual Diagnostics > Heteroskedasticity Tests > White (Include Cross Terms). o Goldfield-Quandt Test  H0: σ2A = σ2B; H1: σ2A ≠ σ2B.  Test Statistic: GQ = σ2A / σ2B ~ F(NA-k, NB-k) Take SSE value from output as σ2A and σ2B & divide by N-2> Use in Test Statistic Formula. o Breusch-Pagan Test  H0: σi2 = σ2 for all i; H1: σi2 = σ2h(α1 + α2zi2 + … + αszis) View > Residual Diagnostics > Heteroskedasticity Tests > Breusch-Paga-Godfrey – Regressors: “c x1 x2… (any that might affect variance)”>Take Obs * R2 value > reject if p-value < 0.05.  Is equal to Whites General Test iff all EVs, squares and crosses are included. OLS Estimation Under Heteroskedasticity o With heteroskedasticity the standard errors under OLS are incorrect. 



o

We have to use a more general formula:

Effectively weights individual variances based on how far they are away from the mean, but depends on knowing σi2. We use the ei2 values as estimators of σi2.  These standard error estimations are known as White’s Heteroskedasticityconsistent errors (a.k.a. robust standard errors).  These new standard errors will lead to different HT and CI conclusions.  Even with these new errors, OLS is still not BLUE (see GLS below).  Eviews: Estimate Equation > Options > Coefficient Covariance Matrix: White > OK. Generalised Least Squares (GLS) Estimation o As OLS is still not BLUE, we still need to find estimators that are consistent with the assumptions MR1-5. o We can achieve this by transforming the existing OLS model. This transformation simply involves dividing every term in the original model by σi. Due to some tricky mathematics that isn’t worth going in to, we end up with an ei term that no longer varies with x (i.e. one that satisfies MR3 and eliminates heteroskedasticity). 



o

Transformation -> This model is therefore BLUE, and is known as Generalised Least Squares or Weighted Least Square (WLS). Sometimes σi2 is known up to a factor of proportionality (e.g. σi2 = σ2xij2, where σ2 is a ‘factor of proportionality’) we just divide all terms by the square root of the EV observed value to obtain homoskedastic (BLUE) standard errors (the right ones). However, if your assumption of proportionality is wrong, then you will get biased (wrong) estimators. This transformation hinges on knowing σi2 in advance. Since we don’t, it has to be estimated, resulting in Feasible Generalised Least Square (FGLS). People often estimate σi2 as a function (e.g. σi2 = exp(α1 + α2zi2 + … + αszis)).  We can then estimate σi2 using a regression: ln ei2 = α1 + α2zi2 + … + αszis + vi.  Eviews: Estimate Original Eqn > Proc > Generate Series “lehat2 = log(resid^2)”. Estimate Equation “lehat2 c log(z1)…” > Forecast, Name: “lsighat2” > Generate Series “sighat = @SQRT(exp(lsighat2))”. Estimate Equation “y c x” > Options: Weight: Std. Dev: Weight Series: sighat. These outputs are FGLS estimates of the coefficients and std devs. 

o

o

o If we believe that the variance varies across the sample (a la Goldfield-Quandt Test), we can estimate the variances by splitting the sample and use OLS on the two (or more) portions separately (to get the errors) before applying OLS to the transformed model using all N.  Eviews: Estimate Equation “y c x1 x2…” Sample: e.g.: “1 1000 id Metro = 1” or “1 500”. Take S.E. of Regression Value (Ctrl+C) > Generate Series “sighat = (value) if Metro =1”. Estimate Equation “y c x1 x2…” Sample: e.g.: “1 1000 id Metro = 0” or “501 1000”. Take S.E. of Regression Value (Ctrl+C) > Generate Series “sighat = (value) if Metro =0”  Estimate Equation “y c x1 x2…” > Options: Weights: Std. Dev: “sighat”.

Autocorrelation 







Violation of MR4: Cov(et,es) = 0 for t ≠. o Basically says that the error terms for different observations are correlated (e.g. last months interest rate affects this month’s interest rate). o Generally observed in time-series data. o In this course we assume the errors follow an AR(1) process (autoregressive process of order 1). The value of the variable is correlated with the observation of the variable from last period.  et = ρet-1 + vt (where vt is a random error term with μ=0, σ2v, and -1 < ρ < 1) 0 o Covariance is no longer zero, error terms co-vary. The errors are auto (self) correlated. Properties of the OLS under autocorrelation o OLS is unbiased and consistent.  o The variances of the OLS estimators are no longer given by the standard formula > effects standard error output and thus HT and CI conclusions. o OLS is inefficient (i.e. no longer BLUE: best linear unbiased estimator). Detecting Autocorrelation o Observing Residual Plots  Positive Autocorrelation: is likely to be present if residual plots reveal runs of positive residuals followed by runs of negative residuals.  Negative Autocorrelation: is likely to be present if residual plots reveal runs of negative residuals followed by runs of positive residuals.  Name corresponds to the valence of first run of residuals and corresponds to the valence of ρ. o Residual Correlograms  Calculating Correlation using:

 

o The sum of êt·êt-k divided by the sum of êt-k. H0: Corr(êt·êt-k) = 0; H1: Corr(êt·êt-k) ≠ 0 o Test Statistic = rk·SQRT(T) ≈ N(0,1) o Reject if |rk·SQRT(T)| > |1.96| (5% LoS) CI: rk ± 1.96/(SQRT(T))

 Eviews  Estimate Equation > View > Residual Diagnostics > Correlogram (Lags “16”)  If it goes outside the black lines (CIs), autocorrelation exists and we reject H0. o Lagrange Multiplier (Breusch-Godfrey) Test  H0: ρ = 0; H1: ρ ≠ 0 (if ρ = 0, then ρ · ê = 0)  Test Statistic LM = T · R2 ~ X21  R2 is the CoD in the regression of êt on 1, the explanatory variables and êt-1.  Reject H0 if p-value is less than 0.05 or if X21 > 3.841.  Eviews 

Estimate Equation > View > Residual Diagnostics > Serial Correlation LM Test (Lags ‘1’ for AR(1)).  Refer to p-value. o Durbin Watson test  H0: ρ = 0; H1: ρ ≠ 0 

 

Test Statistic:  Where r1 = the first order correlation coefficient. Reject H0:

    





If d=2, no autocorrelation; if d=0, positive autocorrelation; if d=4, negative autocorrelation. The critical value lies between dL and dU. Look up Durbin Watson Tables, K = number of estimated parameters.

OLS Estimation o To overcome autocorrelation in OLS, we use HAC (heteroskedasticity and autocorrelation consistent) standard errors (also known as Newey-West).  Eviews: Estimate Equation > Options > Coefficient Covariance Matrix (“HAC (Newey-West)”) GLS Estimation o If the errors follow an AR(1) process and ρ is known, we can obtain unbiased and efficient estimators by using OLS on a transformed model (similar to with heteroskedasticity), this is known as a Cochrane-Orcutt transformation.  Take the estimate of ρ from Correlogram.  Eviews: Estimate Equation >  DV = yt - ρ·yt-1. (e.g. z-0.35·z(-1))  C = 1- ρ (e.g. 1-0.35)  IV = xt - ρ·xt-1 (e.g. p-0.35·p(-1)) NLS Estimation (Non-Linear) o We can also obtain unbiased and efficient estimates by estimating the model:  Yt = β1 + β2xt2 + βKxtK + ρ(yt-1 - β1 - β2xt2 – βKxtK) + vt  This gives us numerically derived (repeats until SSE are smallest possible using GLS as above) estimates of the coefficients and ρ.  Eviews (hard way):  Estimate Equation > “y = c(1) + c(2)*x1 + c(3)*(a(-1) - c(2)*p(-1)) o Basically equation as above (with lagged variables) but instead of just putting c for constant + variables, we include a coefficient term in the form c(1) (e.g. for β1). o In this case c(3) is our estimate of ρ.  Eviews (easy way):  Estimate Equation > “a c p ar(1) > OK o ‘ar(1)’ does the transformations for you!

Endogeneity 



 

 

 

Involves the violation of MR5: the values of each xik are not random and are not exact linear functions of the other explanatory variables. o They can be random variables, but cannot then be correlated with the error term. If the variables are random, we can replace MR2-MR5 with: o MR9: E(ei|xi2,…,xik) = 0 endogeneity is a more serious problem. Testing for endogeneity: o Hausman Test:  If we suspect xik is endogenous we need to replace it with an ‘instrumental variable’, which does not have a direct effect on y, is highly correlated with xik, and is not endogenous itself (correlated with e).  We need to have at least as many instrumental variables as endogenous variables.  The goal of the Hausman test is to find an estimator (coefficient) that is consistent under the null, but not under the alternative as well as a second estimator that is consistent under both (this is an IV estimator).  H0: Cov(eixki) = 0 for all K; H1: Cov(eixki) ≠ 0. o The null states xik is exogenous (i.e. no endogeneity problem). o If the null is true, both of the abovementioned estimators should be the same. If they aren’t we can reject the null.  Step 1: regress each endogenous explanatory variable on all instrumental and exogenous explanatory variables using OLS. Save the residuals.  Eviews: Estimate Equation > ‘endogenous c exogenous1 exogenous2 instrumental1 instrumental2” > OK. Proc > Make Residual Series (“vhat1”).

Repeat as many times as you have endogenous variables (obviously making each one the subject of its own regression).  Step 2: Add the residuals to the original model as another explanatory variable (giving you an artificial model) using OLS.  Eviews: Estimate Equation > ‘y c x1 x2 … xk vhat1 …’  Step 3: Use a standard F-test to test the null that the coefficients of the residual terms are equal to zero (i.e. H0: E(ei|xi2…,xiK) = 0; H1: E(ei|xi2…,xiK) ≠ 0).  Eviews: From prior output: o One endogenous variable: if vhat is significant (p Coefficient Diagnostics > Wald Test (e.g. “c(5) = c(6) = c(7) = 0” where the c(?) refers to coefficient number of the vhats). F-test shows significance or not. Instrumental Variable Estimation. o If MR9 does not hold we:  Step 1: Use OLS to regress each endogenous EV on all instrumental and exogenous explanatory variables and save the predictions.  Step 2: Replace the endogenous variables in the original model with the predictions and estimate the resulting model by OLS.  Eviews: Estimate Equation (Must choose Two-Stage Least Square {2SLS} to get the correct standard errors) Equation: “original equation”, Instruments: “IVs, Endogenous EVs + select include a constant”. o If the variables are exogenous themselves, then the IV estimators of the coefficients are consistent and asymptotically normal (i.e. they follow a normal distribution when the sample size is large enough) 10 (i.e. has extremely high significance = has at least one strong IV).  We only test one endogenous variable (more Cragg-Donald test).  Eviews: Estimate Equation > “endogenous variable c instruments exogenous variable” OK > View > Coefficient Diagnostics > Wald > e.g. “C(4)=0, C(5)=0”. Assessing Instrument Validity o An instrument is only valid if it is also uncorrelated with the error terms, we test this using a test of over-identifying restrictions. To test H0: IVs are correlated w/ the error terms:  Step 1: Use the IV estimator and all instruments to estimate the model and save the residuals.  Step 2: Regress the residuals on all available instruments (only) and compute test statistic = N x R2 (from this regression) ~ X2(L-B). Where L = instruments, B = Endogenous EVs. If H0 is rejected, then at least one of instruments is invalid. 





Eviews: Estimate Equation (2SLS)> “y c x1 x2…” Instruments “IVs exo EVs” >Proc>Create residual series “ehat”. Estimate Equation > “ehat c instrument 1 instrument2”. Not reject = instruments are valid....


Similar Free PDFs