Tuesday, June 21, 2011

CHAPTER 13: ECONOMETRIC MODELING: MODEL SPECIFICATION AND DIAGNOSTIC TESTING

ü  Model Selection Criteria
1.      Be data admissible.
2.      Be consistent with theory.
3.      Have weekly exogenous regressors.
4.      Exhibit parameter constancy.
5.      Exhibit data coherency.
6.      Be encompassing.
ü  Types of Specification Errors
1.      Omission of relevant variable(s).
2.      Inclusion of an unnecessary variable(s).
3.      Adopting the wrong functional form.
4.      Errors of measurement.
5.      Incorrect specification of the stochastic error term.
ü  Consequences of Model Specification Errors
·         Underfitting a Model(Omitting a Relevant Variable)
The consequences of omitting variable X3 are as follows:
1.      If the left-out, or omitted, variable X3 is correlated with the included variable X2, that is, r23, the correlation coefficient between the two variables, is nonzero, α1 and α2 are biased as well as inconsistent.
2.      Even if X2 and X3 are not correlated, α1 is biased, although α2 is now unbiased.
3.      The disturbance variance         is incorrectly estimated.
4.      The conventionally measured variance of α2(=         /∑X2i ) is a biased estimator of the variance of the true estimator β2.
5.      In consequence, the usual confidence interval and hypothesis testing procedures are likely to give misleading conclusions about the statistical significance of the estimated parameters.
6.      The forecasts based on the incorrect model and forecast intervals will be unreliable.
·         Inclusion of an Irrelevant Variable(Overfitting a Model)
The consequences of this specification error are as follows:
1.      The OLS estimators of the parameters of the “incorrect” model are all unbiased and consistent, that is, E(α1) = β1, E(α2) = β2 and E(α3) = β3 = 0.
2.      The error variance           is correctly estimated.
3.      The usual confidence interval and hypothesis testing procedures remain valid.
4.      However, the estimated α’s will be generally inefficient, that is, their variances will be generally larger than those of the β’s of the true model.
ü  Test of Specification Errors
·         Detecting the Presence of Unnecessary Variables(Overfitting a Model)
Bottom-up approach(data mining) – starting with a smaller model and expanding it as one goes along.
·         Tests for Omitted Variables and Incorrect Functional Form
-          Examination of Residuals
-          The Durbin-Watson d Statistic Once Again
To use the Durbin-Watson test for detecting model specification error(s) we proceed as follows:
1.      From this assumed model, obtain the OLS residuals.
2.      If it is believed that the assumed model is mis-specified because it excludes a relevant explanatory variable, say, Z from the model, order the residuals obtained in Step 1, according to increasing values of Z.
3.      Compute the d statistic.
4.      From the Durbin-Watson tables, if the estimated d value is significant, then one can accept the hypothesis of model mis-specification.
-          Ramsey’s RESET Test
Steps involved in RESET are as follows:
1.      From the chosen model, obtained the estimated Yi, that is, Yi.
2.      Rerun introducing Yi in some form as an additional regressor(s).
3.      Use F test namely

F = (R2new – R2old)/number of new regressors
                               (1 – R2new)/(n – number of parameters in the new model)
4.      If the computed F value is significant, say, at the 5 percent level, one can accept the hypothesis that the model is mis-specified.
-          Lagrange Multiplier (LM) Test for Adding Variables
1.      Estimate the restricted regression by OLS and obtain the residuals, ui.
2.      If in fact the unrestricted regression

Yi = β1 + β2Xi + β3Xi2 + β4Xi3 + ui
             is the true regression, the residuals obtained in:

Yi = λ1 + λ2Xi + u3i
             should be related to the squared and cubed output terms, that is, Xi2 and Xi3.
3.      This suggests that we regress the ui obtained in step 1 on all the regressors, which in the present case means

ui = α1 + α2Xi + α3Xi2 + α4Xi3 + vi
             where vi is an error term with the usual properties.
4.      Symbolically, we write

nR2 asy X2(number of restrictions)
5.      If the chi-square value obtained in nR2 asy X2 exceeds the critical chi-square value at the chosen level of significance, we reject the restricted regression.
ü  Errors of Measurement
·         Errors of Measurement in the Dependent Variable Y
Although the errors of measurement in the dependent variable still give unbiased estimates of the parameters and their variances, the estimated variances are now larger in the case where there are no such errors of measurement.
ü  Tests of Non-nested Hypothesis
1.      Discrimination Approach – where given two or more competing models, one chooses a model based on some criteria of goodness of fit.
2.      Discerning Approach – where, in investigating one model, we take into account information provided by other models.
ü  Model Selection Criteria
·         The R2 Criterion

R2 = ESS = 1 – RSS
         TSS           TSS
·         Adjusted R2

R2 = 1 – RSS/ (n – k) = 1 – (1 – R2)n – 1
               TSS/ (n – 1)                         n – k
·         Alkalke Information Criterion (AIC)

AIC = e2kln ∑ui2 = e2kln RSS
                       n                    n

ln AIC =     2k      +  ln    RSS
                   n                      n
·         Schwarz Information Criterion (SIC)

SIC = nkln ∑ui2 = nkln RSS
                     n                  n

ln SIC = k ln n   +    ln   RSS
              n                         n
·         Mallows’s Cp Criterion

Cp = RSSp – (n – 2p)


E(Cp)        (n – p)        - (n – 2p)     p


ü  Additional Topics in Econometric Modeling
·         Outliers, Leverage and Influence
Defined as an observation with a “large residual”
·         Recursive Least Squares
·         Chow’s Prediction Failure Test
ü  A Word to the Practitioner
“Ten Commandments of Applied Econometrics”
1.      Thou shalt use common sense and economic theory.
2.      Thou shalt ask the right questions.
3.      Thou shalt know the context.
4.      Thou shalt inspect the data.
5.      Thou shalt not worship complexity.
6.      Thou shalt look long and hard at thy results.
7.      Thou shalt beware the costs of data mining.
8.      Thou shalt be willing to compromise.
9.      Thou shalt not confuse significance with substance.
10.  Thou shalt confess in the presence of sensitivity.









Tuesday, June 14, 2011

CHAPTER 12: AUTOCORRELATION: WHAT HAPPENS IF THE ERROR TERMS ARE CORRELATED?

ü  The Nature of The Problem
Autocorrelation – correlation between members of series of observations ordered in time.
Specification Bias: Excluded Variables Case. In empirical analysis, the researcher often starts with a plausible regression model that may not be the most “perfect” one. After the regression analysis, the researcher does the postmortem to find out whether the results accord with a priori expectations.
Cobweb Phenomenon. The supply of many agricultural commodities reflects the so-called cobweb phenomenon, where supply reacts to price with a lag of one time period because supply decisions take time to implement.
Lags. A regression such as

Consumptiont = β1 + β2incomet + β3consumptiont – 1 + ui
is known as autoregression because one of the explanatory variables is the lagged value of the dependent variable.
“Manipulation” of Data. Another source of manipulation is interpolation or extrapolation of data.
ü  OLS Estimation in the Presence of Autocorrelation
ρ(=rho) is known as the coefficient of autocovariance.
The scheme:

ut = ρut – 1 + εt                       -1<ρ<1
is known as the Markov first-order autoregressive sceme, or simply a first-order autoregressive scheme, usually denoted as AR(1). The name autoregressive is appropriate because it can be interpreted as the regression of ui on itself lagged one period.
ü  The BLUE Estimator in the Presence of Autocorrelation

β2 = ∑t = 2(Xt – ρXt – 1)(Yt – ρYt – 1)   + C
                ∑t = 2(Xt – ρXt – 1)2

varβ2 =                                      + D
               ∑t = 2(Xt – ρXt – 1)2
ü  Consequences of Using OLS in the Presence of Autocorrelation
ü  OLS Estimation Allowing for Autocorrelation
To establish confidence intervals and to test hypotheses, one should use GLS and not OLS even though the estimators derived from the latter are unbiased and consistent.
ü  OLS Estimation Disregarding Autocorrelation
1.      The residual variance          = ∑ui2/(n – 2) is likely to underestimate the true         .
2.      As a result, we are likely to overestimate R2.
3.      Even if          is not underestimated, var(β2) may underestimate var(β2) AR1, its variance under autocorrelation, even though the latter is inefficient compared to var(β2)GLS.
4.      Therefore, the usual t and F tests of significance are no longer valid, and if applied, are likely to give seriously misleading conclusions about the statistical significance of the estimated regression coefficients.
ü  Detecting Autocorrelation
                                I.            Graphical Method
                              II.            The Runs Test

Mean: E(R) = 2N1N2 + 1
                                                 N
                  Variance:         = 2N1N2(2N1N2 – N)
                                                       (N)2(N – 1)
       Decision Rule: Do not reject the null hypothesis of randomness with 95% confidence if     R, the number of runs, lies in the preceding confidence interval, reject the null hypothesis if the estimated R lies outside these limits.


                            III.            Durbin-Watson d Test
Durbin-Watson d statistic

d = ∑t = 2(ui – ut – 1)2
                ∑t = 1 ui2
Assumptions underlying d statistic:
1.      The regression model includes the intercept form.
2.      The explanatory variables, the X’s are nonstochastic, or fixed in repeated sampling.
3.      The disturbances ui are generated by the first-order autoregressive sceme: ut = ρut – 1 + εt                      
4.      The error term ut is assumed to be normally distributed.
5.      The regression model does not include the lagged value(s) of the dependent variable as one of the explanatory variables.
6.      There are no missing observations in the data. Therefore, as a rule of thumb, if d is found to be 2 in the application, one may assume that there is no first-order autocorrelation, either positive or negative.
Mechanics of the Durbin-Watson Test
1)      Run the OLS regression and obtain the residuals.
2)      Compute d.
3)      For the given sample size and given number of explanatory variables, find out the critical dL and dV values.
4)      Now follow the decision rules of durbin-watson d test.
IV. A General Test of Autocorrelation: The Breusch-Godfrey (BG) Test
Steps:
1.      Estimate Yt = β1 + β2Xt + ut by OLS and obtain the residuals, ut.
2.      Regress ut on the original Xt and ut – 1, ut – 2, . . . ,ut – p, where the latter are the lagged values of the estimated residuals in step 1.
3.      If the sample size is large, Breusch and Godfrey have shown that

(n – p)R2         X2p
ü  What To Do When You Find Autocorrelation: Remedial Measures
1.      Try to find out if the autocorrelation is pure autocorrelation and not the result of mis-specification of the model.
2.      If it is pure autocorrelation, one can use appropriate transformation of the original model so that in the transformed model we do not have the problem of autocorrelation.
3.      In large samples, we can use the Newey-West method to obtain standard errors of OLS estimators that are corrected for autocorrelation.
4.      In some situations we can continue to use the OLS method.





CHAPTER 11: HETEROSCEDASTICITY: WHAT HAPPENS IF THE ERROR VARIANCE IS NONCONSTANT?

ü  The Nature of Heteroscedasticity
There are several reasons why the variances of ui may be a variable, some of which are as follows:
1.      Following the error-learning models, as people learn, their errors of behavior become smaller over time.
2.      As incomes grow, people have more discretionary income and hence more scope of choice about the disposition of their income.
3.      As data collecting techniques,        is likely to decrease.
4.      Heteroscedasticity can also arise as a result of the presence of outliers.
5.      Another source of heteroscedasticity arises from violating Assumption 9 of CLRM, namely, that the regression model is correctly specified.
6.      Another source of heteroscedasticity is skewness in the distribution of one or more regressors included in the model.
7.      Heteroscedasticity can also arise because of (1) incorrect data transformation and (2) incorrect functional form.
ü  OLS Estimation in the Presence of Heteroscedasticity

var(β2) =   ∑Xi2
                    (∑Xi2)2

var(β3) = 
                 ∑Xi2
ü  The Method of Generalized Least Squares
-          Takes such information into account explicitly and is therefore capable of producing estimators that are BLUE.
ü  Difference Between OLS and GLS
OLS:

∑ui2 = ∑(Yi – β1 – β2Xi)2

GLS:

∑wiui2 = ∑wi(Yi – β1Xi – β2Xi)2
ü  Consequence of Using OLS in the Presence of Heteroscedasticity
ü  OLS Estimation Disregarding Heteroscedasticity
In short, if we persist in using the usual testing procedures despite heteroscedasticity, whatever conclusions we draw or inferences we make may be very misleading.
ü  Detection of Heteroscedasticity
ü  Informal Methods
Nature of the Problem. Very often the nature of the problem under consideration suggests whether heteroscedasticity is likely to be encountered.
Graphical Method. If there are no priori or empirical information about the nature of heteroscedasticity, in practice one can do the regression analysis on the assumption that there is no heteroscedasticity and then do the postmortem examination of the residual squared ui2 to see if they exhibit any systematic pattern.
ü  Formal Methods
Park Test. Park formalizes the graphical method by suggesting that        is some function of the explanatory variable Xi.
Glejser Test. After obtaining the residuals ui from the OLS regression, Glejser suggests regressing the absolute values of ui on the X variable that is thought to be closely associated with        .
Spearman’s Rank Correlation Test.

rs = 1 -        ∑di2
                   n(n2 – 1)
Step 1: Fit the regression to the data on Y and X and obtain the residuals ui.
Step 2: Ignoring the sign of ui, that is, taking their absolute value   ui    , rank both   ui  and Xi or (Yi) according to an ascending or descending order and compute the Spearman’s rank correlation coefficient given previously.
Step 3: Assuming that the population rank correlation coefficient ρs is zero and n>8, the significance of the sample rs can be tested by the t test as follows.

t = rs   n – 2
            1 – r2s
Goldfeld-Quandt Test. This popular method is applicable if one assumes that the heteroscedastic variance     , is positively related to one of the explanatory variable in the regression model.
Step 1: Order or rank the observations according to the values of Xi, beginning with the lowest X value.
Step 2: Omit c central observations, where c is specified a priori, and divide the remaining (n – c) observations into two groups each of (n – c) /2 observations.
Step 3: Fit separate OLS regressions to the first (n – c)/2 observations and the last (n – c)/2 observations and obtain the respective residual sums of squares RSS1 and RSS2, RSS1 representing the RSS from the regression corresponding to the smaller Xi values and RSS2 that from the larger Xi values.
Step 4: Compute the ratio

λ = RSS2/df
      RSS1/df
If ui are assumed to be normally distributed and if the assumption of homoscedasticity is valid.




Breusch-Pagan-Godfrey Test
Step 1: Estimate
Yi = β1 + β2X2i + βkXk + ui

by OLS and obtain the residuals u1, u2, . . . ,un
Step 2: Obtain        = ∑ui2/n
Step 3: Construct variables pi defined as

pi = ui2/
which is simply each residual squared divided by      .
Step 4: Regress pi thus considered on the z’s as

pi = α1 + α2Z2i + . . . + αmZmi + vi
where vi is the residual term of this regression.
Step 5: Obtain the ESS and define

= ½(ESS)
White’s General Heteroscedasticity Test
Step 1: Given the data, we estimate
Yi = β1 + β2X2i + β3X3i + ui
and obtain the residuals, ui.
Step 2: We then run the following regression:

ui2 = α1 + α2X2i + α3X3i + α4X2i + α5X3i + α6X2iX3i + vi
Step 3: Under the null hypothesis that there is no heteroscedasticity, it can be shown that the sample size (n) times the R2 obtained from the auxiliary regression asymptotically follows the chi-square distribution with df equal to the number of regressors in the auxiliary regression. That is,

n   R2  asy   X2df
Step 4: If the chi-square value obtained in n   R2 asy X2df exceeds the critical chi-square value at the chosen level of significance, conclusion is that there is heteroscedasticity.
ü  Other Tests of Heteroscedasticity
·         Koenker-Bassett (KB) Test
ü  Remedial Measures
ü  When       is Known: The Method of Weighted Least Squares
ü  When       not Known
·         Plausible assumptions about heteroscedasticity pattern
Assumption 1: The error variance is proportional to Xi2

E(ui2) =       Xi2
Assumption 2: The error variance is proportional to Xi. The square root transformation:

E(ui2) =         Xi
Assumption 3: The error variance is proportional to the square of the mean value of Y.

E(ui2) =       [E(Yi)]2
Assumption 4: A log transformation such as

lnYi = β1 + β2lnXi + ui
very often reduces heteroscedasticity when compared with the regression Yi = β1 + β2Xi + ui