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

Exploratory analysis

Before starting with data analysis through the logistic 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(BCData)

The results are shown here:

> str(BCData)'data.frame':  699 obs. of  11 variables: $ Id              : int  1000025 1002945 1015425 1016277 1017023 1017122 1018099                           1018561 1033078 1033078 ... $ ClumpThickness  : int  5 5 3 6 4 8 1 2 2 4 ... $ CellSize        : int  1 4 1 8 1 10 1 1 1 2 ... $ CellShape       : int  1 4 1 8 1 10 1 2 1 1 ... $ MarginalAdhesion: int ...

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