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.
- Findwhen C = 6
- Findwhen C = 4
- Findwhen C = 15
Code:
Predicted values:
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started