mirror of
https://github.com/eddelbuettel/binb
synced 2024-12-22 04:29:59 +01:00
updated vignettes, skeleton and manual page
This commit is contained in:
parent
2cff356a9f
commit
0134a90819
12
ChangeLog
12
ChangeLog
@ -1,3 +1,15 @@
|
|||||||
|
2018-09-18 Dirk Eddelbuettel <edd@debian.org>
|
||||||
|
|
||||||
|
* vignettes/iqssDemo.Rmd: Added vignette for IQSS, based on skeleton
|
||||||
|
|
||||||
|
* vignettes/*: Addedd required IQSS support files, figures in iqss/
|
||||||
|
|
||||||
|
* inst/rmarkdown/templates/iqss/skeleton/skeleton.Rmd: Updated
|
||||||
|
* inst/rmarkdown/templates/metropolis/skeleton/skeleton.Rmd: Idem
|
||||||
|
|
||||||
|
* R/binb.R: Manual page update
|
||||||
|
* man/metropolis.Rd: Idem
|
||||||
|
|
||||||
2018-09-17 Dirk Eddelbuettel <edd@debian.org>
|
2018-09-17 Dirk Eddelbuettel <edd@debian.org>
|
||||||
|
|
||||||
* README.md: Added initial README
|
* README.md: Added initial README
|
||||||
|
21
R/binb.R
21
R/binb.R
@ -1,11 +1,13 @@
|
|||||||
##' A template for RMarkdown-based Beamer presentations in the \sQuote{Metropolis}
|
##' Templates for RMarkdown-based Beamer PDF presentations supporting
|
||||||
##' style by Matthias Vogelgesang and others.
|
##' the \sQuote{Metropolis} style by Matthias Vogelgesang and others,
|
||||||
|
##' and the \sQuote{IQSS} style by Ista Zahn and Gary King.
|
||||||
##'
|
##'
|
||||||
##' Not all options and customizations available at the LaTeX level are implemented
|
##' Note that not all options and customizations available at the LaTeX
|
||||||
##' yet.
|
##' level are implemented or supported yet.
|
||||||
##' @title Binb is not Beamer - Metropolis-themed PDF Presentation
|
##' @title Binb is not Beamer - PDF Presentation Themes
|
||||||
##' @param toc A logical variable defaulting to \code{FALSE}.
|
##' @param toc A logical variable defaulting to \code{FALSE}.
|
||||||
##' @param slide_level A numeric variable defaulting to two.
|
##' @param slide_level A numeric variable defaulting to two for
|
||||||
|
##' \sQuote{Metrpolis} and three for \sQuote{IQSS}.
|
||||||
##' @param incremental A logical variable defaulting to \code{FALSE}.
|
##' @param incremental A logical variable defaulting to \code{FALSE}.
|
||||||
##' @param fig_width A numeric variable defaulting to ten.
|
##' @param fig_width A numeric variable defaulting to ten.
|
||||||
##' @param fig_height A numeric variable defaulting to seven.
|
##' @param fig_height A numeric variable defaulting to seven.
|
||||||
@ -24,6 +26,13 @@
|
|||||||
##' @param pandoc_args An optional character variable defaulting to \code{NULL}.
|
##' @param pandoc_args An optional character variable defaulting to \code{NULL}.
|
||||||
##' @return RMarkdown content processed for rendering.
|
##' @return RMarkdown content processed for rendering.
|
||||||
##' @author Dirk Eddelbuettel
|
##' @author Dirk Eddelbuettel
|
||||||
|
##' @examples
|
||||||
|
##' \dontrun{
|
||||||
|
##' library(rmarkdown)
|
||||||
|
##' draft("myslides.Rmd", template="metropolis", package="binb", edit=FALSE)
|
||||||
|
##' setwd("myslides") ## template creates a new subdir
|
||||||
|
##' render("myslides.Rmd")
|
||||||
|
##' }
|
||||||
metropolis <- function(toc = FALSE,
|
metropolis <- function(toc = FALSE,
|
||||||
slide_level = 2,
|
slide_level = 2,
|
||||||
incremental = FALSE,
|
incremental = FALSE,
|
||||||
|
@ -17,3 +17,4 @@ StripTrailingWhitespace: Yes
|
|||||||
|
|
||||||
BuildType: Package
|
BuildType: Package
|
||||||
PackageInstallArgs: --no-multiarch --with-keep.source
|
PackageInstallArgs: --no-multiarch --with-keep.source
|
||||||
|
PackageRoxygenize: rd
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
---
|
---
|
||||||
author: Gary King and Ista Zahn
|
author: Ista Zahn and Gary King
|
||||||
classoption: compress
|
classoption: compress
|
||||||
fontsize: 12pt
|
fontsize: 12pt
|
||||||
title: Beamer Class Demonstration
|
title: IQSS Beamer Class Demonstration
|
||||||
date: \today
|
date: \today
|
||||||
institute: IQSS
|
institute: IQSS
|
||||||
output: binb::iqss
|
output: binb::iqss
|
||||||
@ -15,9 +15,6 @@ output: binb::iqss
|
|||||||
|
|
||||||
### What's this course about?
|
### What's this course about?
|
||||||
|
|
||||||
|
|
||||||
::: incremental
|
|
||||||
|
|
||||||
- \alert{Specific statistical methods for many research problems}
|
- \alert{Specific statistical methods for many research problems}
|
||||||
- How to learn (or create) new methods
|
- How to learn (or create) new methods
|
||||||
- Inference: \underline{Using facts you know to learn about
|
- Inference: \underline{Using facts you know to learn about
|
||||||
@ -33,8 +30,6 @@ output: binb::iqss
|
|||||||
- We will go as fast as possible subject to everyone following along
|
- We will go as fast as possible subject to everyone following along
|
||||||
- We cover different amounts of material each week
|
- We cover different amounts of material each week
|
||||||
|
|
||||||
:::
|
|
||||||
|
|
||||||
### How much math will you scare us with?
|
### How much math will you scare us with?
|
||||||
|
|
||||||
- All math requires two parts: \alertb{proof} and \alertb{concepts \& intuition}
|
- All math requires two parts: \alertb{proof} and \alertb{concepts \& intuition}
|
||||||
@ -49,9 +44,6 @@ output: binb::iqss
|
|||||||
- Includes ``how to'' computation
|
- Includes ``how to'' computation
|
||||||
- $\leadsto$ Fewer proofs, more concepts, better practical knowledge
|
- $\leadsto$ Fewer proofs, more concepts, better practical knowledge
|
||||||
- Do you have the background for this class?
|
- Do you have the background for this class?
|
||||||
|
|
||||||
. . .
|
|
||||||
|
|
||||||
\alert{A Test: What's this?
|
\alert{A Test: What's this?
|
||||||
\begin{align*}
|
\begin{align*}
|
||||||
b=(X'X)^{-1}X'y
|
b=(X'X)^{-1}X'y
|
||||||
@ -74,53 +66,6 @@ output: binb::iqss
|
|||||||
with different meaning
|
with different meaning
|
||||||
|
|
||||||
|
|
||||||
### Negative Binomial Derivation
|
|
||||||
|
|
||||||
\uncover<+->{Recall:}
|
|
||||||
|
|
||||||
\begin{equation*}
|
|
||||||
\uncover<+->{\Pr(A|B)=\frac{\Pr(AB)}{\Pr(B)} \implies
|
|
||||||
\alertb{\Pr(AB)}=\alerte{\Pr(A|B)}\alertd{\Pr(B)}}
|
|
||||||
\end{equation*}
|
|
||||||
|
|
||||||
\alertb<1-1>{one}
|
|
||||||
\alertc<2-2>{two}
|
|
||||||
\alertd<3-3>{three}
|
|
||||||
|
|
||||||
\begin{align*}
|
|
||||||
\uncover<+->{\text{NegBin}(y|\phi,\sigma^2) &= \int_0^\infty
|
|
||||||
\alerte{\text{Poisson}(y|\lambda)}
|
|
||||||
\times\alertd{\text{gamma}(\lambda|\phi,\sigma^2)}d\lambda\\}
|
|
||||||
\uncover<+->{&= \int_0^\infty
|
|
||||||
\alertb{\P(y,\lambda|\phi,\sigma^2) }d\lambda\\}
|
|
||||||
\uncover<+->{&=
|
|
||||||
\frac{\Gamma\left(\frac{\phi}{\sigma^2-1}+y_i\right)}
|
|
||||||
{y_i!\Gamma\left(\frac{\phi}{\sigma^2-1}\right)}
|
|
||||||
\left(\frac{\sigma^2-1}{\sigma^2}\right)^{y_i}
|
|
||||||
\left(\sigma^2\right)^{\frac{-\phi}{\sigma^2-1}}}
|
|
||||||
\end{align*}
|
|
||||||
|
|
||||||
|
|
||||||
# Other Features
|
|
||||||
|
|
||||||
## Structural Features
|
|
||||||
|
|
||||||
### Structural Features
|
|
||||||
|
|
||||||
#### Levels of Structure
|
|
||||||
|
|
||||||
- usual \LaTeX\ \textbackslash\ section, \textbackslash\ subsection commands
|
|
||||||
- `frame` environments provide slides
|
|
||||||
- `block` environments divide slides into logical sections
|
|
||||||
- `columns` environments divide slides vertically (example later)
|
|
||||||
- overlays (\`a la prosper) change content of slides dynamically
|
|
||||||
|
|
||||||
#### \alertc{Overlay Alerts}
|
|
||||||
|
|
||||||
On the first overlay, \alert<1>{this text} is highlighted (or \emph{alerted}).
|
|
||||||
On the second, \alert<2>{this text} is.
|
|
||||||
|
|
||||||
|
|
||||||
### Code blocks
|
### Code blocks
|
||||||
|
|
||||||
\footnotesize
|
\footnotesize
|
||||||
@ -130,23 +75,17 @@ On the second, \alert<2>{this text} is.
|
|||||||
hello <- function(name) paste("hello", name)
|
hello <- function(name) paste("hello", name)
|
||||||
```
|
```
|
||||||
|
|
||||||
. . .
|
|
||||||
|
|
||||||
```python
|
```python
|
||||||
# Say hello in Python
|
# Say hello in Python
|
||||||
def hello(name):
|
def hello(name):
|
||||||
return("Hello" + " " + name)
|
return("Hello" + " " + name)
|
||||||
```
|
```
|
||||||
|
|
||||||
. . .
|
|
||||||
|
|
||||||
```haskell
|
```haskell
|
||||||
-- Say hello in Haskell
|
-- Say hello in Haskell
|
||||||
hello name = "Hello" ++ " " ++ name
|
hello name = "Hello" ++ " " ++ name
|
||||||
```
|
```
|
||||||
|
|
||||||
. . .
|
|
||||||
|
|
||||||
```c
|
```c
|
||||||
/* Say hello in C */
|
/* Say hello in C */
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@ -157,7 +96,6 @@ int main()
|
|||||||
printf("Hello %s", name);
|
printf("Hello %s", name);
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
```
|
|
||||||
|
|
||||||
\normalsize
|
\normalsize
|
||||||
|
|
||||||
@ -187,7 +125,7 @@ int main()
|
|||||||
- pgf graphics framework easy to use
|
- pgf graphics framework easy to use
|
||||||
- include external JPEG/PNG/PDF figures
|
- include external JPEG/PNG/PDF figures
|
||||||
- output directly to pdf: no PostScript hurdles
|
- output directly to pdf: no PostScript hurdles
|
||||||
- detailed User's Manual (with good presentation advice, too)
|
- detailed User Manual (with good presentation advice, too)
|
||||||
|
|
||||||
|
|
||||||
### Theorems and Proofs
|
### Theorems and Proofs
|
||||||
@ -215,29 +153,51 @@ $2=2$.
|
|||||||
#### \alertc{Example block}
|
#### \alertc{Example block}
|
||||||
The set $\{1,2,3,5\}$ has four elements.
|
The set $\{1,2,3,5\}$ has four elements.
|
||||||
|
|
||||||
|
# RMarkdown Examples
|
||||||
|
|
||||||
# Appendix
|
### R Figure
|
||||||
|
|
||||||
---
|
The following code generates the plot on the next slide (taken from
|
||||||
|
`help(bxp)` and modified slightly):
|
||||||
|
|
||||||
Backup Slides
|
```{r pressureCode, eval=FALSE}
|
||||||
|
library(stats)
|
||||||
|
set.seed(753)
|
||||||
|
bx.p <- boxplot(split(rt(100, 4),
|
||||||
|
gl(5, 20)), plot=FALSE)
|
||||||
|
bxp(bx.p, notch = FALSE, boxfill = "lightblue",
|
||||||
|
frame = FALSE, outl = TRUE,
|
||||||
|
main = "Example from help(bxp)")
|
||||||
|
```
|
||||||
|
|
||||||
<!-- \subsection{More stuff} -->
|
|
||||||
|
|
||||||
---
|
### R Figure
|
||||||
|
|
||||||
Details
|
```{r pressureFig, echo=FALSE}
|
||||||
|
library(stats)
|
||||||
|
set.seed(753)
|
||||||
|
bx.p <- boxplot(split(rt(100, 4),
|
||||||
|
gl(5, 20)), plot=FALSE)
|
||||||
|
bxp(bx.p, notch = FALSE, boxfill = "lightblue",
|
||||||
|
frame = FALSE, outl = TRUE,
|
||||||
|
main = "Example from help(bxp)")
|
||||||
|
```
|
||||||
|
|
||||||
---
|
### R Table
|
||||||
|
|
||||||
Text omitted in main talk.
|
A simple `knitr::kable` example:
|
||||||
|
|
||||||
<!-- \subsection{Even more additional material} -->
|
\small
|
||||||
|
|
||||||
---
|
```{r kableEx}
|
||||||
|
knitr::kable(mtcars[1:5, 1:8],
|
||||||
|
caption="(Parts of) the mtcars dataset")
|
||||||
|
```
|
||||||
|
|
||||||
More details
|
### Resources
|
||||||
|
|
||||||
---
|
#### For more information:
|
||||||
|
- See the [IQSS repository](https://github.com/IQSS/iqss-beamer-theme) for more on the IQSS them
|
||||||
Even more details
|
- See the [RMarkdown repository](https://github.com/rstudio/rmarkdown) for more on RMarkdown
|
||||||
|
- See the [binb repository](https://github.com/eddelbuettel/binb) for more on binb
|
||||||
|
- See the [binb vignettes](https://github.com/eddelbuettel/binb/vignettes) for more examples.
|
||||||
|
@ -1,99 +1,102 @@
|
|||||||
---
|
---
|
||||||
author: Your Name Here and Some Other Person
|
title: A minimal example
|
||||||
title: "Something really clever here: \\newline And maybe a second line"
|
subtitle: With a subtitle
|
||||||
subtitle: You can also have a subtitle
|
author: Matthias Vogelgesang
|
||||||
date: 2018-09-15
|
date: \today
|
||||||
|
institute: Centre for Modern Beamer Themes
|
||||||
output: binb::metropolis
|
output: binb::metropolis
|
||||||
|
fontsize: 12pt
|
||||||
---
|
---
|
||||||
|
|
||||||
```{r,setup, include=FALSE}
|
```{r,setup, include=FALSE}
|
||||||
knitr::opts_chunk$set(cache=TRUE)
|
knitr::opts_chunk$set(cache=TRUE)
|
||||||
```
|
```
|
||||||
|
|
||||||
# A Section Header
|
# First Section
|
||||||
|
|
||||||
## A Slide Header
|
## First Frame
|
||||||
|
|
||||||
### A Subtitle
|
Hello, world!
|
||||||
|
|
||||||
- Point A
|
# Second Section
|
||||||
- Point B
|
|
||||||
- Point C
|
|
||||||
|
|
||||||
# Principal Resources
|
## Second Frame
|
||||||
|
|
||||||
## Metropolis
|
### Bulleted Lists
|
||||||
|
- Element A
|
||||||
|
- Element B
|
||||||
|
- B.1
|
||||||
|
- B.2
|
||||||
|
- Element C
|
||||||
|
|
||||||
### Main Repos
|
# Elements
|
||||||
|
|
||||||
- [Official GitHub Repo of Metropolis](https://github.com/matze/mtheme)
|
## Typography
|
||||||
(formerly mtheme); older version in TeXLive
|
|
||||||
- [My GitHub Repo for a local Ubuntu package of Metropolis](https://github.com/eddelbuettel/pkg-latex-metropolis) -- formerly mtheme
|
|
||||||
- [My GitHub Repo for a local Ubuntu package for the Fira font](https://github.com/eddelbuettel/pkg-fonts-fira)
|
|
||||||
|
|
||||||
## Ubuntu and Launchpad
|
```
|
||||||
|
The theme provides sensible defaults to
|
||||||
|
\emph{emphasize} text, \alert{accent} parts
|
||||||
|
or show \textbf{bold} results.
|
||||||
|
|
||||||
### Briefly
|
In Markdown, you can also use _emphasize_ and **bold**.
|
||||||
|
```
|
||||||
|
|
||||||
- The packages which can be built (ie not Fira as it needs external fonts
|
\begin{center}becomes\end{center}
|
||||||
which we cannot download during build) are
|
|
||||||
[in this repo](https://launchpad.net/~edd/+archive/ubuntu/misc/+packages)
|
|
||||||
- If you're not on Ubuntu, it is probably more work to get
|
|
||||||
- Metropolis into your \LaTeX environment
|
|
||||||
- the Fira font into your \LaTeX environment
|
|
||||||
- I *did* try without (on plain Ubuntu 16.04) and it _builds_ but looks less
|
|
||||||
crisp
|
|
||||||
- So for the time being you probably want these fresh from source, or via my
|
|
||||||
helpers. YMMV.
|
|
||||||
|
|
||||||
## Local Adaption
|
The theme provides sensible defaults to \emph{emphasize} text,
|
||||||
|
\alert{accent} parts or show \textbf{bold} results.
|
||||||
|
|
||||||
- mtheme and metropolis changed a bit since I first used them
|
In Markdown, you can also use _emphasize_ and **bold**.
|
||||||
- I started with a local modification I called m2; the package is still in
|
|
||||||
the launchpad repo
|
|
||||||
- I generally include a file `header.tex` from the YAML for color, font,
|
|
||||||
... tweaking at the \LaTeX level, but as these are presentation-specific I
|
|
||||||
didn't include any changes here.
|
|
||||||
|
|
||||||
_ _ _
|
|
||||||
|
|
||||||
\LARGE Breakout page
|
|
||||||
|
|
||||||
## Using LaTeX Parts: Equations
|
|
||||||
|
|
||||||
### Linear Model
|
|
||||||
|
|
||||||
$$ \hat{\beta} = \text{argmin}_{b \in \mathbb{R}} S(b) = \left( \frac{1}{n} \sum_{i=1}^n x_i x_i^T \right)^{-1} \cdot \frac{1}{n} \sum_{i=1}^n x_i y_i $$
|
|
||||||
or in matrix form
|
|
||||||
|
|
||||||
$$ \hat{\beta} = (X^TX)^{-1} X^T y $$
|
|
||||||
|
|
||||||
|
|
||||||
## Using LaTeX Parts: Blocks
|
## Math
|
||||||
|
|
||||||
As one example of falling back into \LaTeX, consider the example of
|
\begin{equation*}
|
||||||
three different block environments are pre-defined and may be styled
|
e = \lim_{n\to \infty} \left(1 + \frac{1}{n}\right)^n
|
||||||
with an optional background color.
|
\end{equation*}
|
||||||
|
|
||||||
<!-- this sets the background -->
|
|
||||||
\metroset{block=fill}
|
|
||||||
|
|
||||||
\begin{block}{Default}
|
## R Figure Example
|
||||||
Block content.
|
|
||||||
\end{block}
|
|
||||||
|
|
||||||
\begin{alertblock}{Alert}
|
The following code generates the plot on the next slide (taken from
|
||||||
Block content.
|
`help(bxp)` and modified slightly):
|
||||||
\end{alertblock}
|
|
||||||
|
|
||||||
\begin{exampleblock}{Example}
|
```{r pressureCode, eval=FALSE}
|
||||||
Block content.
|
library(stats)
|
||||||
\end{exampleblock}
|
set.seed(753)
|
||||||
|
bx.p <- boxplot(split(rt(100, 4),
|
||||||
|
gl(5, 20)), plot=FALSE)
|
||||||
|
bxp(bx.p, notch = FALSE, boxfill = "lightblue",
|
||||||
|
frame = FALSE, outl = TRUE,
|
||||||
|
main = "Example from help(bxp)")
|
||||||
|
```
|
||||||
|
|
||||||
## Finally
|
|
||||||
|
|
||||||
### Going Forward
|
## R Figure Example
|
||||||
|
|
||||||
- Questions etc: Open issue tickets [at the GitHub repo](https://github.com/eddelbuettel/samples-rmarkdown-metropolis/issues)
|
```{r pressureFig, echo=FALSE}
|
||||||
- Pull requests welcome for bug fixes, extensions, examples, ...
|
library(stats)
|
||||||
|
set.seed(753)
|
||||||
|
bx.p <- boxplot(split(rt(100, 4),
|
||||||
|
gl(5, 20)), plot=FALSE)
|
||||||
|
bxp(bx.p, notch = FALSE, boxfill = "lightblue",
|
||||||
|
frame = FALSE, outl = TRUE,
|
||||||
|
main = "Example from help(bxp)")
|
||||||
|
```
|
||||||
|
|
||||||
|
## R Table Example
|
||||||
|
|
||||||
|
A simple `knitr::kable` example:
|
||||||
|
|
||||||
|
```{r kableEx}
|
||||||
|
knitr::kable(mtcars[1:5, 1:8],
|
||||||
|
caption="(Parts of) the mtcars dataset")
|
||||||
|
```
|
||||||
|
|
||||||
|
## Resources
|
||||||
|
|
||||||
|
### For more information:
|
||||||
|
- See the [Metropolis repository](https://github.com/matze/mtheme) for more on Metropolis
|
||||||
|
- See the [RMarkdown repository](https://github.com/rstudio/rmarkdown) for more on RMarkdown
|
||||||
|
- See the [binb repository](https://github.com/eddelbuettel/binb) for more on binb
|
||||||
|
- See the [binb vignettes](https://github.com/eddelbuettel/binb/vignettes) for more examples.
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
\name{metropolis}
|
\name{metropolis}
|
||||||
\alias{metropolis}
|
\alias{metropolis}
|
||||||
\alias{iqss}
|
\alias{iqss}
|
||||||
\title{Binb is not Beamer - Metropolis-themed PDF Presentation}
|
\title{Binb is not Beamer - PDF Presentation Themes}
|
||||||
\usage{
|
\usage{
|
||||||
metropolis(toc = FALSE, slide_level = 2, incremental = FALSE,
|
metropolis(toc = FALSE, slide_level = 2, incremental = FALSE,
|
||||||
fig_width = 10, fig_height = 7, fig_crop = TRUE,
|
fig_width = 10, fig_height = 7, fig_crop = TRUE,
|
||||||
@ -24,7 +24,8 @@ iqss(toc = FALSE, slide_level = 3, incremental = FALSE,
|
|||||||
\arguments{
|
\arguments{
|
||||||
\item{toc}{A logical variable defaulting to \code{FALSE}.}
|
\item{toc}{A logical variable defaulting to \code{FALSE}.}
|
||||||
|
|
||||||
\item{slide_level}{A numeric variable defaulting to two.}
|
\item{slide_level}{A numeric variable defaulting to two for
|
||||||
|
\sQuote{Metrpolis} and three for \sQuote{IQSS}.}
|
||||||
|
|
||||||
\item{incremental}{A logical variable defaulting to \code{FALSE}.}
|
\item{incremental}{A logical variable defaulting to \code{FALSE}.}
|
||||||
|
|
||||||
@ -61,12 +62,21 @@ iqss(toc = FALSE, slide_level = 3, incremental = FALSE,
|
|||||||
RMarkdown content processed for rendering.
|
RMarkdown content processed for rendering.
|
||||||
}
|
}
|
||||||
\description{
|
\description{
|
||||||
A template for RMarkdown-based Beamer presentations in the \sQuote{Metropolis}
|
Templates for RMarkdown-based Beamer PDF presentations supporting
|
||||||
style by Matthias Vogelgesang and others.
|
the \sQuote{Metropolis} style by Matthias Vogelgesang and others,
|
||||||
|
and the \sQuote{IQSS} style by Ista Zahn and Gary King.
|
||||||
}
|
}
|
||||||
\details{
|
\details{
|
||||||
Not all options and customizations available at the LaTeX level are implemented
|
Note that not all options and customizations available at the LaTeX
|
||||||
yet.
|
level are implemented or supported yet.
|
||||||
|
}
|
||||||
|
\examples{
|
||||||
|
\dontrun{
|
||||||
|
library(rmarkdown)
|
||||||
|
draft("myslides.Rmd", template="metropolis", package="binb", edit=FALSE)
|
||||||
|
setwd("myslides") ## template creates a new subdir
|
||||||
|
render("myslides.Rmd")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
\author{
|
\author{
|
||||||
Dirk Eddelbuettel
|
Dirk Eddelbuettel
|
||||||
|
236
vignettes/beamercolorthemeiqss.sty
Normal file
236
vignettes/beamercolorthemeiqss.sty
Normal file
@ -0,0 +1,236 @@
|
|||||||
|
% Modified from beamerclorthemedefault.sty.
|
||||||
|
% Original work Copyright 2007 by Till Tantau
|
||||||
|
% Copyright 2012,2015 by Vedran Mileti\'c, Joseph Wright
|
||||||
|
%
|
||||||
|
% This file may be distributed and/or modified
|
||||||
|
%
|
||||||
|
% 1. under the LaTeX Project Public License and/or
|
||||||
|
% 2. under the GNU Public License.
|
||||||
|
%
|
||||||
|
|
||||||
|
\RequirePackage{listings}
|
||||||
|
|
||||||
|
\mode<presentation>
|
||||||
|
|
||||||
|
% - Main color BLUE (Title, bullets, arrows)
|
||||||
|
% - First accent ORANGE (math, or RED)
|
||||||
|
% - Second accent PURPLE
|
||||||
|
% - Third accent GREEN
|
||||||
|
% - Fourth accent RED
|
||||||
|
% - Fifth accent YELLOW
|
||||||
|
|
||||||
|
% red green blue
|
||||||
|
%Orange 0.776 0.357 0.157
|
||||||
|
%Blue 0.208 0.380 1.000
|
||||||
|
%Purple 0.471 0.000 0.471
|
||||||
|
%Yellow 0.808 0.616 0.133
|
||||||
|
%Green 0.341 0.553 0.090
|
||||||
|
|
||||||
|
\definecolor{iqss@orange}{rgb}{0.776,0.357,0.157}
|
||||||
|
\definecolor{iqss@blue}{rgb}{0.19,0.55,0.91}
|
||||||
|
\definecolor{iqss@purple}{rgb}{0.471, 0.000 0.471}
|
||||||
|
\definecolor{iqss@yellow}{rgb}{0.808, 0.616 0.133}
|
||||||
|
\definecolor{iqss@green}{rgb}{0.341, 0.553 0.090}
|
||||||
|
\definecolor{iqss@red}{rgb}{0.65, 0.11 0.19}
|
||||||
|
\definecolor{iqss@gray}{rgb}{0.95,0.95,0.95}
|
||||||
|
|
||||||
|
\lstset{ %
|
||||||
|
basicstyle=\ttfamily\footnotesize,
|
||||||
|
backgroundcolor=\color{iqss@gray},
|
||||||
|
commentstyle=\color{iqss@green},
|
||||||
|
keywordstyle=\color{iqss@blue},
|
||||||
|
stringstyle=\color{iqss@purple},
|
||||||
|
keepspaces=true,
|
||||||
|
showspaces=false,
|
||||||
|
showstringspaces=false,
|
||||||
|
showtabs=false
|
||||||
|
}
|
||||||
|
|
||||||
|
\newcommand<>{\alertb}[1]{\setbeamercolor{alerted text}{fg=iqss@red}%
|
||||||
|
\begin{alertenv}#2\relax#1\end{alertenv}%
|
||||||
|
\setbeamercolor{alerted text}{fg=iqss@blue}%
|
||||||
|
}
|
||||||
|
\newcommand<>{\alertc}[1]{\setbeamercolor{alerted text}{fg=iqss@green}%
|
||||||
|
\begin{alertenv}#2\relax#1\end{alertenv}%
|
||||||
|
\setbeamercolor{alerted text}{fg=iqss@blue}%
|
||||||
|
}
|
||||||
|
\newcommand<>{\alertd}[1]{\setbeamercolor{alerted text}{fg=iqss@yellow}%
|
||||||
|
\begin{alertenv}#2\relax#1\end{alertenv}%
|
||||||
|
\setbeamercolor{alerted text}{fg=iqss@blue}%
|
||||||
|
}
|
||||||
|
\newcommand<>{\alerte}[1]{\setbeamercolor{alerted text}{fg=iqss@purple}%
|
||||||
|
\begin{alertenv}#2\relax#1\end{alertenv}%
|
||||||
|
\setbeamercolor{alerted text}{fg=iqss@blue}%
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
\setbeamercolor{normal text}{fg=black,bg=white}
|
||||||
|
\setbeamercolor{alerted text}{fg=iqss@blue}
|
||||||
|
\setbeamercolor{example text}{fg=iqss@green}
|
||||||
|
|
||||||
|
\setbeamercolor{structure}{fg=iqss@orange}
|
||||||
|
|
||||||
|
\setbeamercolor{background canvas}{parent=normal text}
|
||||||
|
\setbeamercolor{background}{parent=background canvas}
|
||||||
|
|
||||||
|
\setbeamercolor{palette primary}{use=structure,fg=structure.fg}
|
||||||
|
\setbeamercolor{palette secondary}{use=structure,fg=structure.fg!75!black}
|
||||||
|
\setbeamercolor{palette tertiary}{use=structure,fg=structure.fg!50!black}
|
||||||
|
\setbeamercolor{palette quaternary}{fg=black}
|
||||||
|
|
||||||
|
\setbeamercolor{palette sidebar primary}{use=normal text,fg=normal text.fg}
|
||||||
|
\setbeamercolor{palette sidebar secondary}{use=structure,fg=structure.fg}
|
||||||
|
\setbeamercolor{palette sidebar tertiary}{use=normal text,fg=normal text.fg}
|
||||||
|
\setbeamercolor{palette sidebar quaternary}{use=structure,fg=structure.fg}
|
||||||
|
|
||||||
|
\setbeamercolor{math text}{}
|
||||||
|
\setbeamercolor{math text inlined}{parent=math text}
|
||||||
|
\setbeamercolor{math text displayed}{parent=math text}
|
||||||
|
|
||||||
|
\setbeamercolor{normal text in math text}{}
|
||||||
|
|
||||||
|
\setbeamercolor{local structure}{parent=structure}
|
||||||
|
|
||||||
|
\setbeamercolor{titlelike}{parent=structure}
|
||||||
|
|
||||||
|
%Edd \setbeamercolor{title}{parent=titlelike,fg=white,bg=iqss@orange}
|
||||||
|
\setbeamercolor{title}{parent=titlelike,fg=iqss@orange}
|
||||||
|
\setbeamercolor{title in head/foot}{parent=palette quaternary}
|
||||||
|
\setbeamercolor{title in sidebar}{parent=palette sidebar quaternary}
|
||||||
|
|
||||||
|
\setbeamercolor{subtitle}{parent=title}
|
||||||
|
|
||||||
|
\setbeamercolor{author}{}
|
||||||
|
\setbeamercolor{author in head/foot}{parent=palette primary}
|
||||||
|
\setbeamercolor{author in sidebar}{use=palette sidebar tertiary,fg=palette sidebar tertiary.fg}
|
||||||
|
|
||||||
|
\setbeamercolor{institute}{}
|
||||||
|
\setbeamercolor{institute in head/foot}{parent=palette tertiary}
|
||||||
|
\setbeamercolor{institute in sidebar}{use=palette sidebar tertiary,fg=palette sidebar tertiary.fg}
|
||||||
|
|
||||||
|
\setbeamercolor{date}{}
|
||||||
|
\setbeamercolor{date in head/foot}{parent=palette secondary}
|
||||||
|
\setbeamercolor{date in sidebar}{use=palette sidebar tertiary,fg=palette sidebar tertiary.fg}
|
||||||
|
|
||||||
|
\setbeamercolor{titlegraphic}{}
|
||||||
|
|
||||||
|
\setbeamercolor{part name}{}
|
||||||
|
\setbeamercolor{part title}{parent=title}
|
||||||
|
|
||||||
|
\setbeamercolor{section name}{}
|
||||||
|
\setbeamercolor{section title}{parent=title}
|
||||||
|
|
||||||
|
\setbeamercolor{section in toc}{parent=structure}
|
||||||
|
\setbeamercolor{section in toc shaded}{parent=section in toc}
|
||||||
|
\setbeamercolor{section in head/foot}{parent=palette tertiary}
|
||||||
|
\setbeamercolor{section in sidebar}{parent=palette sidebar secondary}
|
||||||
|
\setbeamercolor{section in sidebar shaded}{use=section in sidebar,fg=section in sidebar.fg!40!bg}
|
||||||
|
\setbeamercolor{section number projected}{parent=item projected}
|
||||||
|
|
||||||
|
\setbeamercolor{subsection name}{}
|
||||||
|
\setbeamercolor{subsection title}{parent=titlelike}
|
||||||
|
|
||||||
|
\setbeamercolor{subsection in toc}{}
|
||||||
|
\setbeamercolor{subsection in toc shaded}{parent=subsection in toc}
|
||||||
|
\setbeamercolor{subsection in head/foot}{parent=palette secondary}
|
||||||
|
\setbeamercolor{subsection in sidebar}{parent=palette sidebar primary}
|
||||||
|
\setbeamercolor{subsection in sidebar shaded}{use=subsection in sidebar,fg=subsection in sidebar.fg!40!bg}
|
||||||
|
\setbeamercolor{subsection number projected}{parent={subitem projected}}
|
||||||
|
|
||||||
|
\setbeamercolor{subsubsection in toc}{parent=subsection in toc}
|
||||||
|
\setbeamercolor{subsubsection in toc shaded}{parent=subsubsection in toc}
|
||||||
|
\setbeamercolor{subsubsection in head/foot}{parent=subsection in head/foot}
|
||||||
|
\setbeamercolor{subsubsection in sidebar}{parent=subsection in sidebar}
|
||||||
|
\setbeamercolor{subsubsection in sidebar shaded}{parent=subsection in sidebar shaded}
|
||||||
|
\setbeamercolor{subsubsection number projected}{parent=subsubitem projected}
|
||||||
|
|
||||||
|
\setbeamercolor{headline}{}
|
||||||
|
\setbeamercolor{footline}{}
|
||||||
|
|
||||||
|
\setbeamercolor{sidebar}{}
|
||||||
|
\setbeamercolor{sidebar left}{parent=sidebar}
|
||||||
|
\setbeamercolor{sidebar right}{parent=sidebar}
|
||||||
|
|
||||||
|
\setbeamercolor{logo}{parent=palette secondary}
|
||||||
|
|
||||||
|
\setbeamercolor{frametitle}{parent=titlelike}
|
||||||
|
\setbeamercolor{framesubtitle}{parent=frametitle}
|
||||||
|
|
||||||
|
\setbeamercolor{frametitle right}{parent=frametitle}
|
||||||
|
|
||||||
|
\setbeamercolor{caption}{}
|
||||||
|
\setbeamercolor{caption name}{parent=structure}
|
||||||
|
|
||||||
|
\setbeamercolor{button}{use=local structure,bg=local structure.fg!50!bg,fg=white}
|
||||||
|
\setbeamercolor{button border}{use=button,fg=button.bg}
|
||||||
|
\setbeamercolor{navigation symbols}{use=structure,fg=structure.fg!40!bg}
|
||||||
|
\setbeamercolor{navigation symbols dimmed}{use=structure,fg=structure.fg!20!bg}
|
||||||
|
\setbeamercolor{mini frame}{parent=section in head/foot}
|
||||||
|
|
||||||
|
\setbeamercolor{block body}{}
|
||||||
|
\setbeamercolor{block body alerted}{}
|
||||||
|
\setbeamercolor{block body example}{}
|
||||||
|
\setbeamercolor{block title}{parent=structure,bg=iqss@gray}
|
||||||
|
\setbeamercolor{block title alerted}{parent=alerted text,bg=iqss@gray}
|
||||||
|
\setbeamercolor{block title example}{parent=example text,bg=iqss@gray}
|
||||||
|
|
||||||
|
\setbeamercolor{item}{parent=local structure}
|
||||||
|
\setbeamercolor{subitem}{parent=item}
|
||||||
|
\setbeamercolor{subsubitem}{parent=subitem}
|
||||||
|
|
||||||
|
\setbeamercolor{item projected}{parent=item,use=item,fg=white,bg=item.fg}
|
||||||
|
\setbeamercolor{subitem projected}{parent=item projected}
|
||||||
|
\setbeamercolor{subsubitem projected}{parent=subitem projected}
|
||||||
|
|
||||||
|
\setbeamercolor{enumerate item}{parent=item}
|
||||||
|
\setbeamercolor{enumerate subitem}{parent=subitem}
|
||||||
|
\setbeamercolor{enumerate subsubitem}{parent=subsubitem}
|
||||||
|
|
||||||
|
\setbeamercolor{itemize item}{parent=item}
|
||||||
|
\setbeamercolor{itemize subitem}{parent=subitem}
|
||||||
|
\setbeamercolor{itemize subsubitem}{parent=subsubitem}
|
||||||
|
|
||||||
|
\setbeamercolor{itemize/enumerate body}{}
|
||||||
|
\setbeamercolor{itemize/enumerate subbody}{}
|
||||||
|
\setbeamercolor{itemize/enumerate subsubbody}{}
|
||||||
|
|
||||||
|
\setbeamercolor{description item}{parent=item}
|
||||||
|
|
||||||
|
\setbeamercolor{description body}{}
|
||||||
|
|
||||||
|
\setbeamercolor{bibliography item}{parent=item}
|
||||||
|
|
||||||
|
\setbeamercolor{bibliography entry author}{use=structure,fg=structure.fg}
|
||||||
|
\setbeamercolor{bibliography entry title}{use=normal text,fg=normal text.fg}
|
||||||
|
\setbeamercolor{bibliography entry location}{use=structure,fg=structure.fg!65!bg}
|
||||||
|
\setbeamercolor{bibliography entry note}{use=structure,fg=structure.fg!65!bg}
|
||||||
|
|
||||||
|
\setbeamercolor{separation line}{}
|
||||||
|
|
||||||
|
\setbeamercolor{upper separation line head}{parent=separation line}
|
||||||
|
\setbeamercolor{middle separation line head}{parent=separation line}
|
||||||
|
\setbeamercolor{lower separation line head}{parent=separation line}
|
||||||
|
|
||||||
|
\setbeamercolor{upper separation line foot}{parent=separation line}
|
||||||
|
\setbeamercolor{middle separation line foot}{parent=separation line}
|
||||||
|
\setbeamercolor{lower separation line foot}{parent=separation line}
|
||||||
|
|
||||||
|
\setbeamercolor{abstract}{}
|
||||||
|
\setbeamercolor{abstract title}{parent=structure}
|
||||||
|
|
||||||
|
\setbeamercolor{verse}{}
|
||||||
|
|
||||||
|
\setbeamercolor{quotation}{}
|
||||||
|
\setbeamercolor{quote}{parent=quotation}
|
||||||
|
|
||||||
|
%\setbeamercolor{page number in head/foot}{fg=fg!50!bg}
|
||||||
|
\setbeamercolor{page number in head/foot}{fg=iqss@orange}
|
||||||
|
|
||||||
|
\setbeamercolor{qed symbol}{parent=structure}
|
||||||
|
|
||||||
|
\setbeamercolor{note page}{bg=white!90!black, fg=black}
|
||||||
|
\setbeamercolor{note title}{bg=white!80!black, fg=black}
|
||||||
|
\setbeamercolor{note date}{parent=note title}
|
||||||
|
|
||||||
|
\mode
|
||||||
|
<all>
|
7
vignettes/beamerfontthemeiqss.sty
Normal file
7
vignettes/beamerfontthemeiqss.sty
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
\usefonttheme{professionalfonts}
|
||||||
|
\RequirePackage{fontspec}
|
||||||
|
|
||||||
|
\setmainfont{Libertinus Serif}
|
||||||
|
\setsansfont{Libertinus Sans}
|
||||||
|
\setmathfont{Libertinus Math}
|
||||||
|
\setmonofont{Libertinus Mono}
|
123
vignettes/beamerthemeiqss.sty
Normal file
123
vignettes/beamerthemeiqss.sty
Normal file
@ -0,0 +1,123 @@
|
|||||||
|
% Modified from beamerthemedefault.sty.
|
||||||
|
% Original work Copyright 2007 by Till Tantau
|
||||||
|
%
|
||||||
|
% This file may be distributed and/or modified
|
||||||
|
%
|
||||||
|
% 1. under the LaTeX Project Public License and/or
|
||||||
|
% 2. under the GNU Public License.
|
||||||
|
%
|
||||||
|
|
||||||
|
% Requirement
|
||||||
|
\RequirePackage{tikz}
|
||||||
|
%\RequirePackage{amsmath} % DEdd: side-effects, and loaded later
|
||||||
|
%\RequirePackage{unicode-math} % DEdd: side-effects
|
||||||
|
|
||||||
|
\mode<presentation>
|
||||||
|
|
||||||
|
\hypersetup{colorlinks=true,allcolors=iqss@orange}
|
||||||
|
|
||||||
|
\def \iqsssectiontitleheader {}
|
||||||
|
|
||||||
|
\newcommand{\iqsssectiontitle}[1]{
|
||||||
|
\def \iqsssectiontitleheader{#1}
|
||||||
|
}
|
||||||
|
|
||||||
|
\@ifundefined{insertmainframenumber}
|
||||||
|
{%
|
||||||
|
% \insertmainframenumber not defined
|
||||||
|
\newcommand{\insertmainframenumber}{\inserttotalframenumber}
|
||||||
|
}
|
||||||
|
{%
|
||||||
|
% \insertmainframenumber already defined
|
||||||
|
}%
|
||||||
|
|
||||||
|
|
||||||
|
%\setbeamertemplate{footline}[frame number]
|
||||||
|
\setbeamertemplate{footline}
|
||||||
|
{ \usebeamercolor[fg]{page number in head/foot}%
|
||||||
|
\usebeamerfont{page number in head/foot}%
|
||||||
|
\hspace{1em}\insertsectionhead%
|
||||||
|
\hfill%
|
||||||
|
\insertframenumber\,/\,\hyperlinkappendixstart{\insertmainframenumber}
|
||||||
|
\ifnum \thepage = \insertframeendpage{\small .}\else{\phantom{\small .}}\fi
|
||||||
|
\hspace{1em}
|
||||||
|
\vskip2pt%
|
||||||
|
}
|
||||||
|
|
||||||
|
% Edd
|
||||||
|
\titlegraphic{\includegraphics[width=\paperwidth]{header.png}}
|
||||||
|
%This works: \titlegraphic{\includegraphics[width=0.4in]{illinois_logo_tm.eps}}
|
||||||
|
|
||||||
|
\setbeamertemplate{title page}
|
||||||
|
{
|
||||||
|
|
||||||
|
% \node[anchor=north west,xshift=-1.2mm,yshift=1.2mm] at (current page.north west){%
|
||||||
|
\begin{tikzpicture}[remember picture,overlay]
|
||||||
|
%\node[anchor=north east] at (current page.north east){%
|
||||||
|
\node[anchor=north west,xshift=-1.2mm,yshift=1.2mm] at (current page.north west){%
|
||||||
|
\noindent\inserttitlegraphic\par
|
||||||
|
};
|
||||||
|
\end{tikzpicture}
|
||||||
|
\vskip1em
|
||||||
|
\vbox{}
|
||||||
|
\begingroup
|
||||||
|
\centering
|
||||||
|
\usebeamercolor[fg]{titlegraphic}
|
||||||
|
\begin{beamercolorbox}[sep=8pt,center]{title}
|
||||||
|
\usebeamerfont{title}\inserttitle\par%
|
||||||
|
\ifx\insertsubtitle\@empty%
|
||||||
|
\else%
|
||||||
|
\vskip0.25em%
|
||||||
|
{\usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}\insertsubtitle\par}%
|
||||||
|
\fi%
|
||||||
|
\end{beamercolorbox}%
|
||||||
|
\vskip1em\par
|
||||||
|
\begin{beamercolorbox}[sep=8pt,center]{author}
|
||||||
|
\usebeamerfont{author}\insertauthor
|
||||||
|
\end{beamercolorbox}
|
||||||
|
\begin{beamercolorbox}[sep=8pt,center]{institute}
|
||||||
|
\usebeamerfont{institute}\insertinstitute
|
||||||
|
\end{beamercolorbox}
|
||||||
|
\begin{beamercolorbox}[sep=8pt,center]{date}
|
||||||
|
\usebeamerfont{date}\insertdate
|
||||||
|
\end{beamercolorbox}
|
||||||
|
\endgroup
|
||||||
|
\vfill
|
||||||
|
}
|
||||||
|
|
||||||
|
\setbeamertemplate{navigation symbols}{}
|
||||||
|
\setbeamertemplate{blocks}[rounded][shadow=true]
|
||||||
|
|
||||||
|
\usefonttheme{iqss}
|
||||||
|
\usecolortheme{iqss}
|
||||||
|
\useinnertheme{default}
|
||||||
|
\useoutertheme{default}
|
||||||
|
|
||||||
|
\setbeamertemplate{itemize items}[circle]
|
||||||
|
|
||||||
|
\AtBeginSection[]{
|
||||||
|
\title{\insertsectionhead}
|
||||||
|
{
|
||||||
|
\definecolor{white}{rgb}{0.776,0.357,0.157}
|
||||||
|
\definecolor{iqss@orange}{rgb}{1,1,1}
|
||||||
|
\ifnum \insertmainframenumber > \insertframenumber
|
||||||
|
\frame{
|
||||||
|
\frametitle{\iqsssectiontitleheader}
|
||||||
|
\tableofcontents[currentsection]
|
||||||
|
}
|
||||||
|
\else
|
||||||
|
\frame{
|
||||||
|
\frametitle{Backup Slides}
|
||||||
|
\tableofcontents[sectionstyle=shaded/shaded,subsectionstyle=shaded/shaded/shaded]
|
||||||
|
}
|
||||||
|
\fi
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
\mode
|
||||||
|
<all>
|
||||||
|
|
||||||
|
% Local Variables:
|
||||||
|
% TeX-engine: xetex
|
||||||
|
% End:
|
BIN
vignettes/figs/functionalForms.pdf
Normal file
BIN
vignettes/figs/functionalForms.pdf
Normal file
Binary file not shown.
BIN
vignettes/figs/phbAr.png
Normal file
BIN
vignettes/figs/phbAr.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.8 KiB |
BIN
vignettes/header.png
Normal file
BIN
vignettes/header.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
BIN
vignettes/iqss/functionalForms.pdf
Normal file
BIN
vignettes/iqss/functionalForms.pdf
Normal file
Binary file not shown.
BIN
vignettes/iqss/phbAr.png
Normal file
BIN
vignettes/iqss/phbAr.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.8 KiB |
248
vignettes/iqssDemo.Rmd
Normal file
248
vignettes/iqssDemo.Rmd
Normal file
@ -0,0 +1,248 @@
|
|||||||
|
---
|
||||||
|
author: Ista Zahn and Gary King
|
||||||
|
classoption: compress
|
||||||
|
fontsize: 12pt
|
||||||
|
title: IQSS Beamer Class Demonstration
|
||||||
|
date: \today
|
||||||
|
institute: IQSS
|
||||||
|
output: binb::iqss
|
||||||
|
vignette: >
|
||||||
|
%\VignetteIndexEntry{binb IQSS Demo}
|
||||||
|
%\VignetteKeywords{binb,vignette}
|
||||||
|
%\VignettePackage{binb}
|
||||||
|
%\VignetteEngine{knitr::rmarkdown}
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
# Beamer Features
|
||||||
|
|
||||||
|
## Some of Gary's Examples
|
||||||
|
|
||||||
|
### What's this course about?
|
||||||
|
|
||||||
|
|
||||||
|
::: incremental
|
||||||
|
|
||||||
|
- \alert{Specific statistical methods for many research problems}
|
||||||
|
- How to learn (or create) new methods
|
||||||
|
- Inference: \underline{Using facts you know to learn about
|
||||||
|
facts you don't know}
|
||||||
|
- \alert{How to write a publishable scholarly paper}
|
||||||
|
- \alert{All the practical tools of research} --- theory,
|
||||||
|
applications, simulation, programming, word processing, plumbing,
|
||||||
|
whatever is useful
|
||||||
|
- $\leadsto$ \alert{Outline and class materials:}
|
||||||
|
- \mbox{{\huge\parbox[b][.5in][t]{1in}{\alert{j.mp/G2001}}}
|
||||||
|
$\qquad\qquad$\includegraphics[width=.95in]{iqss/phbAr.png}}
|
||||||
|
- The syllabus gives topics, not a weekly plan.
|
||||||
|
- We will go as fast as possible subject to everyone following along
|
||||||
|
- We cover different amounts of material each week
|
||||||
|
|
||||||
|
:::
|
||||||
|
|
||||||
|
### How much math will you scare us with?
|
||||||
|
|
||||||
|
- All math requires two parts: \alertb{proof} and \alertb{concepts \& intuition}
|
||||||
|
- Different classes emphasize:
|
||||||
|
- \alert{Baby Stats}: dumbed down proofs, vague intuition
|
||||||
|
- \alert{Math Stats}: rigorous mathematical proofs
|
||||||
|
- \alert{\underline{Practical Stats}}: deep concepts and intuition, proofs when needed
|
||||||
|
- Goal: how to do empirical research, in depth
|
||||||
|
- Use rigorous statistical theory --- when needed
|
||||||
|
- Insure we understand the intuition --- always
|
||||||
|
- Always traverse from theoretical foundations to practical applications
|
||||||
|
- Includes ``how to'' computation
|
||||||
|
- $\leadsto$ Fewer proofs, more concepts, better practical knowledge
|
||||||
|
- Do you have the background for this class?
|
||||||
|
|
||||||
|
. . .
|
||||||
|
|
||||||
|
\alert{A Test: What's this?
|
||||||
|
\begin{align*}
|
||||||
|
b=(X'X)^{-1}X'y
|
||||||
|
\end{align*} }
|
||||||
|
|
||||||
|
|
||||||
|
### Systematic Components: Examples
|
||||||
|
|
||||||
|
\includegraphics[width=8cm]{iqss/functionalForms}
|
||||||
|
|
||||||
|
- \alertb{$E(Y_i) \equiv \mu_i = X_i\beta = \beta_0 +
|
||||||
|
\beta_1X_{1i} +\dots+\beta_kX_{ki}$}
|
||||||
|
- \alertc{$\Pr(Y_i=1) \equiv \pi_i =
|
||||||
|
\frac{1}{1+e^{-x_i\beta}}$}
|
||||||
|
- \alertd{$V(Y_i)\equiv \sigma_i^2 = e^{x_i\beta}$}
|
||||||
|
- Interpretation:
|
||||||
|
- Each is a \alert{class of functional forms}
|
||||||
|
- Set $\beta$ and it picks out one \alert{member of the class}
|
||||||
|
- \alert{$\beta$} in each is an ``effect parameter'' vector,
|
||||||
|
with different meaning
|
||||||
|
|
||||||
|
|
||||||
|
### Negative Binomial Derivation
|
||||||
|
|
||||||
|
\uncover<+->{Recall:}
|
||||||
|
|
||||||
|
\begin{equation*}
|
||||||
|
\uncover<+->{\Pr(A|B)=\frac{\Pr(AB)}{\Pr(B)} \implies
|
||||||
|
\alertb{\Pr(AB)}=\alerte{\Pr(A|B)}\alertd{\Pr(B)}}
|
||||||
|
\end{equation*}
|
||||||
|
|
||||||
|
\alertb<1-1>{one}
|
||||||
|
\alertc<2-2>{two}
|
||||||
|
\alertd<3-3>{three}
|
||||||
|
|
||||||
|
\begin{align*}
|
||||||
|
\uncover<+->{\text{NegBin}(y|\phi,\sigma^2) &= \int_0^\infty
|
||||||
|
\alerte{\text{Poisson}(y|\lambda)}
|
||||||
|
\times\alertd{\text{gamma}(\lambda|\phi,\sigma^2)}d\lambda\\}
|
||||||
|
\uncover<+->{&= \int_0^\infty
|
||||||
|
\alertb{\P(y,\lambda|\phi,\sigma^2) }d\lambda\\}
|
||||||
|
\uncover<+->{&=
|
||||||
|
\frac{\Gamma\left(\frac{\phi}{\sigma^2-1}+y_i\right)}
|
||||||
|
{y_i!\Gamma\left(\frac{\phi}{\sigma^2-1}\right)}
|
||||||
|
\left(\frac{\sigma^2-1}{\sigma^2}\right)^{y_i}
|
||||||
|
\left(\sigma^2\right)^{\frac{-\phi}{\sigma^2-1}}}
|
||||||
|
\end{align*}
|
||||||
|
|
||||||
|
|
||||||
|
# Other Features
|
||||||
|
|
||||||
|
## Structural Features
|
||||||
|
|
||||||
|
### Structural Features
|
||||||
|
|
||||||
|
#### Levels of Structure
|
||||||
|
|
||||||
|
- usual \LaTeX\ \textbackslash\ section, \textbackslash\ subsection commands
|
||||||
|
- `frame` environments provide slides
|
||||||
|
- `block` environments divide slides into logical sections
|
||||||
|
- `columns` environments divide slides vertically (example later)
|
||||||
|
- overlays (\`a la prosper) change content of slides dynamically
|
||||||
|
|
||||||
|
#### \alertc{Overlay Alerts}
|
||||||
|
|
||||||
|
On the first overlay, \alert<1>{this text} is highlighted (or \emph{alerted}).
|
||||||
|
On the second, \alert<2>{this text} is.
|
||||||
|
|
||||||
|
|
||||||
|
### Code blocks
|
||||||
|
|
||||||
|
\footnotesize
|
||||||
|
|
||||||
|
```r
|
||||||
|
# Say hello in R
|
||||||
|
hello <- function(name) paste("hello", name)
|
||||||
|
```
|
||||||
|
|
||||||
|
. . .
|
||||||
|
|
||||||
|
```python
|
||||||
|
# Say hello in Python
|
||||||
|
def hello(name):
|
||||||
|
return("Hello" + " " + name)
|
||||||
|
```
|
||||||
|
|
||||||
|
. . .
|
||||||
|
|
||||||
|
```haskell
|
||||||
|
-- Say hello in Haskell
|
||||||
|
hello name = "Hello" ++ " " ++ name
|
||||||
|
```
|
||||||
|
|
||||||
|
. . .
|
||||||
|
|
||||||
|
```c
|
||||||
|
/* Say hello in C */
|
||||||
|
#include <stdio.h>
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
char name[256];
|
||||||
|
fgets(name, sizeof(name), stdin);
|
||||||
|
printf("Hello %s", name);
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
\normalsize
|
||||||
|
|
||||||
|
|
||||||
|
### Alerts
|
||||||
|
|
||||||
|
- First level \alert{alert}
|
||||||
|
- Second level \alertb{alert}
|
||||||
|
- Third level \alertc{alert}
|
||||||
|
- Fourth level \alertd{alert}
|
||||||
|
- Fifth level \alerte{alert}
|
||||||
|
|
||||||
|
# More Features
|
||||||
|
|
||||||
|
## Blocks
|
||||||
|
|
||||||
|
### Other Features
|
||||||
|
|
||||||
|
#### Levels of Structure
|
||||||
|
|
||||||
|
- Clean, extensively customizable visual style
|
||||||
|
- Hyperlinks ([http://github.com/izahn/iqss-beamer-theme](click here_)
|
||||||
|
- No weird scaling prosper
|
||||||
|
- slides are 96~mm~$\times$~128~mm
|
||||||
|
- text is 10-12pt on slide
|
||||||
|
- slide itself magnified with Adobe Reader/xpdf/gv to fill screen
|
||||||
|
- pgf graphics framework easy to use
|
||||||
|
- include external JPEG/PNG/PDF figures
|
||||||
|
- output directly to pdf: no PostScript hurdles
|
||||||
|
- detailed User's Manual (with good presentation advice, too)
|
||||||
|
|
||||||
|
|
||||||
|
### Theorems and Proofs
|
||||||
|
\framesubtitle{The proof uses \textit{reductio ad absurdum}.}
|
||||||
|
|
||||||
|
#### Theorem
|
||||||
|
There is no largest prime number.
|
||||||
|
|
||||||
|
#### Proof
|
||||||
|
> - Suppose $p$ were the largest prime number.
|
||||||
|
> - Let $q$ be the product of the first $p$ numbers.
|
||||||
|
> - Then $q+1$ is not divisible by any of them.
|
||||||
|
> - But $q + 1$ is greater than $1$, thus divisible by some prime
|
||||||
|
number not in the first $p$ numbers. \qedhere
|
||||||
|
|
||||||
|
### Blocks
|
||||||
|
|
||||||
|
#### Normal block
|
||||||
|
A \alert{set} consists of elements.
|
||||||
|
|
||||||
|
|
||||||
|
#### \alert{Alert block}
|
||||||
|
$2=2$.
|
||||||
|
|
||||||
|
#### \alertc{Example block}
|
||||||
|
The set $\{1,2,3,5\}$ has four elements.
|
||||||
|
|
||||||
|
|
||||||
|
# Appendix
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Backup Slides
|
||||||
|
|
||||||
|
<!-- \subsection{More stuff} -->
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Details
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Text omitted in main talk.
|
||||||
|
|
||||||
|
<!-- \subsection{Even more additional material} -->
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
More details
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Even more details
|
BIN
vignettes/iqssDemo.pdf
Normal file
BIN
vignettes/iqssDemo.pdf
Normal file
Binary file not shown.
@ -396,3 +396,4 @@ A simple `knitr::kable` example:
|
|||||||
knitr::kable(mtcars[1:5, 1:8],
|
knitr::kable(mtcars[1:5, 1:8],
|
||||||
caption="(Parts of) the mtcars dataset")
|
caption="(Parts of) the mtcars dataset")
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user