You are on page 1of 1

DMPM Lab Assignment -3

Linear Regression Model

1. Read the dataset that is provided to you.


2. Build a suitable linear regression model using R.
3. Analyze the predicted values of the response variable.
4. Compute the residuals and plot the residual values.
5. Develop some metrics to determine the accuracy of your regression model
6. Save your R command file.
7. Save your code and results in a word file and submit it on the VOLP.

The R function lm is used to fit linear (regression) models. The syntax for this command is
given below:

lm(formula, data, subset, weights, na.action, method = "qr", model = TRUE, x = FALSE, y =
FALSE, qr = TRUE, singular.ok = TRUE, contrasts = NULL, offset, …)

Type >help(lm) in Rstudio to get detailed help on lm command.

In help also check for “An object of class "lm" is a list containing at least the following
components” how to retrieve various components of object of class lm.

You might also like