O'Reilly logo

Introduction to R for Business Intelligence by Jay Gendron

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

Using a simple linear regression

You built a linear regression model by simply using the lm() function on your data. You also used the LINE approach to make sure that your model satisfied the assumptions of linear regression. Building SLRs is often straightforward, but it is very important that you know how to interpret the output.

Interpreting model output

There is a lot of information available within a linear regression model. You can see an expanded output by using the summary() function:

summary(model1) 

The following is the output:

Call:
lm(formula = revenues ~ marketing_total, data = adverts)
Residuals:
    Min      1Q  Median      3Q     Max 
-8.6197 -1.8963 -0.0006  2.1705  9.3689 
Coefficients:
             Estimate Std. Error t value Pr(>|t|)    
(Intercept) 32.006696 0.635590 ...

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