Exploratory analysis

Before starting with data analysis through the multiple linear regression, we conduct an exploratory analysis to understand how the data is distributed and extract preliminary knowledge. Let's start by checking the dataset using the str() function. This function provides a compact display of the internal structure of an object. Ideally, only one line for each basic structure is displayed:

str(BHData)

The results are shown here:

> str(BHData)'data.frame':  506 obs. of  14 variables: $ crim   : num  0.00632 0.02731 0.02729 0.03237 0.06905 ... $ zn     : num  18 0 0 0 0 0 12.5 12.5 12.5 12.5 ... $ indus  : num  2.31 7.07 7.07 2.18 2.18 2.18 7.87 7.87 7.87 7.87                 ... $ chas   : int  0 0 0 0 0 0 0 0 0 0 ... $ nox : num 0.538 0.469 0.469 0.458 ...

Get Regression Analysis with R now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.