Book Image

Introduction to R for Business Intelligence

By : Jay Gendron
Book Image

Introduction to R for Business Intelligence

By: Jay Gendron

Overview of this book

Explore the world of Business Intelligence through the eyes of an analyst working in a successful and growing company. Learn R through use cases supporting different functions within that company. This book provides data-driven and analytically focused approaches to help you answer questions in operations, marketing, and finance. In Part 1, you will learn about extracting data from different sources, cleaning that data, and exploring its structure. In Part 2, you will explore predictive models and cluster analysis for Business Intelligence and analyze financial times series. Finally, in Part 3, you will learn to communicate results with sharp visualizations and interactive, web-based dashboards. After completing the use cases, you will be able to work with business data in the R programming environment and realize how data science helps make informed decisions and develops business strategy. Along the way, you will find helpful tips about R and Business Intelligence.
Table of Contents (19 chapters)
Introduction to R for Business Intelligence
About the Author
About the Reviewers
R Packages Used in the Book
R Code for Supporting Market Segment Business Case Calculations

Understanding linear regression

There are several reasons why linear regression continues to be useful and powerful for data analytics:

  • Linear regression tends to work well on a wide variety of datasets

  • Linear regression can address many business intelligence problems

  • Linear regression provides a solid foundation on which you can learn more advanced and sophisticated prediction modeling techniques

In a business context, analysts use linear regression in diverse endeavors such as evaluating trends, making revenue estimates, analyzing the impact of price or supply changes, and assessing risk. You will start this journey by building a linear model.

The lm() function

The principal tool used for linear regression in R is the lm() function. Refer to its help page by typing ?lm into your console. You will see the function has 13 arguments. For the most part, you will be using just two arguments, formula and data.

When you run a linear regression using lm(), R returns an object of the lm class. This object...