O'Reilly logo

Mastering Scientific Computing with R by Radia M. Johnson, Paul Gerrard

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

Linear regression

Regression analysis is a statistical method used to estimate the relationship among continuous variables. Linear regression is the simplest and most frequently used type of regression analysis. The aim of linear regression is to describe the response variable y through a linear combination of one or more explanatory variables x1, x2, x3, …, xp. In other words, the explanatory variables get weighted with constants and then summarized. For example, the simplest linear model is y = a + bx, where the two parameters a and b are the intercept and slope, respectively. The model formula for this relationship in R is y ~ x. Note that all parameters are left out. So, if our linear model was y = a + bx + cz, then our model formula will ...

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