1 COMPARING LINEAR AND LOGARITHMIC SPECIFICATIONS When alternative specifications of a regression model have the same dependent variable, R 2 can be used.

Slides:



Advertisements
Similar presentations
CHOW TEST AND DUMMY VARIABLE GROUP TEST
Advertisements

EC220 - Introduction to econometrics (chapter 5)
EC220 - Introduction to econometrics (chapter 10)
Christopher Dougherty EC220 - Introduction to econometrics (chapter 5) Slideshow: slope dummy variables Original citation: Dougherty, C. (2012) EC220 -
1 THE DISTURBANCE TERM IN LOGARITHMIC MODELS Thus far, nothing has been said about the disturbance term in nonlinear regression models.
Christopher Dougherty EC220 - Introduction to econometrics (chapter 4) Slideshow: interactive explanatory variables Original citation: Dougherty, C. (2012)
HETEROSCEDASTICITY-CONSISTENT STANDARD ERRORS 1 Heteroscedasticity causes OLS standard errors to be biased is finite samples. However it can be demonstrated.
EC220 - Introduction to econometrics (chapter 7)
1 BINARY CHOICE MODELS: PROBIT ANALYSIS In the case of probit analysis, the sigmoid function F(Z) giving the probability is the cumulative standardized.
EC220 - Introduction to econometrics (chapter 2)
Christopher Dougherty EC220 - Introduction to econometrics (chapter 6) Slideshow: variable misspecification iii: consequences for diagnostics Original.
Christopher Dougherty EC220 - Introduction to econometrics (chapter 2) Slideshow: testing a hypothesis relating to a regression coefficient (2010/2011.
EC220 - Introduction to econometrics (chapter 1)
1 INTERPRETATION OF A REGRESSION EQUATION The scatter diagram shows hourly earnings in 2002 plotted against years of schooling, defined as highest grade.
TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT This sequence describes the testing of a hypotheses relating to regression coefficients. It is.
SLOPE DUMMY VARIABLES 1 The scatter diagram shows the data for the 74 schools in Shanghai and the cost functions derived from a regression of COST on N.
BINARY CHOICE MODELS: LOGIT ANALYSIS
Christopher Dougherty EC220 - Introduction to econometrics (chapter 3) Slideshow: precision of the multiple regression coefficients Original citation:
Christopher Dougherty EC220 - Introduction to econometrics (chapter 4) Slideshow: semilogarithmic models Original citation: Dougherty, C. (2012) EC220.
Christopher Dougherty EC220 - Introduction to econometrics (chapter 4) Slideshow: nonlinear regression Original citation: Dougherty, C. (2012) EC220 -
Christopher Dougherty EC220 - Introduction to econometrics (chapter 10) Slideshow: maximum likelihood estimation of regression coefficients Original citation:
DERIVING LINEAR REGRESSION COEFFICIENTS
Christopher Dougherty EC220 - Introduction to econometrics (chapter 5) Slideshow: Chow test Original citation: Dougherty, C. (2012) EC220 - Introduction.
TOBIT ANALYSIS Sometimes the dependent variable in a regression model is subject to a lower limit or an upper limit, or both. Suppose that in the absence.
1 In a second variation, we shall consider the model shown above. x is the rate of growth of productivity, assumed to be exogenous. w is now hypothesized.
Christopher Dougherty EC220 - Introduction to econometrics (chapter 5) Slideshow: dummy variable classification with two categories Original citation:
Christopher Dougherty EC220 - Introduction to econometrics (chapter 5) Slideshow: two sets of dummy variables Original citation: Dougherty, C. (2012) EC220.
FIXED EFFECTS REGRESSIONS: WITHIN-GROUPS METHOD The two main approaches to the fitting of models using panel data are known, for reasons that will be explained.
Christopher Dougherty EC220 - Introduction to econometrics (chapter 5) Slideshow: the effects of changing the reference category Original citation: Dougherty,
Christopher Dougherty EC220 - Introduction to econometrics (chapter 5) Slideshow: dummy classification with more than two categories Original citation:
DUMMY CLASSIFICATION WITH MORE THAN TWO CATEGORIES This sequence explains how to extend the dummy variable technique to handle a qualitative explanatory.
Christopher Dougherty EC220 - Introduction to econometrics (chapter 10) Slideshow: Tobit models Original citation: Dougherty, C. (2012) EC220 - Introduction.
1 INTERACTIVE EXPLANATORY VARIABLES The model shown above is linear in parameters and it may be fitted using straightforward OLS, provided that the regression.
THE FIXED AND RANDOM COMPONENTS OF A RANDOM VARIABLE 1 In this short sequence we shall decompose a random variable X into its fixed and random components.
Christopher Dougherty EC220 - Introduction to econometrics (chapter 10) Slideshow: binary choice logit models Original citation: Dougherty, C. (2012) EC220.
1 TWO SETS OF DUMMY VARIABLES The explanatory variables in a regression model may include multiple sets of dummy variables. This sequence provides an example.
Confidence intervals were treated at length in the Review chapter and their application to regression analysis presents no problems. We will not repeat.
ALTERNATIVE EXPRESSION FOR POPULATION VARIANCE 1 This sequence derives an alternative expression for the population variance of a random variable. It provides.
1 PROXY VARIABLES Suppose that a variable Y is hypothesized to depend on a set of explanatory variables X 2,..., X k as shown above, and suppose that for.
MULTIPLE RESTRICTIONS AND ZERO RESTRICTIONS
F TEST OF GOODNESS OF FIT FOR THE WHOLE EQUATION 1 This sequence describes two F tests of goodness of fit in a multiple regression model. The first relates.
MULTIPLE REGRESSION WITH TWO EXPLANATORY VARIABLES: EXAMPLE 1 This sequence provides a geometrical interpretation of a multiple regression model with two.
Christopher Dougherty EC220 - Introduction to econometrics (chapter 12) Slideshow: footnote: the Cochrane-Orcutt iterative process Original citation: Dougherty,
Simple regression model: Y =  1 +  2 X + u 1 We have seen that the regression coefficients b 1 and b 2 are random variables. They provide point estimates.
Christopher Dougherty EC220 - Introduction to econometrics (chapter 9) Slideshow: instrumental variable estimation: variation Original citation: Dougherty,
. reg LGEARN S WEIGHT85 Source | SS df MS Number of obs = F( 2, 537) = Model |
Christopher Dougherty EC220 - Introduction to econometrics (chapter 6) Slideshow: multiple restrictions and zero restrictions Original citation: Dougherty,
Christopher Dougherty EC220 - Introduction to econometrics (chapter 5) Slideshow: exercise 5.2 Original citation: Dougherty, C. (2012) EC220 - Introduction.
POSSIBLE DIRECT MEASURES FOR ALLEVIATING MULTICOLLINEARITY 1 What can you do about multicollinearity if you encounter it? We will discuss some possible.
(1)Combine the correlated variables. 1 In this sequence, we look at four possible indirect methods for alleviating a problem of multicollinearity. POSSIBLE.
1 We will continue with a variation on the basic model. We will now hypothesize that p is a function of m, the rate of growth of the money supply, as well.
COST 11 DUMMY VARIABLE CLASSIFICATION WITH TWO CATEGORIES 1 This sequence explains how you can include qualitative explanatory variables in your regression.
RAMSEY’S RESET TEST OF FUNCTIONAL MISSPECIFICATION 1 Ramsey’s RESET test of functional misspecification is intended to provide a simple indicator of evidence.
1 NONLINEAR REGRESSION Suppose you believe that a variable Y depends on a variable X according to the relationship shown and you wish to obtain estimates.
1 ESTIMATORS OF VARIANCE, COVARIANCE, AND CORRELATION We have seen that the variance of a random variable X is given by the expression above. Variance.
1 CHANGES IN THE UNITS OF MEASUREMENT Suppose that the units of measurement of Y or X are changed. How will this affect the regression results? Intuitively,
SEMILOGARITHMIC MODELS 1 This sequence introduces the semilogarithmic model and shows how it may be applied to an earnings function. The dependent variable.
GRAPHING A RELATIONSHIP IN A MULTIPLE REGRESSION MODEL The output above shows the result of regressing EARNINGS, hourly earnings in dollars, on S, years.
1 REPARAMETERIZATION OF A MODEL AND t TEST OF A LINEAR RESTRICTION Linear restrictions can also be tested using a t test. This involves the reparameterization.
F TESTS RELATING TO GROUPS OF EXPLANATORY VARIABLES 1 We now come to more general F tests of goodness of fit. This is a test of the joint explanatory power.
WHITE TEST FOR HETEROSCEDASTICITY 1 The White test for heteroscedasticity looks for evidence of an association between the variance of the disturbance.
VARIABLE MISSPECIFICATION II: INCLUSION OF AN IRRELEVANT VARIABLE In this sequence we will investigate the consequences of including an irrelevant variable.
FOOTNOTE: THE COCHRANE–ORCUTT ITERATIVE PROCESS 1 We saw in the previous sequence that AR(1) autocorrelation could be eliminated by a simple manipulation.
VARIABLE MISSPECIFICATION I: OMISSION OF A RELEVANT VARIABLE In this sequence and the next we will investigate the consequences of misspecifying the regression.
Introduction to Econometrics, 5th edition
Introduction to Econometrics, 5th edition
Introduction to Econometrics, 5th edition
Introduction to Econometrics, 5th edition
Introduction to Econometrics, 5th edition
Presentation transcript:

1 COMPARING LINEAR AND LOGARITHMIC SPECIFICATIONS When alternative specifications of a regression model have the same dependent variable, R 2 can be used to compare their goodness of fit.

However, when the dependent variable is different, this is not legitimate. 2 COMPARING LINEAR AND LOGARITHMIC SPECIFICATIONS

In the case of the linear model, R 2 measures the proportion of the variance in Y explained by the model. In the case of the semilogarithmic model, it measures the proportion of the variance of the logarithm of Y explained by the model. 3 COMPARING LINEAR AND LOGARITHMIC SPECIFICATIONS

Clearly these are related, but they are not the same and direct comparisons are not valid. 4 COMPARING LINEAR AND LOGARITHMIC SPECIFICATIONS

However, the goodness of fit of models with linear and logarithmic versions of the same dependent variable can be compared indirectly by subjecting the dependent variable to the Box–Cox transformation and fitting the model shown. 5 COMPARING LINEAR AND LOGARITHMIC SPECIFICATIONS Box–Cox transformation:

This is a family of specifications that depend on the parameter. The determination of is an empirical matter, like the determination of the other parameters. 6 COMPARING LINEAR AND LOGARITHMIC SPECIFICATIONS Box–Cox transformation:

The model is nonlinear in parameters and so a nonlinear regression method should be used. In practice, maximum likelihood estimation is used. 7 COMPARING LINEAR AND LOGARITHMIC SPECIFICATIONS Box–Cox transformation:

8 COMPARING LINEAR AND LOGARITHMIC SPECIFICATIONS The reason that this transformation is of interest in the present context is that specifications with linear and logarithmic dependent variables are special cases. when Box–Cox transformation:

9 COMPARING LINEAR AND LOGARITHMIC SPECIFICATIONS Putting = 1 gives the linear model. The dependent variable is then Y – 1, rather than Y, but subtracting a constant from the dependent variable does not affect the regression results, except for the estimate of the intercept. when Box–Cox transformation:

10 COMPARING LINEAR AND LOGARITHMIC SPECIFICATIONS Putting = 0 gives the (semi–)logarithmic model. Of course, one cannot talk about putting exactly equal to 0, because then the dependent variable becomes zero divided by zero. We are talking about the limiting form as tends to zero and we have used L'Hôpital's rule. when Box–Cox transformation:

11 COMPARING LINEAR AND LOGARITHMIC SPECIFICATIONS So one could fit the general model and see whether  is close to 0 or close to 1. Of course. 'close' has no meaning in econometrics. To approach this issue technically, one should test the hypotheses = 0 and = 1. when Box–Cox transformation:

The outcome might be that one is rejected and the other not rejected, but of course it is possible that neither might be rejected or both might be rejected, given your chosen significance level. 12 COMPARING LINEAR AND LOGARITHMIC SPECIFICATIONS when Box–Cox transformation:

when 13 COMPARING LINEAR AND LOGARITHMIC SPECIFICATIONS Box–Cox transformation: If you are interested only in comparing the fits of the linear and logarithmic specifications, there is a short-cut procedure that involves only standard least squares regressions.

The first step is to divide the observations on the dependent variable by their geometric mean. We will call the transformed variable Y*. 14 COMPARING LINEAR AND LOGARITHMIC SPECIFICATIONS geometric mean of Y

You now regress Y* and log e Y*, leaving the right side of the equation unchanged. (The parameters have been given prime marks to emphasize that the coefficients will not be estimates of the original  1 and  2.) 15 COMPARING LINEAR AND LOGARITHMIC SPECIFICATIONS geometric mean of Y

The residual sums of squares are now directly comparable. The specification with the smaller RSS therefore provides the better fit. 16 COMPARING LINEAR AND LOGARITHMIC SPECIFICATIONS geometric mean of Y

We will use the transformation to compare the fits of the linear and semilogarithmic versions of a simple earnings function, using EAEF Data Set COMPARING LINEAR AND LOGARITHMIC SPECIFICATIONS

The first step is to calculate the geometric mean of the dependent variable. The easiest way to do this is to take the exponential of the mean of the log of the dependent variable. 18 COMPARING LINEAR AND LOGARITHMIC SPECIFICATIONS

The sum of the logarithms of Y is equal to the logarithm of the products of Y. 19 COMPARING LINEAR AND LOGARITHMIC SPECIFICATIONS

Now we use the rule that alog X is the same as log X a. 20 COMPARING LINEAR AND LOGARITHMIC SPECIFICATIONS

And finally we use the fact that the exponential of the logarithm of X reduces to X. 21 COMPARING LINEAR AND LOGARITHMIC SPECIFICATIONS

LGEARN has already been defined as the logarithm of EARNINGS. We find its mean. In Stata this is done with the ‘sum’ command. 22 COMPARING LINEAR AND LOGARITHMIC SPECIFICATIONS. sum LGEARN Variable | Obs Mean Std. Dev. Min Max LGEARN |

We then define EARNSTAR, dividing EARNINGS by the exponential of the mean of LGEARN. 23 COMPARING LINEAR AND LOGARITHMIC SPECIFICATIONS. sum LGEARN Variable | Obs Mean Std. Dev. Min Max LGEARN | gen EARNSTAR = EARNINGS/exp(2.79)

We also define LGEARNST, the logarithm of EARNSTAR. 24 COMPARING LINEAR AND LOGARITHMIC SPECIFICATIONS. sum LGEARN Variable | Obs Mean Std. Dev. Min Max LGEARN | gen EARNSTAR = EARNINGS/exp(2.79). gen LGEARNST = ln(EARNSTAR)

. reg EARNSTAR S EXP Source | SS df MS Number of obs = F( 2, 537) = Model | Prob > F = Residual | R-squared = Adj R-squared = Total | Root MSE = EARNSTAR | Coef. Std. Err. t P>|t| [95% Conf. Interval] S | EXP | _cons | Here is the regression of EARNSTAR on S and EXP. The residual sum of squares is COMPARING LINEAR AND LOGARITHMIC SPECIFICATIONS

We run the parallel regression for LGEARNST. The residual sum of squares is Thus we conclude that the semilogarithmic version gives a better fit. 26 COMPARING LINEAR AND LOGARITHMIC SPECIFICATIONS. reg LGEARNST S EXP Source | SS df MS Number of obs = F( 2, 537) = Model | Prob > F = Residual | R-squared = Adj R-squared = Total | Root MSE = LGEARNST | Coef. Std. Err. t P>|t| [95% Conf. Interval] S | EXP | _cons |

. boxcox EARNINGS S EXP Number of obs = 540 LR chi2(2) = Log likelihood = Prob > chi2 = EARNINGS | Coef. Std. Err. z P>|z| [95% Conf. Interval] /theta | Test Restricted LR statistic P-value H0: log likelihood chi2 Prob > chi theta = theta = theta = Here is the output for the full Box–Cox regression. The parameter that we have denoted (lambda) is called theta by Stata. It is estimated at –0.13. Since it is closer to 0 than to 1, it indicates that the dependent variable should be logarithmic rather than linear. 27 COMPARING LINEAR AND LOGARITHMIC SPECIFICATIONS

However, even the value of 0 does not lie in the 95 percent confidence interval. (The log likelihood tests will be explained in Chapter 10.) 28 COMPARING LINEAR AND LOGARITHMIC SPECIFICATIONS. boxcox EARNINGS S EXP Number of obs = 540 LR chi2(2) = Log likelihood = Prob > chi2 = EARNINGS | Coef. Std. Err. z P>|z| [95% Conf. Interval] /theta | Test Restricted LR statistic P-value H0: log likelihood chi2 Prob > chi theta = theta = theta =

Copyright Christopher Dougherty These slideshows may be downloaded by anyone, anywhere for personal use. Subject to respect for copyright and, where appropriate, attribution, they may be used as a resource for teaching an econometrics course. There is no need to refer to the author. The content of this slideshow comes from Section 4.2 of C. Dougherty, Introduction to Econometrics, fourth edition 2011, Oxford University Press. Additional (free) resources for both students and instructors may be downloaded from the OUP Online Resource Centre Individuals studying econometrics on their own who feel that they might benefit from participation in a formal course should consider the London School of Economics summer school course EC212 Introduction to Econometrics or the University of London International Programmes distance learning course EC2020 Elements of Econometrics