forked from svmiller/svm-r-markdown-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsvm-rmarkdown-beamer-example.Rmd
162 lines (112 loc) · 3.42 KB
/
svm-rmarkdown-beamer-example.Rmd
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
---
title: An Example R Markdown Document
subtitle: (A Subtitle Would Go Here if This Were a Class)
author: Steven V. Miller
institute: Department of Political Science
titlegraphic: /Dropbox/teaching/clemson-academic.png
fontsize: 10pt
output:
beamer_presentation:
template: ~/Dropbox/miscelanea/svm-r-markdown-templates/svm-latex-beamer.tex
keep_tex: true
# toc: true
slide_level: 2
ioslides_presentation:
smaller: true
logo: ~/Dropbox/teaching/clemson-paw-transparent.png
make149: true
---
<style>
slides > slide.backdrop {
background: white;
border-bottom: 0px;
box-shadow: 0 0 0;
}
slides > slide {
font-family: 'Open Sans', Helvetica, Arial, sans-serif;
border-bottom: 3px solid #F66733;
box-shadow: 0 3px 0 #522D80;
}
.title-slide hgroup h1 {
color: #522D80;
}
h2 {
color: #522D80;
}
slides > slide.dark {
background: #522D80 !important;
border-bottom: 0;
box-shadow: 0 0 0;
}
.segue h2 {
color: white;
}
slides > slide.title-slide {
border-bottom: 0;
box-shadow: 0 0 0;
}
ol, ul {
padding-bottom: 10px;
}
</style>
# Pop Songs and Political Science
## Sheena Easton and Game Theory
Sheena Easton describes the following scenario for her baby:
1. Takes the morning train
2. Works from nine 'til five
3. Takes another train home again
4. Finds Sheena Easton waiting for him
Sheena Easton and her baby are playing a **zero-sum (total conflict) game**.
- Akin to Holmes-Moriarty game (see: von Neumann and Morgenstern)
- Solution: **mixed strategy**
## Rick Astley's Re-election Platform
Rick Astley's campaign promises:
- Never gonna give you up.
- Never gonna let you down.
- Never gonna run around and desert you.
- Never gonna make you cry.
- Never gonna say goodbye.
- Never gonna tell a lie and hurt you.
Whereas these pledges conform to the preferences of the **median voter**, we expect Congressman Astley to secure re-election.
## Caribbean Queen and Operation Urgent Fury
Billy Ocean released "Caribbean Queen" in 1984.
- Emphasized sharing the same dream
- Hearts beating as one
"Caribbean Queen" is about the poor execution of Operation Urgent Fury.
- Echoed JCS chairman David Jones' frustrations with military establishment.
Billy Ocean is advocating for what became the Goldwater-Nichols Act.
- Wanted to take advantage of **economies of scale**, resolve **coordination problems** in U.S. military.
## The Good Day Hypothesis
We know the following about Ice Cube's day.
1. The Lakers beat the Supersonics.
2. No helicopter looked for a murder.
3. Consumed Fatburger at 2 a.m.
4. Goodyear blimp: "Ice Cube's a pimp."
This leads to two different hypotheses:
- $H_0$: Ice Cube's day is statistically indistinguishable from a typical day.
- $H_1$: Ice Cube is having a good (i.e. greater than average) day.
These hypotheses are tested using archival data of Ice Cube's life.
# Example R code
## Example R stuff
```{r cars, echo = TRUE}
summary(cars)
```
## Slide with Plot
```{r pressure}
plot(pressure)
```
## ggplot code
```{r createdata, echo=TRUE, eval=FALSE}
df <- data.frame(x = rnorm(1000))
x <- df$x
base <- ggplot(df, aes(x)) + geom_density() + scale_x_continuous(limits = c(-5, 5))
base + stat_function(fun = dnorm, colour = "red")
```
## Another Plot
```{r plotit, echo=FALSE}
library(ggplot2)
df <- data.frame(x = rnorm(1000))
x <- df$x
base <- ggplot(df, aes(x)) + geom_density() + scale_x_continuous(limits = c(-5, 5))
base + stat_function(fun = dnorm, colour = "red")
```