---
title: "Exercise 12.5"
author: ""
date: ""
output: 
  html_document:
    fig_height: 3
    fig_width: 5
  pdf_document:
    fig_height: 3
    fig_width: 5
  word_document:
    fig_height: 3
    fig_width: 5
---

```{r, setup, include=FALSE}
require(mosaic)   # Load additional packages here 

# Some customization.  You can alter or delete as desired (if you know what you are doing).
trellis.par.set(theme=theme.mosaic()) # change default color scheme for lattice
knitr::opts_chunk$set(
  tidy=FALSE,     # display code as typed
  size="small")   # slightly smaller font for code
```

## Exercise 12.5

Import data set for Exercise 12.5:
```{r}
power <- read.table("https://asta.math.aau.dk/datasets?file=power.txt", header = TRUE)
head(power)
```

The dataset contains the following variables:
- `consumption`: The monthly electrical power consumption of a chemical plant.
- `temperature`: The ambient temperature.
- `days`: The number of active days in the month.
- `purity`: The average product purity.
- `production`: The tons of product produced.

Fit a multiple regression model with `consumption` as the response and `temperature`, `days`, `purity`, `production` as predictors and answer the following questions:
  - Write down the prediction equation.
  - What is the effect on the predicted response if the production is increased by 1 ton while all other variables are kept fixed?
  - What is the interpretation of the intercept?
  - Find R-squared. What is the interpretation of this?
  - Make an overall F-test for the null-hypothesis that there is no effect of any of the predictors. What is your conclusion?
