O'Reilly logo

R Statistical Application Development by Example Beginner's Guide by Prabhanjan Narayanachar Tattar

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

Time for action – building a simple linear regression model

We will build the simple linear regression model using the lm function with its useful arguments.

  1. Create a simple linear regression model for CPU_Time as a function of No_of_IO by keying in IO_lm <- lm(CPU_Time ~ No_of_IO, data=IO_Time).
  2. Verify that IO_lm is of the lm class with class(IO_lm).
  3. Find the details of the fitted regression model using the summary function: summary(IO_lm).

    The output is given in the following screenshot:

    Time for action – building a simple linear regression model

    Figure 2: Building the first simple linear regression model

The first question you should ask yourself is, "Is the model significant overall?". The answer is provided ...

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