---
title: "UC Xaringan Template"
author: "Saannidhya Rawat"
output:
  Rbearcat::bcat_xaringan: 
    nature:
      # autoplay: 5000
      highlightStyle: solarized-light
      highlightLanguage: ["r", "css", "yaml"]
      slideNumberFormat: "" 
      highlightLines: true
      countIncrementalSlides: false
      ratio: "16:9"
---

```{r setup, include=FALSE}
options(htmltools.dir.version = FALSE)

# load packages
library(Rbearcat)
library(tidyverse)
library(lubridate)
library(haven)
library(stringr)
library(here)
library(knitr)
library(janitor)
library(scales)
library(viridis)
library(RColorBrewer)
library(kableExtra)
library(flextable)
# include additional packages here (if needed)
# library(DT)
# library(ggrepel)

# set default Rmd options
Rbearcat::bcat_setup_rmd()

# update figure setting from util_setup_rmd
knitr::opts_chunk$set(out.width = "50%", fig.retina = 3)

# set default UC geoms
Rbearcat::set_UC_geoms()
```

class: title-slide, left, top

# `r rmarkdown::metadata$title`

##### `r rmarkdown::metadata$author`

#### `r format(Sys.Date(), '%B %e, %Y')`

---
# Xaringan basics

* add new slides with `---`

* use pauses with `--`, like so

--

* while in a presentation, use `?` to see available navigation options

---

# Slide with content in columns
 
.pull-left[
A numbered list.

1. item 1
2. item 2
3. item 3
]

.pull-right[
A list:

* item 1
* item 2
  * sub-item 1
  * sub-item 2.2
]

---
class: inverse, center, middle

# Section Separator

---

# Figures generated by R:

```{r line-plot, fig.cap="A Line Plot"}

# using function from Rbearcat package
Rbearcat::bcat_plt_line(df = economics,
                     x = date,
                     y = unemploy)

```

---

# A nicely formatted table:

```{r table}

Rbearcat::bcat_fmt_style_table(iris[1:10,])

```

---

# Some math 

A vector of observations $y$ having $n$ components is assumed to be a realization of a random variable $Y$ whose components are independently distributed with means $\mu$.

In the original formulation of GLMs, the assumed distribution of $Y$ is a member of an *exponential family* which have a probability density function of form:

$$f(y_i) = exp\{\frac{y_i\theta_i - b(\theta_i)}{a_i(\phi)} + c(y_i, \phi)\}$$

where $\theta_i$ and $\phi$ are parameters and $a(\cdot)$, $b(\cdot)$, and $c(\cdot)$ are known functions.
