-
Notifications
You must be signed in to change notification settings - Fork 1
/
statistics_practices_rkteaching.tex
223 lines (194 loc) · 7.83 KB
/
statistics_practices_rkteaching.tex
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
% Author: Alfredo Sánchez Alberca ([email protected])
% !TEX program = xelatex
%----------------------------------------------------------------------------------------
% DOCUMENT CLASS
%----------------------------------------------------------------------------------------
\documentclass[11pt,a4paper,openright]{book}
%----------------------------------------------------------------------------------------
% PACKAGES AND OTHER DOCUMENT CONFIGURATIONS
%----------------------------------------------------------------------------------------
% Language settings
\usepackage{polyglossia}
\setdefaultlanguage{english}
% Margins and layout
\usepackage[top=3cm, bottom=3cm, left=2.54cm, right=2.54cm]{geometry}
% Math support
\usepackage{amsmath, amssymb}
% \usepackage{mathspec}
% Font settings
\usepackage{unicode-math}
\setmainfont[Ligatures=TeX]{TeX Gyre Pagella}
%\setmathfont{TG Pagella Math}
\setmathfont[math-style=ISO, bold-style=ISO]{texgyrepagella-math.otf}
% Color
\usepackage{xcolor} % Required for specifying colors by name
\definecolor{color1}{RGB}{5,161,230}
\definecolor{color2}{RGB}{238,50,36}
\definecolor{ocre}{RGB}{243,102,25} % Define the orange color used for highlighting throughout the book
\definecolor{blueceu}{RGB}{5,161,230} % Blue color of CEU logo
\definecolor{greenceu}{RGB}{185,209,16} % Green color of CEU logo
\definecolor{redceu}{RGB}{238,50,36} % Red color of CEU logo
\definecolor{grayceu}{RGB}{111,107,83} % Gray color of CEU logo
\definecolor{coral}{rgb}{1,0.5,0.31} % Orange color for graphics
\definecolor{royalblue1}{rgb}{0.28,0.46,1} % Blue color for graphics
\definecolor{mygreen}{rgb}{0,0.8,0} % Green color for graphics
\definecolor{chaptergrey}{RGB}{5,161,230} % Blue color of CEU logo
% Line breaking
\usepackage{microtype}
\setlength{\emergencystretch}{2em}
% Graphics
\usepackage{graphicx}
\usepackage{tikz}
\usepackage{eso-pic} % Required for specifying an image background in the title page
% Arrays and tables
\usepackage{array}
\usepackage{multirow}
\usepackage{colortbl}
\usepackage{booktabs}
\newcommand{\tcrule}{\arrayrulecolor{color1!50!white}\toprule}
\newcommand{\mcrule}{\arrayrulecolor{color1!50!white}\midrule}
\newcommand{\bcrule}{\arrayrulecolor{color1!50!white}\bottomrule}
% Captions
\usepackage[margin=20pt, font=small, labelfont=bf, labelsep=endash]{caption}
% Floating figures
\usepackage{subfigure}
% Lists
\usepackage[shortlabels]{enumitem} % Customize lists
%\setlist{nolistsep} % Reduce spacing between bullet points and numbered lists
\setlist[description]{style=sameline,leftmargin=0cm}
\makeatletter
\let\savees@listquot\es@listquot
\def\es@listquot{\protect\savees@listquot}
\makeatletter
\renewcommand{\theenumiii}{\arabic{enumiii}}
% Flush floating
\usepackage{afterpage}
% Creative common icons
\usepackage[scale=2]{ccicons}
% hyperlinks
\usepackage{hyperref}
\hypersetup{
pdfauthor = {Alfredo S\'anchez Alberca},
pdftitle = {Applied Biostatistics with R},
pdfsubject = {Biostatistics},
pdfkeywords = {Statistics, Biostatistics, R},
pdfcreator = {XeLaTeX with hyperref package},
pdfproducer = {pdfLaTeX},
colorlinks = true,
linkcolor = red, % color of internal links
citecolor = green, % color of links to bibliography
filecolor = magenta, % color of file links
urlcolor = magenta, % color of external links
}
%\usepackage{breakurl}
% Indentation
%\setlength\parindent{0pt}
% Control of widow orphan lines
\clubpenalty=10000
\widowpenalty=10000
%Code listing formatting
\usepackage{listings}
\lstdefinelanguage{morejava}{morekeywords={String}}
\definecolor{vollgrau}{rgb}{0.9,0.9,0.9}
\definecolor{colKeys}{rgb}{0,0,1}
\definecolor{colIdentifier}{rgb}{0,0,0}
\definecolor{colComments}{rgb}{1,0.5,0}
\definecolor{colString}{rgb}{0,0.5,0}
\definecolor{colbackground}{rgb}{0.9,0.9,1}
\lstset{%
language=R,
float=hbp,%
basicstyle=\ttfamily,%
identifierstyle=\color{colIdentifier},%
keywordstyle=\color{colKeys},%
stringstyle=\color{colString},%
commentstyle=\color{colComments},%
% columns=flexible,%
% columns=fullflexible,%
columns=fixed,
tabsize=1,%
extendedchars=true,%
showspaces=false,%
showstringspaces=false,%
breaklines=true,%
breakindent=10pt,%
backgroundcolor=\color{colbackground},%
breakautoindent=true,%
captionpos=t,%
xleftmargin=1em,%
% xrightmargin=.5\fboxsep,%
numbersep=1em,%
escapechar=\#
}
% Set short or long depending on the version desired
% \usepackage[corto]{optional}
\input{preamble/commands_book} % Insert the commands_book.tex file which contains the majority of the structure behind
% the template
%----------------------------------------------------------------------------------------
% COMMANDS FOR INDICATIONS
%----------------------------------------------------------------------------------------
\usepackage{menukeys}
\newmenucolortheme{mycolors}{named}{white}{color1}{black}
\changemenucolortheme{menus}{mycolors}
\renewmenumacro{\menu}[>]{menus}
%\newmenustylesimple*{botonstyle}{\textbf{\CurrentMenuElement}}
%\renewmenumacro{\keys}{botonstyle}
\newcommand{\button}[1]{\textsf{\small #1}}
\newcommand{\option}[1]{\textsf{\small #1}}
\newcommand{\mtab}[1]{\textsf{\small #1}}
\newcommand{\field}[1]{\textsf{\small #1}}
\newcommand{\command}[1]{\texttt{#1}}
\newcommand{\variable}[1]{\textsf{\small #1}}
\newcommand{\result}[1]{\texttt{#1}}
% OTHERS
\newcommand{\resetcounters}{\setcounter{page}{1} \setcounter{section}{0} \setcounter{footnote}{0} \setcounter{figure}{0} \setcounter{table}{0}}
%========================================================================================
% DOCUMENT BODY
%========================================================================================
\begin{document}
\frontmatter
% Add two blank pages at the beginning
%\null\thispagestyle{empty}\newpage
%\null\thispagestyle{empty}\newpage
%----------------------------------------------------------------------------------------
% TITLE PAGE
%----------------------------------------------------------------------------------------
\input{preamble/titlepage}
%\input{preamble/titlepage_book}
%----------------------------------------------------------------------------------------
% COPYRIGHT PAGE
%----------------------------------------------------------------------------------------
\input{preamble/license}
%----------------------------------------------------------------------------------------
% TABLE OF CONTENTS
%----------------------------------------------------------------------------------------
%\chapterimage{img/chapter_head.png} % Table of contents heading image
{\pagestyle{plain} % No headers
%\input{registro}
\tableofcontents\thispagestyle{empty}
% Print the table of contents itself
\cleardoublepage % Forces the first chapter to start on an odd page so it's on the right
}
\mainmatter
%----------------------------------------------------------------------------------------
% CHAPTERS
%----------------------------------------------------------------------------------------
\input{chapters/introduction/introduction}
\input{chapters/frequency_distributions/frequency_distributions}
\input{chapters/statistics/statistics}
\input{chapters/linear_regression/linear_regression}
\input{chapters/non_linear_regression/non_linear_regression}
\input{chapters/probability/probability}
\input{chapters/discrete_random_variables/discrete_random_variables}
\input{chapters/continuous_random_variables/continuous_random_variables}
\input{chapters/confidence_intervals_1_sample/confidence_intervals_1_sample}
\input{chapters/confidence_intervals_2_samples/confidence_intervals_2_samples}
\input{chapters/hypothesis_tests/hypothesis_tests}
\input{chapters/anova_1_factor/anova_1_factor}
%\input{anova_2_factors/anova_2_factors}
%\input{non_parametric_tests/non_parametric_tests}
\input{chapters/chi_square_tests/chi_square_tests}
%\input{concordance/concordance}
%\appendix
%\include{comandos_R}
\end{document}