---
title: "HW08 Multiple Regression Modeling"
author: "your name here"
format: html
execute:
  echo: true
  warning: false
  message: false
---


```{r}
# put the code to load any necessary R libraries and read in your cleaned data here. Delete this text afterward.
```

# Part 1: Multiple Linear Regression with one quantitative and one binary predictor. 
    
  
## 1. Identify variables

* Quantitative outcome: 
* Quantitative predictor: 
* Binary predictor: 
 
## 2. The mathematical model would look like: 

$$ Y \sim \beta_{0}....$$

* Let $y$ be 
* Let $x_{1}$ be 
* Let $x_{2}=0$ when 
* Let $x_{2}=1$ when 

## 3. Fit the multivariable model

```{r}

```

## 4. Interpret all regression coefficients of the multivariable model.

* $b_{0}$: 
* $b_{1}$: 
* $b_{2}$: 

## 5. Assess model fit

```{r}
#| fig-width: 10
#| fig-height: 7
#| layout-ncol: 3
# Update the model name in the code below then uncomment those lines 
#check_normality(pen.sex.model) |> plot(type = "density") 
#check_normality(pen.sex.model) |> plot(type = "qq") + 
#  scale_y_continuous(limits = c(-3, 3))  
#check_heteroscedasticity(pen.sex.model) |> plot() 
```

-----

# Part 2: Categorical Predictor



## 1. Identify variables

* Quantitative outcome: 
* Quantitative predictor: 
* Binary predictor: 

## 2. The mathematical model would look like: 

$$ Y \sim \beta_{0} + .....$$

* Let $y$ be 
* Let $x_{1}$ be 
* Let $x_{2}=1$ when 
* Let $x_{3}=1$ when 

The reference group 

## 3. Fit the multivariable model

```{r}

```

## 4. Interpret all regression coefficients of the multivariable model.

* $b_{0}$: 
* $b_{1}$:  
* $b_{2}$: 
* $b_{3}$: 

> add more betas if needed for your variable

## 5. Assess model fit

```{r}
#| fig-width: 10
#| fig-height: 7
#| layout-ncol: 3
# Update the model name in the code below then uncomment those lines 
#check_normality(pen.sex.model) |> plot(type = "density") 
#check_normality(pen.sex.model) |> plot(type = "qq") + 
#  scale_y_continuous(limits = c(-3, 3))  
#check_heteroscedasticity(pen.sex.model) |> plot() 
```




