---
title: "APSA Workshop"
author: "Alejandra"
date: "2024-09-17"
output:
  html_document:
    df_print: paged
  pdf_document: default
  word_document: default
---

# Quick overview into how to write an R Markdown Document. 
This is a quick example on how to incorporate LaTeX into R markdown. 

If we want to write math, use $y_i=\beta_0+\beta_1x_i+\epsilon_i$

```{r}
quickmath <- 2+2
print(quickmath)

```

Now we're going to use the Cars dataset, which is an inbuilt dataset in R with the speed and distance of cars. 

```{r cars}
require(stargazer)
cars <- cars 
```

```{r, results="asis"}
# quick model 
model = lm(dist ~ speed, data=cars)
stargazer(model, type="html")
```