class: center, middle, inverse, title-slide # Steve’s Xaringan Presentation ## POSC 0000 – It Would Be Cool If This Were an Actual Class Presentation ### Steven V. Miller
Department of Political Science --- # Install Xaringan First Install the **xaringan** package from [Github](https://github.com/yihui/xaringan): ```r devtools::install_github("yihui/xaringan") ``` You are recommended to use the [RStudio IDE](https://www.rstudio.com/products/rstudio/), but you do not have to. - Create a new R Markdown document from the menu `File -> New File -> R Markdown -> From Template -> Ninja Presentation`;<sup>1</sup> - Click the `Knit` button to compile it. --- # remark.js Maximizes the Presentation Value Press `h` or `?` to see controls you have in remark.js. Hit `Esc` to exit that screen. --- class: center, middle # You can do this to your slides if you want ## Add `class: center, middle` to the start of your slide. ### Perhaps you want the appearance of a secondary title slide, which is what this will do. For example, check this out... --- class: center, middle # Pop Music and Political Science ## POSC 0000 -- It Would Be Cool If This Were an Actual Class Presentation ### I am not funny and you will be forgiven for thinking of me as impossibly uncool. --- # Sheena Easton and Total Conflict Sheena Easton describes the following scenario for her baby: - Takes the morning train - Works from nine 'til five - Takes another train home again - 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), or "matching pennies." - Useful for modeling strategic counterterrorism dilemmas between a government and terrorist group. --- # A Total Conflict Between Sheena Easton and Her Baby | | Sheena Easton Stays Home | Sheena Easton Goes to Baby's Work | |-------------------------|---------------------|------------------| | **Baby Home Again** | -100, **100** | **100**, 0 | | **Baby Stays at Work** | **50**, 0 | -100, **100** | -- <br /> Notice we have no pure strategies, and no Nash equilibrium. - Sheena Easton wants to proverbially "match pennies." - Her baby has diametrically opposed preferences, fearing for his safety. Solution: mixed strategy. --- background-image: url(https://media.giphy.com/media/dqZSIfquVhSg0/giphy.gif) background-position: 50% 50% background-size: 100% class: center, bottom, fullscale # Run... --- # Congressman Astley's Re-election Platform Assume Congressman Astley presides over a competitive district in which he seeks reappointment. He promises he's: - 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. Are these promises (if credible) sufficient to secure re-election? --- ![SDFSFDSFS](svm-xaringan-example_files/figure-html/unnamed-chunk-2-1.svg) --- background-image: url(https://media.giphy.com/media/Vuw9m5wXviFIQ/giphy.gif) background-position: 50% 50% background-size: 100% class: center, bottom, fullscale # Re-election Dance --- # Caribbean Queen and Operation Urgent Fury .pull-left[ 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. - Coordination problems plagued its execution from the start. - Echoed JCS chairman David Jones' frustrations with military establishment. ] .pull-right[ ![](https://assets.rbl.ms/17298787/980x.jpg) *This seriously happened, btw..* ] 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. --- background-image: url(https://i.makeagif.com/media/9-05-2015/auHafh.gif) background-position: 50% 50% background-size: 100% class: center, bottom, fullscale # The military establishment was the tiger we wanted to tame all along. --- # 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 day. These hypotheses are tested using archival data from Ice Cube's life to estimate an item response model of the "goodness" of Ice Cube's days. --- ![SDFSFDSFS](svm-xaringan-example_files/figure-html/unnamed-chunk-3-1.svg) --- background-image: url(https://media.giphy.com/media/cgh25bl5dgK3u/giphy.gif) background-position: 50% 50% background-size: 100% class: center, bottom, fullscale --- class: center, middle # You Can Do Other Stuff in Xaringan Too ## POSC 0000 -- It Would Be Cool If This Were an Actual Class Presentation ### I might use it mostly for the ability to put GIFs in class presentations, but it's flexible enough to do almost anything. --- Show some R code and execute it if you'd like. ```r pi ``` ``` ## [1] 3.141593 ``` ```r 3+5 ``` ``` ## [1] 8 ``` ```r rnorm(10) ``` ``` ## [1] 2.3360163 -1.4155523 -0.5883711 -1.0664700 0.1020312 0.4102483 ## [7] -0.4007678 0.2821428 1.5215133 -0.5227195 ``` --- Here's a simple ultimatum game, a la Fearon (1995). Done via `DiagrammeR`.
--- # Conclusion Xaringan is a nifty Rstudio add-on/package for creating HTML presentations. - I think I'm still more inclined toward Beamer but Xaringan has tons of flexibility. - Have an interactive component to your presentation (e.g. `leaflet` or a Shiny app)? You probably want Xaringan. Plus, you can put GIFs into your presentation with Xaringan. That's nifty. Maybe students will like that. --- background-image: url(https://i.imgur.com/IHeUeZ9.gif) background-position: 50% 50% background-size: 100% class: center, bottom, fullscale Questions? Hate mail? Stay out of my mentions @stevenvmiller