« January 2012 | Main | March 2012 »
Posted by Mark Thoma on Wednesday, February 29, 2012 at 08:05 PM in Homework, Winter 2012 | Permalink | Comments (0)
Today:
Next Time:
Posted by Mark Thoma on Wednesday, February 29, 2012 at 07:34 PM in Lectures, Winter 2012 | Permalink | Comments (0)
Today:
Next Time:
Posted by Mark Thoma on Monday, February 27, 2012 at 08:03 PM in Lectures, Winter 2012 | Permalink | Comments (0)
This is due in lab on either 3/5 or 3/7.
1. Problem 9.4 on page 338 (problem 9.3, page 276 of the previous edition).
2. For the model
Qt = a0 + a1Pt + a2Yt + a3Xt + a4Zt + ut
Pt = b0 + b1Qt + b2Yt + b3Wt + vt
Yt = c0 + c1Pt + c2Wt + wt
Determine whether each equation is under, exactly, or over identified. Assume that Q, P, and Y are endogenous, and that the constant, X, Z, and W are exogenous.
3. Answer the following questions about your project:
(i) Do you expect any measurement problems, i.e. do you expect to have errors in variables problems? If so, what effect will that have on your estimates and test statistics (if you don't think this will be a problem, say that and explain why, and then say, but if I did have this problem it would cause the following difficulties and then describe the effect it would have on the estimates and test statistics). How can the problem be fixed?
(ii) Are there any important omitted variables? If so, what effect would the omitted variables have on the estimates and test statistics? (And again, even if you think you have every important variable, show that you understand this issue by explaining what types of problems it causes).
(iii) Do you expect problems with endogeneity bias (endogenous variables on the right-hand side of the equation that are correlated with the error term)? Think hard about this one, and if you do have this problem, what is the solution?
Posted by Mark Thoma on Monday, February 27, 2012 at 03:18 PM in Homework, Winter 2012 | Permalink | Comments (0)
1. There is not general solution to this one, each answer was graded individually based upon how well you completed the steps in the project outline.
2. The answer to problem 8.3 is in this pdf file.
3. What are the three requirements for a good instrumental variable?
An instrument should be (i) uncorrelated with the error term, (ii) correlated with the variable it is instrumenting for, and (iii) it should not be an explanatory variable itself.
Posted by Mark Thoma on Friday, February 24, 2012 at 11:58 AM in Homework, Winter 2012 | Permalink | Comments (0)
Today:
Next Time:
Posted by Mark Thoma on Wednesday, February 22, 2012 at 08:03 PM in Lectures, Winter 2012 | Permalink | Comments (0)
Today:
Next Time:
Posted by Mark Thoma on Monday, February 20, 2012 at 07:00 PM in Lectures, Winter 2012 | Permalink | Comments (0)
Posted by Mark Thoma on Monday, February 20, 2012 at 02:14 PM in Midterms, Winter 2012 | Permalink | Comments (0)
1. Problem 8.5 on page 313 (page 253 in the previous edition), part 1 only.
2. Consider the following simple Keynesian macroeconomic model of the U.S. economy.
Yt = Ct + It + Gt + NXt
Ct = β0 + β1YDt + β2Ct-1 + ε1t
YDt = Yt – Tt
It = β3 + β4Yt + β5rt-1 + ε2t
rt = β6 + β7Yt + β8Mt + ε3t
where:
Yt = gross domestic product (GDP) in year t
Ct = total personal consumption in year t
It = total gross private domestic investment in year t
Gt = government purchases of goods and services in year t
NXt = net exports of goods and services (exports - imports) in year t
Tt = taxes in year t
rt = the interest rate in year t
Mt = the money supply in year t
YDt = disposable income in year t
The endogenous variables are Yt, Ct, It, YDt, and rt. The exogenous and predetermined variables are Gt, NXt, Ct-1, Tt, rt-1, and Mt. Find the reduced form equations for this model.
3. (a) For your project, what econometric model do you plan to estimate and what hypothesis or hypotheses do you plan to test? (b) Depending upon whether your data are time-series or cross-sectional, test the model for autocorrelation or heteroskedasticity. (c) If you find a problem with either, explain explicitly how you plan to correct for it. If the tests do not indicate a problem, explain how you would have corrected for the problem had the test come out the other way (that is, no matter how the test comes out, explain how to correct for the problem of heteroskedasticity or autocorrelation as appropriate for your model. You don't have to actually do the correction for this homework (though if it was present, you would do the correction for the project), just explain how to do it.).
Posted by Mark Thoma on Monday, February 20, 2012 at 11:33 AM in Homework, Winter 2012 | Permalink | Comments (0)
Today:
Next Time:
Posted by Mark Thoma on Wednesday, February 15, 2012 at 11:55 PM in Lectures, Winter 2012 | Permalink | Comments (0)
Homework 5
Due in lab week 7 (the week of Feb. 20th)
1. Complete steps 1 through 3 of the Empirical Project Outline (as discussed in class).
2. Problem 8.3 on page 312 (page 253 in the previous edition).
3. What are the three requirements for a good instrumental variable?
[Note: The *next* homework will ask: (a) For your project, what econometric model do you plan to estimate and what hypothesis or hypotheses do you plan to test? (b) Depending upon whether your data are time-series or cross-sectional, test the model for autocorrelation or heteroskedasticity. (c) If you find a problem with either, explain explicitly how you plan to correct for it. If the tests do not indicate a problem, explain how you would have corrected for the problem had the test come out the other way (that is, no matter how the test comes out, explain how to correct for the problem of heteroskedasticity or autocorrelation as appropriate for your model).]
Posted by Mark Thoma on Wednesday, February 15, 2012 at 03:56 PM in Empirical Project, Homework, Winter 2012 | Permalink | Comments (0)
Midterm today
Posted by Mark Thoma on Tuesday, February 14, 2012 at 12:00 PM in Lectures, Winter 2012 | Permalink | Comments (0)
Economics 421/521
Winter 2012
Solution to Homework #4
1. Perform a Durbin-Watson test at the 5% level of significance for positive first-order autocorrelation using the following regression output (standard errors in parentheses):
Yt = 2.0 + 3.7*X1t - 4.4*X2t, T = 42
(.7) (1.1) (2.8) DW = 1.22
At the 5% level of significance, the critical value of the DW statistic is (approximately, with interpolation) 1.41 at the lower end and 1.61 at the upper end. Since 1.22 is smaller than dL = 1.41, we reject that ρ=0.
2. Recall the model from homework 1:
Given data on M2, real GDP, and the T-bill rate, estimate the following regression...:
Mt = β0 + β1RGDPt + β2Tbillt + et
Don't be surprised if the fit is very good - we'll explain why that may be misleading later in the course.
Here's the output:
Does model suffer from serial correlation? Use a Durbin-Watson test to answer the question.
Yes, definitely. The value of dL (5%) is, approximately, 1.63. The test statistic of .02891 is far below this value, so we reject that ρ=0.
Is the fit as good as the R2 and t-statistics indicate?
The t-statistics are biased upward so the fit is not nearly as good as the t-statistics might lead you to believe (which would be evident if we corrected for it). This is due to biased estimates of the residuals. So the the R2 and t-statistics give a misleading picture of how well the model fits the data.
3. Regress the change in the log of real consumption (C) on the change in the log of real disposable income (DI) and test for serial correlation using a Durbin-Watson test. The data are here (the data are quarterly, and span the time period 1947:Q1 - 2007:Q3).
The first step is to log both consumption and disposable income, then difference. The transformed variables are named dlogc and dlogy below (e.g. dlogy = log(di)-log(di(-1)). Then, regress dlogc on a constant and dlogy:
Here is the regression output:
The critical value of the Durbin-Watson statistic is approximately dL = 1.65 and dU = 1.69 (there are tables that go beyond T=100, but the value doesn't change much after 100 observations. I used the value for 100 observations from the table in the text). For a test of negative serial correlation the values are dL = 4.00-1.65 = 2.35 and dU = 4.00-1.69 = 2.31. The null of no positive serial correlation would not be rejected since the test statistic, 2.28, is above 1.65. the rejection point. Similarly, a null of no negative serial correlation cannot be rejected since 2.28 is less than 2.31, but it's a close call.
4. Explain why the Durbin-Watson statistic is always between 0 and 4. Also explain why the Durbin-Watson statistic is between 0 and 2 when there is positive serial correlation, between 2 and 4 when there is negative serial correlation, and equal to 2 when there is no correlation at all.
Start with the demonstration that d, the Durbin-Watson statistic, is approximately (2-2ρ) in large samples:

[Click on figure for larger version]
Now, since ρ must lie between -1 and 1, the Durbin-Watson statistic must lie between 0 and 4 [since 2-2(1)=0 and 2-2(-1)=4].
To see the last part, note that when ρ=0, d=2. Then, as ρ increases from 0 to 1, d moves from 2 to 0, and as ρ moves from 0 to -1, d moves from 2 to 4.
5. Continuing with the model we used in problem 2, test for the presence of fourth order serial correlation.
To do this problem, first regress m2 on a constant, rgdp, and tbillrate:
[Click on figure for larger version]Save the residuals (I saved the resid series as uhat). Regress the estimated residual on four lags of the estimated residual and the other variables in the model (no constant), i.e. regress uhatt on uhatt-1, uhatt-2, uhatt-3, uhatt-4, tbillrate, and rgdp:
[Click on figure for larger version]Finally, form the test statistic (T-P)R2, where T is the number of observations and P is the number of lags. This is distributed χ2(4). The critical value for this test at 5% level of significance is 9.49.
The test statistic is (191)(.972914) = 185.83, so reject that there is no serial correlation in the model.
6. Continuing with the model we used in problem 3, use the AR(1) procedure in EViews to correct the model for the presence of first-order serial correlation.
First, note that the test above did not indicate the presence of serial correlation, so technically there is no need for a correction. However, it's still worthwhile to do as a practice exercise.
To do this problem, just add the ar(1) command to the estimation shown in problem 3:
With the result:
Posted by Mark Thoma on Thursday, February 09, 2012 at 10:25 PM in Homework, Winter 2012 | Permalink | Comments (0)
Today:
Next Time:
Posted by Mark Thoma on Wednesday, February 08, 2012 at 07:31 PM in Lectures, Winter 2012 | Permalink | Comments (0)
[Note: Previous midterms are here.]
1. Assumptions required for estimates to be BLUE
2. Hypothesis testing:
a. t- tests (both one-sided and two-sided)
b. Joint hypotheses (F-Tests, Chi-square tests, etc.)i. Exclusion restrictions
ii. Linear combinations of parameters
3. Heteroskedasticity
a. What is heteroskedasticity?
b. How heteroskedasticity occur?
c. The consequences of estimating a heteroskedastic model with OLS
d. Testsi. LaGrange Multiplier Tests (Models 1, 2, and 3)
Model 1:
![]()
Model 2:
Model 3:ii. Goldfeld-Quandt test
iii. White's teste. Corrections/Estimation procedures
i. Feasible GLS
Model 1:
![]()
Model 2:
Model 3:iii. White’s correction
8. Autocorrelation
a. What is it and why might it occur?
b. Consequences of ignoring serial correlation and estimating with OLSi. Model with serially correlated errors (model 1 in class)
ii. Model including a lagged dependent variable (model 2 in class)
iii. Model with both a lagged dependent variable and serial correlated errors (model 3 in class)c. Tests for serial correlation
i. The Durbin-Watson test.
ii. Durbin's h-test.
iii. The Breusch-Godfrey test for higher order serial correlation.d. Corrections
i. Non-linear estimation
9. Testing for ARCH errors
10. Stochastic Regressors and Measurement Errors
a. Assessing the bias and consistency of an estimator
b. Errors in variablesi. Consequences of estimating with OLS when there are errors in measuring the right-hand side variables (i.e. errors in measuring the independent variables, the X's).
ii. Consequences of estimating with OLS when there are errors in measuring the dependent variable (i.e. in the measurement of Y).
Posted by Mark Thoma on Wednesday, February 08, 2012 at 07:31 PM in Review, Winter 2012 | Permalink | Comments (0)
Today:
Next Time:
Posted by Mark Thoma on Monday, February 06, 2012 at 07:39 PM in Lectures, Winter 2012 | Permalink | Comments (0)
Economics 421/521
Winter 2012
Solution to Homework 3
1. Using this data set, repeat the example from class for the first of the three cases we discussed, i.e. first regress the log of salary on a constant and the two variables proxying for experience, years and years2:
log(salary) = β0 + β1*years + β2*years2 + ut
Then, form the estimated residual squared (resid2) and perform the LM test for heteroskedasticity (note: resid is the estimated value of ut).
To do this problem, first read the data in from the Excel spread sheet:
Then, transform the data to get the log of salary and years squared:
Regress the log of salary on a constant, years, and years squared:
To do the test, we need the square of the residuals from this regression:
Regress the squared residuals on a constant, years, and years squared:
The results are:
The test statistic is
NR2 = 222*.0747 = 16.59
This is distributes Chi-Square with 2 degrees of freedom, so the critical value (5%) is 5.99. Therefore, the null of no heteroskedasticity is rejected.
2. To do this problem, first regress the log of salary on a constant, years, and years squared:
Next, square the residuals to get an estimate of the variance for each observation, uhatsq:
Regress this on a constant, years, and years squared (this is the model of the variance):
Next, we need the predicted value of the variance. To get the predicted value, we can simply subtract the estimated residuals from the left-hand side variables (this uses that actual Y = predicted Y + predicted error):
Or, you can get exactly the same values by using the forecast button on the regression output:
The next step is to ensure that all the estimates of the variance are positive. If any are negative, they should be replaced by their absolute values:
We need the square root of this value to use in transforming the original data:
Use this value to transform the data:
Use the transformed values to obtain BLUE estimates
The result is:
3. The test statistic is N*R2. In this case, N=30 and R2=.9878 so that the test statistic is 29.624. The 5% critical value for this test is 11.07 (the test is Chi-Square with 5 degrees of freedom, 5 because if the error is homoskedastic, then the coefficients on G, Y, their squared values, and their cross-product must all be zero). Because the test statistic exceeds the critical value, the null of homoskedasticity is rejected.
4. Here is the uncorrected regression from the last homework:
To do White's test, click the view button, then as follows:
Here's the result:
Looking at the line with Obs*R-squared, we see that the probability is les than .05, the significance level, hence the null of no heteroskedasticity is rejected.
To correct the model, run a regression as usual:
Click on options to bring up this screen and click the boxes as shown:
Hit OK to return to this screen:
Hit OK to get this output:
Notice that the coefficient estimates are identical (compare to the original values given above), White's correction fixes the standard errors after the regression is estimated, but it doesn't change the estimates.
5. What are the consequences of estimating an autoregressive model using OLS?
The coefficients remain unbiased, but OLS is inefficient, and OLS results in biased estimates of the standard errors (so the test statistics, e.g. t's and F's, are wrong)
Posted by Mark Thoma on Sunday, February 05, 2012 at 11:37 AM in Homework, Winter 2012 | Permalink | Comments (0)
Today:
Next Time:
Posted by Mark Thoma on Wednesday, February 01, 2012 at 07:06 PM in Lectures, Winter 2012 | Permalink | Comments (0)
Here is a brief outline of the project. We will talk more about this in class:
1. Statement of theory and hypothesis
2. Specification of the econometric model
3. Obtain data
4. Estimation of the econometric model and diagnostic tests
5. Test hypotheses
6. Forecasting or prediction
It will take longer than you think to do the estimation stage, so give yourself plenty of time. When the project is finished, it may or may not turn out the way you hoped. That's okay, you will not be graded on how clever you are at finding an interesting hypothesis to investigate, or on whether you find out anything particularly noteworthy when you are done, though you might. The goal is for you to illustrate that you know how to use the tools and techniques that we learn in class, and that is the basis for the evaluation of the projects.
Posted by Mark Thoma on Wednesday, February 01, 2012 at 07:06 PM in Empirical Project, Winter 2012 | Permalink | Comments (0)