% \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{Structural Equation Models\footnote{See last slide for copyright information.}}
\subtitle{STA431 Spring 2015}
\date{} % To suppress date

\begin{document}

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

\begin{frame}
\frametitle{Structural Equation Models}
%\framesubtitle{} 
  \begin{itemize}
    \item An extension of multiple regression. \pause
    \item Can incorporate measurement error. \pause
    \item More than one regression-like equation. \pause
    \item All the variables are random. \pause
    \item An independent variable in one equation can be the dependent variable in another equation.
  \end{itemize}
\end{frame}

\begin{frame}
\frametitle{Measurement Error}
%\framesubtitle{} 
\begin{itemize}
    \item What you see is not what you really want. \pause
    \item \emph{Latent variable}:  A random variable whose values cannot be directly observed. \pause
    \item Contrast with \emph{Observable variable}. \pause
    \item Usually, interest is in relationships between latent variables. \pause
    \item But all you can see are the observable variables.
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{Doubly Labeled Water }
\framesubtitle{Participants drink water that is enriched with respect to two isotopes, and urine samples allow the measurement of energy expenditure (Graphics used without permission).} 
\begin{center}
\includegraphics[width=3.8in]{CarrollEtAl}
\end{center}
\end{frame}

\begin{frame}
\frametitle{Path diagrams}
%\framesubtitle{} 
\begin{center}
\includegraphics[width=3.8in]{PainPath}
\end{center}
\end{frame}

\begin{frame}
\frametitle{Comments}
%\framesubtitle{} 
\begin{itemize}
    \item Latent variables are in ovals, observable variables are in boxes. 
    \item Error terms seem to come from nowhere -- often not shown. 
    \item There is real modeling here. Lots of theoretical input is required. 
    \item These are \emph{causal} models: Models of influence. 
    \item But the data are usually observational. 
    \item Omitted variables can cause problems -- more later.
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Path diagrams correspond to systems of equations}
%\framesubtitle{} 
\begin{columns}  
\column{0.5\textwidth}
\includegraphics[width=2.2in]{PainPath}
\column{0.5\textwidth}
{\scriptsize
\begin{eqnarray*}
    Y_{i,1} & = & \beta_{0,1} + \beta_1 X_i + \epsilon_{i,1} \\
    Y_{i,2} & = & \beta_{0,2} + \beta_2 Y_{i,1} + \epsilon_{i,2} \\ 
    Y_{i,3} & = & \beta_{0,3} + \beta_3 X_i + \beta_4 Y_{i,2} + \epsilon_{i,3} \\ 
    Y_{i,4} & = & \beta_{0,4} + \beta_5 Y_{i,2} + \beta_6 Y_{i,3} + \epsilon_{i,4} \\ 
    D_{i,1} & = & \lambda_{0,1} + \lambda_1 Y_{i,1} + e_{i,1} \\
    D_{i,2} & = & \lambda_{0,2} + \lambda_2 X_i + e_{i,2} \\
    D_{i,3} & = & \lambda_{0,3} + \lambda_3 Y_{i,2} + e_{i,3} \\
    D_{i,4} & = & \lambda_{0,4} + \lambda_4 Y_{i,3} + e_{i,4} \\
    D_{i,5} & = & \lambda_{0,5} + \lambda_2 X_i + e_{i,5} \\
    D_{i,6} & = & \lambda_{0,6} + \lambda_5 Y_{i,4} + e_{i,6} \\
\end{eqnarray*} 
} % End size
\end{columns} \pause

Multivariate normal model is standard.
\end{frame}

\begin{frame}
\frametitle{Regression with observable variables}
%\framesubtitle{} 
\begin{displaymath}
    Y_i = \beta_0 + \beta_1 X_{i,1} + \beta_2 X_{i,2} + \beta_3 X_{i,3} + \epsilon_i
\end{displaymath}

\vspace{4mm}

\begin{center}
\includegraphics[width=3.5in]{RegressionPath}
\end{center}
\end{frame}



\section{Background}

\begin{frame}
\frametitle{Tools}
%\framesubtitle{} 
\begin{itemize}
    \item Scalar variance-covariance calculations \pause
    \item Matrices \pause
    \item Random vectors \pause
    \item Multivariate normal \pause
    \item Maximum likelihood \pause
    \item A little large-sample theory \pause
    \item SAS
\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. Except for the picture taken from Carroll et al.'s \emph{Measurement error in non-linear models}, 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:
\vspace{3mm}

\href{http://www.utstat.toronto.edu/~brunner/oldclass/431s15} {\small\texttt{http://www.utstat.toronto.edu/$^\sim$brunner/oldclass/431s15}}

\end{frame}


\end{document}

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


{\LARGE
\begin{displaymath}
    
\end{displaymath} }


\begin{frame}
\frametitle{}
%\framesubtitle{} 
\begin{itemize}
    \item 
    \item 
    \item 
\end{itemize}
\end{frame}



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



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