In Chapter 2, Basic Concepts – Simple Linear Regression, we learned to use the lm() function to create a simple linear regression model. We can also use it to solve this kind of problem.
To practice this method, we can draw on the many datasets available on the internet. In this case, we will load a .csv file named EscapingHydrocarbons.csv into the R environment; it contains the quantity of hydrocarbons escaping, depending on different variables.
When petrol is pumped into tanks, hydrocarbons escape. To evaluate ...