 \documentclass[11pt]{article}
 \usepackage{geometry}                % See geometry.pdf to learn the layout options. There are lots.
 \geometry{letterpaper}                   % ... or a4paper or a5paper or ... 
 %\geometry{landscape}                % Activate for for rotated page geometry
 %\usepackage[parfill]{parskip}    % Activate to begin paragraphs with an empty line rather than an indent
 \usepackage{graphicx}
 \usepackage{amssymb}
 \usepackage{epstopdf}
 \DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .tif`.png}
 
 \title{Brief Article}
 \author{The Author}
 %\date{}                                           % Activate to display a given date or no date
 
 \begin{document}
 %\maketitle
 %\section{}
 %\subsection{}
\noindent{\bf BOSTON COLLEGE} \\
 Department of Economics \\
 EC 771: Econometrics \\
 Spring 2012 \\
 Prof. Baum, Mr. Simeonov 
 
 \bigskip
\noindent {\sc Problem Set 2: due Wednesday 22  February at classtime}
 

\medskip\noindent
% DM 2.13
1. Consider the two regressions
 \begin{eqnarray*}
y = \beta_1 x_1 + \beta_2 x_2 + \beta_3 x_3 + u \\
y = \alpha_1 z_1 + \alpha_2 z_2 + \alpha_3 z_3 + u
\end{eqnarray*}
where $z_1 = x_1 - 2 x_2$, $z_2 = x_2 + 4 x_3$ and $z_3 = 2 x_1 - 3 x_2 + 5 x_3$. Let $\mathbf{X} = [ x_1~ x_2~ x_3]$ and $\mathbf{Z} = [z_1~ z_2 ~z_3]$. Show that the columns of $\mathbf{Z}$  can be expressed as linear combinations of the columns of $\mathbf{X}$, that is, $\mathbf{Z = X A}$ for some $3 \times 3$ matrix $\mathbf{A}$. Find the elements of this matrix.

Show that the matrix $\mathbf{A}$ is invertible by showing that the columns of $\mathbf{X}$ are linear combinations of the columns of $\mathbf{Z}$. Find the elements of $\mathbf{A^{-1}}$. Show that the two regressions give the same fitted values and residuals.

Precisely how is the OLS\ estimate $b_1$ related to the OLS\ estimate $a_1$?
 
\medskip\noindent
% DM 2.23
2. Use the dataset {\tt http://fmwww.bc.edu/ec-p/data/greene2008/tbrate} in Stata for this exercise. It contains data (1950q1-1996q4) on three series: $r_t$, the three-month Treasury bill rate, $\pi_t$, the rate of inflation and $y_t$, the log of real GDP. For the period 1950q4--1996q4, run the regression 
\[
\Delta r_t = \beta_1 + \beta_2 \pi_{t-1} + \beta_3 \Delta y_{t-1} + \beta_4 \Delta r_{t-1} + \beta_5 \Delta r_{t-2} + u_t
\]
(Hint: use the Stata timeseries operators {\tt D.} and {\tt L.}). Plot the residuals and fitted values against time (hint: {\tt predict} and {\tt tsline}). Regress the residuals on the fitted values and a constant. What do you learn from this second regression? Now regress the fitted values on the residuals and a constant. What do you learn from this third regression?

\medskip\noindent
% DM 2.24
3. For the same sample period, regress $\Delta r_t $ on a constant, $\Delta y_{t-1} $, $\Delta r_{t-1}$ and $\Delta r_{t-2} $. Save the residuals from this regression (call them $\hat{e}_t$). Then regress $\pi_{t-1}$ on the same regressors. Save the residuals from this regression and call them $\hat{v}_t$. Now regress $\hat{e}_t$ on $\hat{v}_t$. How are the estimated coefficients and residuals from this last regression related to anything that you obtained when you ran the regression in exercise 3?

\medskip\noindent
% DM 3.6
4. For any pair of random variables $b_1, b_2$, show, by using the fact that the covariance matrix of $\mathbf{b} = (b_1 ~b_2)$  is positive semidefinite, that
\[ 
(Cov(b_1,b_2))^2 \le Var(b_1) Var(b_2)
\]
 and show that the correlation between $b_1,b_2$ must lie between $-1, +1$. 
 
 \medskip\noindent
% DM 3.20
5. Consider the linear regression model
\[
y_t = \beta_1 + \beta_2 x_{t2} + \beta_3 x_{t3} + u_t
\]
Explain how you could estimate this model subject to the restriction that $b_2 + b_3 = 1$ by running a regression that imposes the restriction. Also explain how you could estimate the unrestricted model in such a way that the value of one of your coefficients would be zero if the restriction held exactly in your data.

\medskip\noindent
6. Say we have a set of quarterly observations for a number of whole years on a number of variables, arrayed in a $T \times m$ matrix. We want to compute the annual averages of those variables as a new matrix, which will be $T/4 \times m$.\\
a. Write down the linear algebra solution to this problem. \\
b. Write down the Mata solution to this problem for, say, a $24 \times 6$ matrix of draws from the uniform distribution. (NB: Mata is Stata's matrix language. See the Mata programming language slideshow on {\tt http://fmwww.bc.edu/ec/res.info.php\#stata}). Hint: you only need a couple of Mata's built-in functions for this task.


 \medskip\noindent
7. Using Stata routine \texttt{ivreg2} ({\tt ssc install ivreg2}, {\tt ssc install ranktest} if needed; full details on {\tt ivreg2} in Baum--Schaffer--Stillman papers and {\tt help ivreg2}): 

\begin{verbatim}
use http://fmwww.bc.edu/ec-p/data/hayashi/griliches76
xi i.year
\end{verbatim}

a. Estimate the regression of log wage (lw) on experience (expr), years of schooling (s) and iq, considering iq as potentially mismeasured; instrument the equation with age, kww and med (mother's years of education). What is the identification status of this equation?

b. These data are pooled cross-section time-series (but not a panel). Introduce time effects (the year dummies) and reestimate the equation. What effect has this had on the model? Are they jointly significant? What do you conclude?

c. Reestimate the equation of part b using robust standard errors. What effect does this have on the estimated model?

d. Reestimate the equation of part b using generalized method of moments (IV-GMM) with robust standard errors. What effect does this have on the model?  What assumptions have been relaxed vis-\`a-vis the model estimated in part b? How do you interpret the Hansen $J$ statistic for this model? How do you interpret the Kleibergen--Paap  rk statistic?

e. Use the IV-GMM\ {\tt endog} option (the ``C'' or GMM distance test) to test a subset of the orthogonality conditions: the exogeneity/endogeneity of $s$ (years of schooling). What do you conclude?

f. Reestimate the model treating $s$ as endogenous. What does the Hansen J\ test signify in this context?
 
 
 \end{document}  
 
 
  \medskip
 \noindent 
 % DM 2.8
 1. Given the three vectors $x_1, x_2, x_3$:
 \[
\left(
\begin{array}{ccc}
1  & 0   & 1  \\
1  & 4  & 0   \\
1 & 0 & 1 \\
1  & 4  & 0 \\
1 & 0 & 1    
\end{array}
\right)
\]
Show that any vector $z = b_1 x_1 + b_2 x_2$ in the subspace $\delta(x_1,x_2)$ also belongs to the subspace  $\delta(x_1,x_3)$ and  $\delta(x_2,x_3)$, where the subspace $\delta(\cdot)$ of $\mathbb{R}^3$ is the vector space spanned by the arguments. Give explicit formulas for $z$ as a linear combination of $x_1,x_3$ and of $x_2, x_3$.
