The method of building a multiple linear regression model remains the same as earlier. If all the variables in
data.frame are to be used, we use the formula
y ~ .. However, if we need specific variables, say
x3, the formula would be
y ~ x1 + x3.
gasoline_lm <- lm(y~., data=Gasoline). Here, the formula
y~.considers the variable
yas the dependent variable and all the remaining variables in the
Gasolinedata frame as independent variables.
The R screen then appears as follows:
As with the simple ...