\documentclass[dvipsnames, pdflatex,slidecentered]{beamer} %add red inside []
\usepackage{xcolor,colortbl}
\usepackage{amsmath,epsfig,latexsym}
\usepackage{hyperref}

%  options  [handout]

%  There is a VERY rich set of possible
%  styles of presentations and color themes.  See the
%  beamer documentation for a full list of possibilities.
\usetheme{default}  % JuanLesPins  Rochester
                   %  Berkeley  Palo Alto    with sidebar and top
                   % Goettingen  Marburg     with sidebar
                   %  Copenhagen  Luebeck  Warsaw
                   % Antibes with overlays
\useinnertheme{rounded}
\usecolortheme{rose} %crane %lily
%\usefonttheme{structuresmallcapsserif}


\usepackage{pgfarrows}
%  Don't need to load the pgf package, but it has
%  has itself some packages you might want, such as
%  pgfarrows,,pgfnodes,pgfautomata,pgfheaps
%  See the pgf documentation.


\usepackage{amsmath,amssymb}

% \beamertemplatetransparentcovereddynamic
                % overlays that are upcoming are transparent, in
                % a manner that depends upon how far ahead  they are.



%\usepackage{SweaveSlides}
\title[Stat 849'F09]{Stat 849: Theory and Application of Regression and Analysis of Variance
  I}
\author[S. Kele\c{s}]{S\"und\"uz Kele\c{s}}
\institute[UW]{Department of Statistics\\
 Department of Biostatistics and Medical Informatics\\
University of Wisconsin, Madison}
\date[]{September 2, 2009}


%\mode<presentation>
%{ \usetheme{boxes} }



\begin{document}

\frame{\titlepage}

\begin{frame}
\frametitle{Objectives}

\begin{itemize}

\item This is the first course of a sequel: Stat 849, Stat 850.

\item Stat 849 covers theory and application of linear regression
and generalized linear models (briefly).

\item Stat 850 (Spring 2009) will focus on the design of
experiments (various randomization methods and designs) .

\item Everything will be presented by matrix algebra and we will
cover proofs or sketches of proofs of fundamental results.

\item \textcolor{red}{Topics} (briefly, see syllabus for more details):
Least squares estimators (derivations and properties); Gaussian
linear Model (estimation); Hypothesis testing in the linear model
(single parameter, linear combinations of parameters); Analysis of
variance; Linear regression diagnostics; Methods for dealing with
multi collinearity; Model/variable selection in linear regression
models; Introduction to generalized linear models.



\item Practical data analysis using \texttt{R}. Producing
lab reports, analysis results.

\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Structure of the course}
\begin{itemize}
\item \textbf{Lectures.} will be mostly theoretical/methodological with some applied examples using \texttt{R}.
Will include introduction to concepts, mathematical details, and
illustrating examples.

\item \textbf{Discussions.} will aid with learning \texttt{R}, provide
concise summary of the lectures and provide detailed examples.

\item Our TA \textbf{Hao Zheng}.

\end{itemize}
\end{frame}


\begin{frame}
\frametitle{Logistics} \small
\begin{itemize}

\item <+-> \textbf{Course website.} Make sure to check for updates under the announcements link. Typically,
these announcements will be emailed to the class list, but might get
caught in your spam or you might overlook them. Please check to see
if your answer might already be on the website before emailing to me
or the TA.

\item <+-> \textbf{Grading.}

\begin{itemize}

\item <+-> \textbf{Homeworks.}  Bi-weekly assignments. \textcolor{red}{Email your questions
regarding the assignments to TA and cc me}. You will write a lab
report for each homework. See the website for a sample. If the
homework does not include any data analysis type of problems, the
format in the course website will obviously not apply.

\item <+-> \textbf{Midterms.} Two of them, during lecture time.


\end{itemize}

\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Logistics}
\begin{itemize}
\item \textbf{Grading (cont'd).}
\begin{itemize}
\item \textbf{Final project.} Either a linear regression analysis of a dataset of your choice or a
review paper.  Choose something that \textit{really} interests you.
The web is full of data sources.

\textcolor{purple}{$\Longrightarrow$} \textit{Examples of projects
from previous years:} Tornadoes in Wisconsin; Faculty salaries.

\textcolor{purple}{$\Longrightarrow$} Review papers need to include
a replication of the simulations or data analysis. Often students
design their own simulations to assess different aspects of the
proposed methods or apply the method to another dataset.

\textcolor{purple}{$\Longrightarrow$} Final report and poster
session open to faculty and students in the Departments of
Statistics and of Biostatistics and Medical Informatics. Date of the
poster presentations is fixed. It takes approximately 3-3.5 hours.
You need to be there approximately the whole time (This is the
final!). In the case of conflicts, notify me.

\textcolor{purple}{$\Longrightarrow$} You will also write a half a
page review of another poster to which you will be randomly
assigned.
\end{itemize}
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Logistics}
\begin{itemize}
\item \textit{Required and optional books.} The textbook has a good presentation
of the theory but lacks any real applications. Many pointers to web
resources will be included on the class web page. The chapters that
are relevant should be evident from the course of the lectures.

\item  Copies of these books are on reserved in the Wendt
Library.
\end{itemize}

\end{frame}


\begin{frame}[label = summary]
\frametitle{Required background}
\begin{itemize}
\item \textbf{Basic statistics and probability.} Multivariate normal
distribution; joint, conditional distributions; law of large
numbers; central limit theorem; estimation; bias; variance;
covariance; maximum likelihood; hypothesis testing; confidence
intervals, distribution of quadratic forms.

\item \textbf{Linear algebra.} Matrix algebra, linear transformations,
matrix inverse, eigenvalues, eigenvectors, quadratic forms,
determinants.

\item \textbf{Who is in this class?}
\hyperlink{people}{\beamergotobutton{}}

\item Auditors: Pls email me so that I can add you to the class
email list.
\end{itemize}
\pause

\underline{Suggested readings:} Chapters 1 \& 2 and Appendix A of
Seber and Lee.

\pause

No \texttt{R} background is required. Discussion sections will cover
some introductory \texttt{R} but overall learning \texttt{R} will be
a \textit{self-learning} process for you.
\end{frame}


\begin{frame}
\frametitle{Motivation}

%We know why stat grads are here.

\textbf{``}As basic to statistics as the Pythagorean theorem is to
geometry, regression analysis is a statistical technique for
investigating and modeling the relationship between variables. With
far-reaching applications in
 almost every field, regression analysis is used in \textbf{engineering}, \textbf{the physical
and chemical sciences}, \textbf{economics}, \textbf{management},
\textbf{life and biological sciences}, and \textbf{the social
sciences}. \textbf{''}
\end{frame}

\begin{frame}

\frametitle{General concepts}
\begin{itemize}
\item Regression analysis is a way of exploring relationships
(associations) that may  exist between variables.

\item Regression analysis is concerned with a specific feature of
the conditional distribution of the \textcolor{red}{dependent
variable} $Y$ on \textcolor{red}{covariates} (explanatory
variables) $X$.

\item We will mainly talk about modeling $E[Y \mid X]$. However, note that
this is just one feature of the distribution. Other examples
include median regression and quantile regression.

\end{itemize}
\end{frame}

\begin{frame}
\frametitle{General concepts}

Purposes of regression modeling include

\begin{enumerate}
\item summarizing relationships between variables of interest: income
and number of years of education; height and weight of people;
temperature and output of an industrial product; cell conditions and
abundance of gene products; clinical variables and disease status,
etc...

\item model/variable selection,

\item predicting future values.

\end{enumerate}

\end{frame}


\begin{frame}
\frametitle{Linear regression models [1805-now]} Linear regression
attempts to model the relationship between two or more variables by
fitting a \textit{linear} equation to observed data.

One variable is considered to be a \textbf{dependent variable}
(response) and the others are considered to be \textbf{explanatory
variables} (covariates).

%\begin{verbatim}
%> set.seed(1)
%> x = rgamma(200, 150, 2)
%> y = 0.5 + 1.1*x + rnorm(200, 0, 5)
%> lm1 = lm(y ~ x)
%> postscript("linear_regression.eps", horizontal = T)
%> plot(x, y, xlab = "weight in kg", ylab = "height in cm",
%       main = "scatter plot of heights vs weights data",
%       col = "purple")
%> lines(x, lm1$fitted, col = "red")
%> dev.off()
%\end{verbatim}

\begin{figure}
\begin{center}
\vspace{-0.5cm}
\includegraphics[angle=0,scale=0.3]{linear_regression}
\end{center}
\end{figure}

\end{frame}

\begin{frame}
\frametitle{Simple linear regression model}

\textbf{y-axis:} Dependent variable, response, outcome.

\textbf{x-axis:} Covariate, explanatory variable, feature.

Simple linear regression model:

\[ Y_i = \beta_0+\beta_1X_i+\mbox{Error}_i, \quad i=1,\cdots,n.\]

In this context, error does not mean mistake but is a statistical
term representing random fluctuations.

%\pause \textcolor{purple}{$\Longrightarrow$} Simple but very
%powerful, even in this "omics" era!

\end{frame}

\begin{frame}
\frametitle{Introduction to \texttt{R}}

\begin{itemize}
\item R is an open source statistical programming language. Not
really low level as fortran and C, more like matlab.

\item
Website for R project is \url{r-project.org}. \item CRAN:
Comprehensive R Archive Network. Source code and precompiled
binary distributions for Linux, Windows, MacOS, and many more
things (documentation, contributed packages etc...)
%\item Related
%to R: Bioconductor project and Omega Project.
\end{itemize}
\end{frame}


\begin{frame}
\frametitle{Getting started}

Latest released version is  R version R-2.9.2.tar.gz  from CRAN
(\url{http://cran.us.r-project.org/}).

\textcolor{red}{Linux:} debian, mandrake, redhat, suse, vinelinux.

\textcolor{red}{Windows:} Download  R version 2.9.2-win32.exe,
double click on icon and follow the instructions.

\textcolor{red}{MacOSX:} R-2.9.2.dmg .


\texttt{R FAQ} will probably have answers to most of your questions.


\textbf{On statistics linux machines:} Command
\texttt{/unsup/R/bin/R} should start R.

You can rename this by adding the following line to your
.cshrc.local file: \texttt{alias R /unsup/R/bin/R}.


\end{frame}



\begin{frame}
\frametitle{\texttt{R} Basics}
\begin{itemize}
\item \textcolor{red}{Start}: Type R or whatever you named it on
linux, click on the icon on windows. \item \textcolor{red}{Quit}:
\texttt{q()}. \item \textcolor{red}{Save}: \texttt{save.image}.
\item \textcolor{red}{Working directory}: \texttt{getwd},
\texttt{setwd}. \item \textcolor{red}{List objects}: \texttt{ls}.
\item \textcolor{red}{Read in data files}: \texttt{read.table}.
\end{itemize}
R for Windows provides pull-down menus for the above actions.
\end{frame}


%\begin{frame}
%\begin{figure}
%\begin{center}
%\includegraphics[angle=0,scale=0.35]{centraldogma}
%\end{center}
%\end{figure}
%%\frametitle{Central Dogma and Questions it rises}
%\begin{center}
%\begin{figure}[h]
%\scalebox{0.45}{
%\input{new_overview.pstex_t}
%}
%\end{figure}
%\end{center}
%\end{frame}


\begin{frame}
\frametitle{Examples of linear regression applications in genomic
and methodological research involving linear regression} \small
\begin{itemize}
\item Anova models for experimental designs of gene expression
microarrays (\textcolor{red}{Kerr and Churchill (2001),
\textit{Biostatistics}}).

\item Multiple linear regression model for detecting sequence
specific binding sites using microarray gene expression data and
sequence data (\textcolor{red}{Bussemaker \textit{et al.} (2001),
\textit{Nature Genetics}}).

\item Multiple linear regression model with two way interactions
relating microarray gene expression data to phenotypes
(\textcolor{red}{Hastie \textit{et al.} (2001), \textit{Genome
Biology}}).

\item Linear regression of gene expression on single nucleotide
polymorphism genotype (\textcolor{red}{Morley \textit{et al.}
(August, 2004), \textit{Nature}}).

\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Examples of linear regression applications in genomic
and methodological research involving linear regression} \small
\begin{itemize}
%\item Linear regression model to identify "template" structures of
%proteins that identify a certain family (\textcolor{red}{Wu
%\textit{et al.} (1998) \textit{Journal of Computational
%Biology}}).

\item Simple linear regression model to identify SNPs explaining variation in gene expression
(\textcolor{red}{Stranger \textit{et al}., (2005), \textit{PLoS
Genetics}}).

\item A simple linear regression method for quantitative trait loci
linkage analysis with censored observations
(\textcolor{red}{Anderson \textit{et al}., (2006),
\textit{Genetics}})

\item Variable selection in regression with high dimensional data.
(\textcolor{red}{Bunea et al., (2006), \textit{Journal of
Statistical Planing and Inference})}.

\item Genomic characterization of multiple clinical phenotypes
of cancer using multivariate linear regression models
(\textcolor{red}{Matsui \textit{et al.} (January, 2007),
\textit{Bioinformatics}}).


\item Multivariate regression model for selecting genomic markers
that relate to a clinical outcome (\textcolor{red}{Weidinger
\textit{et al.} (August, 2008), \textit{PLoS Genetics}}).
\end{itemize}

\end{frame}

\begin{frame}
\frametitle{Assignment for next week} Introduce \texttt{R} to
yourself; read chapters 1, 2 and Appendix A of Seber and Lee.


\end{frame}


\begin{frame}
\frametitle{Questions?}
\end{frame}


\begin{frame}[label = people]
\frametitle{}
\begin{figure}
\begin{center}
\includegraphics[angle=0,scale=0.30, clip=true]{programpercentages.pdf}
\caption{G949: Statistics (both Ph.D. and master, Stat 849 is one of
the core courses) 52\% Stat, 48\% Non-stat.}.
\end{center}
\end{figure}
\hyperlink{summary}{\beamerreturnbutton{}}
\end{frame}


\end{document}
