Question: Using R and the data in the table below, perform the regression of D on C (i.e., report the regression equation). C. l D l

Using R and the data in the table below, perform the regression of D on C (i.e., report the regression equation).

C. l D

l

3 l 2

6 l 7

8 l 5

9 l 4

1 l 0

3 l 4

Hint: The code to enter the vectors C and D into R is:

C <- c(3, 6, 8, 9, 1, 3)

D <- c(2, 7, 5, 4, 0, 4)

You must figure out how to obtain the regression equation from R. Enter the code below and write the regression equation using the output provided by R.

Code:

Regression equation (remember to use a hat when it is appropriate):

Next, Plot the data and line of best fit in R and paste it into this document

Code:

Plot:

Next, using the predict function in R, find each of the following predicted values of D, for the given value of C regardless of whether or not it is appropriate to do so.

  1. Findwhen C = 6
  2. Findwhen C = 4
  3. Findwhen C = 15

Code:

Predicted values:

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!