```{r, setup, include=FALSE}
library(mosaic)
```

## Agresti exercise 13.7

Import data (this data set includes the variable `New`):
```{r}
HousePriceFull <- read.delim("https://asta.math.aau.dk/datasets?file=HousePriceFull.txt")
```

First interpret the following plots:
```{r}
gf_boxplot(Price ~ New, data = HousePriceFull)
gf_boxplot(Size ~ New, data = HousePriceFull)
gf_point(Price ~ Size, color = ~New, data = HousePriceFull)
```

Fit the linear model corresponding to Table 13.17:
```{r}
## Write commands like:
##model <- lm( ??? ~ ???, data = ??? )
##summary(model)
```

Write the prediction equation with appropiate notation:
$$
\hat y = ???
$$
Plot the two regression lines:
```{r}
## plotModel( ??? )
```


## Agresti exercise 13.8

Make the relevant plot(s) using `gf_point`:

```{r}
## gf_point(??? ~ ???, group = ~???, color = ~???, data = ???) %>% gf_lm()
```

Fit the linear model corresponding to Table 13.18 in Agresti:
```{r}
## Write commands like:
## model <- lm( ??? ~ ???, data = ??? )
## summary(model)
```

Write the prediction equations for old and new houses:
$$
\hat y_{old} = ???\\
\hat y_{new} = ???
$$

Is the interaction significant?