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 `x1`

and `x3`

, the formula would be `y ~ x1 + x3`

.

- Build the multiple linear regression model with
`gasoline_lm <- lm(y~., data=Gasoline)`

. Here, the formula`y~.`

considers the variable`y`

as the dependent variable and all the remaining variables in the`Gasoline`

data frame as independent variables. - Get the details of the fitted multiple linear regression model with
`summary(gasoline_lm)`

.The R screen then appears as follows:

As with the simple ...

Start Free Trial

No credit card required