% \documentclass[serif]{beamer} % Serif for Computer Modern math font.
\documentclass[serif, handout]{beamer} % Handout mode to ignore pause statements
\hypersetup{colorlinks,linkcolor=,urlcolor=red}


\usefonttheme{serif} % Looks like Computer Modern for non-math text -- nice!
\setbeamertemplate{navigation symbols}{} % Suppress navigation symbols
% \usetheme{Berlin} % Displays sections on top
\usetheme{Frankfurt}  % Displays section titles on top: Fairly thin but still swallows some material at bottom of crowded slides
%\usetheme{Berkeley}

\usepackage[english]{babel}
\usepackage{amsmath} % for binom
% \usepackage{graphicx} % To include pdf files!
% \definecolor{links}{HTML}{2A1B81}
% \definecolor{links}{red}
\setbeamertemplate{footline}[frame number] 

\mode<presentation>

\title{Instrumental Variables\footnote{See last slide for copyright information.}}
\subtitle{STA431 Winter/Spring 2015}
\date{} % To suppress date

\begin{document}

\begin{frame}
  \titlepage
\end{frame}

\begin{frame}
\frametitle{The problem}
%\framesubtitle{} 
\begin{itemize}
    \item Double measurement solves the measurement error identifiability problem. \pause
    \item But sometimes two independent measurements are not available.  \pause
    \item Often, the data are already collected. \pause
    \item Maybe collected for some other purpose. \pause
    \item For example, companies might be required to provide information about water pollution, but they're not going to measure it twice.
\end{itemize}
\end{frame}


\begin{frame}
\frametitle{Definition}
%\framesubtitle{Instrumental variable} 
Definition: An \emph{instrumental variable} for an explanatory variable is an observable response variable that has  \pause
\begin{itemize}
    \item Non-zero covariance with the explanatory variable. \pause
    \item Zero covariance with the error term of the regression. \pause
%    \item Zero covariance with any other variable in the model.
\begin{center}
\includegraphics[width=2.2in]{InstrumentalPath2}
\end{center} \pause
    \item Could have $X \rightarrow Z$, $Z \rightarrow X$, or something more complicated.
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Example of an instrumental variable} \pause
%\framesubtitle{} 
{\footnotesize 
\begin{itemize}
    \item Participants in the survey are real estate agents, nationwide. \pause
    \item $X$ is income. \pause
    \item $Y$ is credit card debt. \pause
    \item $Z$ is median selling price of a home in the sales area. \pause
    \item The instrumental variable is $Z$. \pause
\end{itemize}
} % End size
\begin{center}
\includegraphics[width=2.2in]{InstrumentalPath3}
\end{center}
\end{frame}

\begin{frame}
\frametitle{Identifiability}
%\framesubtitle{ } 
\begin{center}
\includegraphics[width=2in]{InstrumentalPath2}
\end{center} \pause
{\footnotesize 
\begin{itemize}
    \item Consider the covariance matrix only. \pause
    \item All variables are invisibly centered. \pause
\end{itemize}

\begin{eqnarray*}
    Y_i & = & \beta_1 X_i + \epsilon_i \\
    W_i & = & X_i + e_i 
\end{eqnarray*}  \pause

\vspace{3mm}

$V\left( \begin{array}{c} X_i \\ Z_i \end{array} \right)
= \left( \begin{array}{c c}
        \phi_{11} & \phi_{12}  \\
                  & \phi_{22}
        \end{array} \right)$,
$Var(\epsilon)=\psi$, $Var(e)=\omega$

} % End size
\end{frame}

\begin{frame}
\frametitle{Covariance structure equations}
% \framesubtitle{All we really care about is $\beta_1$}
\begin{eqnarray*}
    Y_i & = & \beta_1 X_i + \epsilon_i \\
    W_i & = & X_i + e_i 
\end{eqnarray*} 
$V\left( \begin{array}{c} X_i \\ Z_i \end{array} \right)
= \left( \begin{array}{c c}
        \phi_{11} & \phi_{12}  \\
                  & \phi_{22}
        \end{array} \right)$,
$Var(\epsilon)=\psi$, $Var(e)=\omega$ \pause

\vspace{8mm}
Checking the parameter count rule \ldots \pause

\begin{displaymath} 
    \boldsymbol{\Sigma = }
    \left( \begin{array}{c c  c }
    \sigma_{11} & \sigma_{12} & \sigma_{13}  \\ 
     &  \sigma_{22}  & \sigma_{23}  \\
     &      &  \sigma_{33}  \\
        \end{array} \right) = \pause
\begin{array}{c|ccc}
  & W & Z & Y   \\  \hline 
W & \phi_{11} + \omega & \phi_{12} & \beta_1 \phi_{11}  \\ 
Z &  &  \phi_{22}  & \beta_1 \phi_{12}  \\
Y &  &  & \beta_1^2 \phi_{11} + \psi   \\
\end{array} 
\end{displaymath}
\end{frame}

\begin{frame}
\frametitle{A miracle (Phillip Wright, 1928)} \pause
\framesubtitle{} 
\begin{itemize}
    \item Other things influence credit card debt besides income.  \pause
    \item And they are no doubt correlated with income. \pause
    \item The deadly problem of omitted variables. \pause
    % Like lack of medical insurance -> debt
    \item Remember, the $\epsilon$ in a regression means ``everything else." \pause
\end{itemize}

\begin{center}
\includegraphics[width=2.5in]{InstrumentalPath4}
\end{center}
\end{frame}

\begin{frame}
\frametitle{Covariance structure equations are \emph{mostly} the same}
\framesubtitle{Six equations in seven unknowns}  \pause
\begin{columns}  
\column{0.5\textwidth}
\includegraphics[width=2in]{InstrumentalPath4}
\column{0.5\textwidth}
\begin{eqnarray*}
    Y_i~~~~ & = & \beta_1 X_i + \epsilon_i      \\
    W_i~~~~ & = & X_i + e_i                     \\
    V\left( \begin{array}{c} X_i \\ Z_i \\ \epsilon_i \end{array} \right) & = &
    \left( \begin{array}{ccc}
        \phi_{11} & \phi_{12} & \kappa \\
                  & \phi_{22} &    0   \\
                  &           &   \psi
        \end{array} \right)                 \\  
\end{eqnarray*} 
\end{columns} \pause

\begin{displaymath} 
    \boldsymbol{\Sigma = }
    \left( \begin{array}{c c  c }
    \sigma_{11} & \sigma_{12} & \sigma_{13}  \\ 
     &  \sigma_{22}  & \sigma_{23}  \\
     &      &  \sigma_{33}  \\
        \end{array} \right) =  \pause
\begin{array}{c|ccr}
  & W & Z & Y   \\  \hline 
W & \phi_{11} + \omega & \phi_{12} & \beta_1 \phi_{11} + {\color{blue}\kappa}  \\ 
Z &  &  \phi_{22}  & \beta_1 \phi_{12}  \\
Y &  &  & \beta_1^2 \phi_{11} + {\color{blue}2\beta_1\kappa} +  \psi   \\
\end{array} 
\end{displaymath} \pause
We only care about $\beta_1$ anyway.
\end{frame}

\begin{frame}
\frametitle{Generalizing \ldots}
%\framesubtitle{} 
{\scriptsize 
\begin{displaymath} 
    \boldsymbol{\Sigma = }
    \left( \begin{array}{c c  c }
    \sigma_{11} & \sigma_{12} & \sigma_{13}  \\ 
     &  \sigma_{22}  & \sigma_{23}  \\
     &      &  \sigma_{33}  \\
        \end{array} \right) =
\begin{array}{c|ccr}
  & W & Z & Y   \\  \hline 
W & \phi_{11} + \omega & \phi_{12} & \beta_1 \phi_{11} + {\color{blue}\kappa}  \\ 
Z &  &  \phi_{22}  & \beta_1 \phi_{12}  \\
Y &  &  & \beta_1^2 \phi_{11} + {\color{blue}2\beta_1\kappa} +  \psi   \\
\end{array} 
\end{displaymath} \pause
} % End size

 
\begin{itemize}
{\footnotesize
    \item Matrix version is straightforward. \pause
    \item The usual rule in Econometrics is (at least) one instrumental variable for each explanatory variable. \pause
    \item The $p \times p$ matrix of covariances between $\mathbf{X}$ and $\mathbf{Z}$ must have an inverse. \pause
%    \item[] 
    \item Instrumental variables are related to $\mathbf{X}$ for reasons that are \emph{separate} from why $\mathbf{X}$ is related to $\mathbf{Y}$. \pause
    \item For example, does academic ability contribute to higher salary?  \pause
} % End size
% {\footnotesize  % Should not be necessary to start size again.
        \begin{itemize}
            \item Study adults who were adopted as children. \pause
            \item $X$ is academic ability. \pause
            \item $Y$ is salary at age 40. \pause
            \item $W$ is measured IQ. \pause
            \item $Z$ is birth mother's IQ (there are studies like this). 
        \end{itemize}
% } % End size
\end{itemize}

\end{frame}

\begin{frame}
\frametitle{Watch Out! Independence of the instrumental variable and $\epsilon$ is critical.} \pause
% \framesubtitle{} 
{\footnotesize
\begin{columns}  
\column{0.5\textwidth}
$Y_2$ is an instrumental variable.
\begin{center}
\includegraphics[width=1.8in]{InstrumentalPath5}
\end{center} \pause
\vspace{2mm}
\column{0.5\textwidth}
$Y_2$ is \emph{not} an instrumental variable.
\begin{center}
\includegraphics[width=1.8in]{InstrumentalPath6}
\end{center} \pause
\end{columns}
\vspace{2mm}

$E\{Y_2\epsilon_1\} \pause
= E\{(\beta_2X + \epsilon_2)\epsilon_1\}  \pause
= \beta_2 E\{X\epsilon_1\} + E\{\epsilon_1\}E\{\epsilon_2\}  \pause
= \beta_2\kappa$.
} % End size
\end{frame}

\begin{frame}
\frametitle{The second model}
\framesubtitle{All variables are centered} 
{\footnotesize
\begin{columns}  
\column{0.5\textwidth}
\begin{center}
\includegraphics[width=1.8in]{InstrumentalPath6}
\end{center}
\column{0.5\textwidth}
\begin{eqnarray*} 
   W_{i\mbox{~}} & = & X_i + e_i            \\  
   Y_{i,1}          & = & \beta_1 X_i + \epsilon_{i,1}  \\  
   Y_{i,2}          & = & \beta_2 X_i + \epsilon_{i,2}  \\ 
\end{eqnarray*}
\end{columns} \pause
 \vspace{2mm}
\begin{displaymath} 
    \boldsymbol{\Sigma} = 
    \left( \begin{array}{c c  c }
    \sigma_{11} & \sigma_{12} & \sigma_{13}  \\ 
     &  \sigma_{22}  & \sigma_{23}  \\
     &      &  \sigma_{33}  \\
        \end{array} \right) = \pause
\begin{array}{c|ccc}
    & W & Y_1 & Y_2   \\  \hline 
W   & \phi+\omega & \beta_1\phi + \kappa & \beta_2\phi  \\ 
Y_1 &  &  \beta_1^2 \phi + 2 \beta_1\kappa + \psi_1  & \beta_2(\beta_1\phi+\kappa) \\
Y_2 &  &  & \beta_2^2 \phi + \psi_2   \\
\end{array} 
\end{displaymath}
} % End size
% There are a zillion interesting questions about this. For example, what parameters are identifiable, and infinitely many (beta_1,kappa) pairs satisfying $\beta_1\phi + \kappa = \sigma_{12}$ yield the same covariance matrix. An even nicer way to express it is sigma12sigma13beta1 + sigma23kappa = sigma12sigma23. Or better, kappa as a function of beta1.
\end{frame}

\begin{frame}
\frametitle{$\beta_1$ is not identifiable}
%\framesubtitle{All variables are centered} 
{\scriptsize
\begin{columns}  
\column{0.35\textwidth}
\begin{center}
\includegraphics[width=1.3in]{InstrumentalPath6}
\end{center}
\column{0.65\textwidth}
\begin{displaymath} 
    \boldsymbol{\Sigma} = 
\begin{array}{c|ccc}
    & W & Y_1 & Y_2   \\  \hline 
W   & \phi+\omega & \beta_1\phi + \kappa & \beta_2\phi  \\ 
Y_1 &  &  \beta_1^2 \phi + 2 \beta_1\kappa + \psi_1  & \beta_2(\beta_1\phi+\kappa) \\
Y_2 &  &  & \beta_2^2 \phi + \psi_2   \\
\end{array} 
\end{displaymath}
\end{columns} \pause
 \vspace{2mm}
} % End size
\begin{itemize}
    \item Infinitely many $(\beta_1,\kappa)$ pairs yield the same covariance matrix. \pause
    \item $\beta_1$ could be positive, negative or zero and you can't tell. \pause
    \item $\beta_1$ and $\kappa$ conceal one another.
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Conclusions}
%\framesubtitle{} 
\begin{itemize}
    \item Instrumental variables can potentially solve the problems of omitted variables and measurement error at the same time. \pause
    \item The recipe is one instrumental variable for each latent explanatory variable. \pause
    \item If you can find them. \pause
    \item If there is correlation between an explanatory variable and the error term of the regression (because of omitted variables), an additional response variable that is influenced by that explanatory variable is \emph{not} an instrumental variable. \pause
    \item The ultimate instrumental variable is an experimental manipulation. \pause
    \item Sometimes it's a ``natural experiment," like tax rates. \pause (Tobacco taxes, smoking and health.)
\end{itemize}
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\begin{frame}
\frametitle{Copyright Information}

This slide show was prepared by  \href{http://www.utstat.toronto.edu/~brunner}{Jerry Brunner},
Department of Statistical Sciences, University of Toronto. It is licensed under a 
\href{http://creativecommons.org/licenses/by-sa/3.0/deed.en_US}
     {Creative Commons Attribution - ShareAlike 3.0 Unported License}. Use any part of it as you like and share the result freely. The \LaTeX~source code is available from the course website:
\href{http://www.utstat.toronto.edu/~brunner/oldclass/431s13} {\small\texttt{http://www.utstat.toronto.edu/$^\sim$brunner/oldclass/431s31}}

\end{frame}


\end{document}






\begin{frame}
\frametitle{Definitions}
\framesubtitle{Applying to latent variable regression}
{\footnotesize 
\begin{itemize}
    \item Definition: A \emph{pure measurement} of a latent variable is an observable variable equal to the latent variable plus a constant plus an error term. The error term must have zero covariance with all other error terms and all explanatory  variables in the model.
\begin{center}
\includegraphics[width=2in]{InstrumentalPath1}
\end{center}
    \item Measurements in the double measurement design need not be pure measurements, because measurement error terms within sets can be correlated.
    \item Pure measurements are sometimes called ``indicators" (for example by Bollen, 1987).
\end{itemize}
} % End size

\end{frame}













