O'Reilly logo

Regression Analysis with R by Giuseppe Ciaburro

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Building a multiple linear regression model

In Chapter 2Basic 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.

Source: Linear Regression Datasets offered by the Department of Scientific Computing, Florida State University (http://people.sc.fsu.edu/~jburkardt/datasets/regression/regression.html).

When petrol is pumped into tanks, hydrocarbons escape. To evaluate ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required