summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/medstarbeamer/medstarpresentation.Rnw
blob: 2f33e5935b1c8441fcf5cb3d7f70ff3f2730ed0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
\documentclass{medstarbeamer}
\title[ Applied Bayesian Data Analysis]{Binary Response Regression and Model Selection}
\author[ Anagha Kumar]{Anagha Kumar}
\institute[MHRI]{\textit{MEDSTAR HEALTH RESEARCH INSTITUTE}}
\date{August 26th, 2015} 
\begin{document}

\begin{frame} 
\maketitle
\end{frame}

\begin{frame}{Table of Contents}
\tableofcontents
\end{frame}

\section{The Problem of Interest}
\begin{frame}{Dataset}
\footnotesize{
\begin{enumerate}
\item{The dataset used was from ``Survival Analysis - Techniques for Censored and Truncated Data".} 
\item{It was a hypothetical study of the mortality experience of diabetics. }
\item{30 diabetics were followed till death or the end of the study.}
\item{The subject's age at entry into the study and the age at the end of the study or death were recorded.}
\item{Rather than time to event analysis, I was interested in how ``entry age" and ``exit age", affected survival.} 
\item{The response variable, survival, was binary (=1 if alive, =0 if dead).}
\item{The dataset contained no missing data.}
\end{enumerate}
}
\end{frame}

<<echo=FALSE, results='hide', warning=FALSE, message=FALSE>>= 
options(repos = c(CRAN = "http://cran.rstudio.com"))
install.packages("LearnBayes")
library(LearnBayes)
library(xtable)
entry_age <- c(58, 58, 59, 60, 60, 61, 61, 62, 62, 62, 63, 63, 64, 66, 66, 67, 67, 67, 68, 69, 69, 69, 70, 70, 70, 71, 72, 72, 73, 73)
exit_age <- c(60, 63, 69, 62, 65, 72, 69, 73, 66, 65, 68, 74, 71, 68, 69, 70, 77, 69, 72, 79, 72, 70, 76, 71, 78, 79, 76, 73, 80, 74)
survive <- c(0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0)
@
<<echo=FALSE, results='hide'>>= 
table.entry_age <- t(table(entry_age))
Xtable.entry_age <- xtable(table.entry_age, caption="Descriptive Statistics for Entry Age")
table.exit_age <- t(table(exit_age))
Xtable.exit_age <- xtable(table.exit_age, caption="Descriptive Statistics for Exit Age")
table.survive <- t(table(survive))
Xtable.survive <- xtable(table.survive, caption="Survival Counts")
@
\subsection{Exploratory Data Analysis}
\begin{frame}{Descriptive Statistics}
\tiny{
<<echo=FALSE, results='asis'>>= 
rownames(Xtable.entry_age) <- c("Counts")
print(Xtable.entry_age, caption.placement="top", booktabs=TRUE, rownames=TRUE)
rownames(Xtable.exit_age) <- c("Counts")
print(Xtable.exit_age, caption.placement="top", booktabs=TRUE, rownames=TRUE)
@
<<echo=FALSE, results='asis'>>= 
rownames(Xtable.survive) <- c("Counts")
print(Xtable.survive, caption.placement="top", booktabs=TRUE, rownames=TRUE)
@
}
\end{frame}

\end{document}