---
title: "Lecture 12 Exercises"
author: "Your Name"
output: html_document
---
```{r setup, message = FALSE, warning = FALSE, echo=FALSE}
knitr::opts_chunk$set(message = FALSE, warning = FALSE, dev="svg", tidy=TRUE,  tidy.opts = list(only.comment=TRUE,  width.cutoff=80))
library(summarytools)
library(dplyr)
```

We're going back to the COVID-19 data that we used before, we need to load it first.  (It's also available locally in the RStudio.cloud instance or from [my website](https://quantoid.net/files/reg3/counties.rda))

```{r}
load(file("https://quantoid.net/files/reg3/counties.rda"))
```

This makes an object in your workspace called `counties`.  To remind, here's a summary of the data: 

```{r, results='asis', eval=FALSE}
counties %>% 
  select(-c("fips", "NAME", "date", "state", "st")) %>% 
  dfSummary(., plain.ascii=FALSE)
```

I want you to use the data to answer the following questions. 

### Question 1

Filter the data to look at just California.  

- Put all of the covariates into a regression tree model and evaluate the result. 

- Put all of the covariates into a MARS model and evaluate the result. 

- Put all of the covariates into a polywog model and evaluate the results. 

- How do these compare with the linear model results? 

Choose a few continuous variables as predictors of the log of `cases` per capita and estimate a linear model. 
