Question: Please install packages faraway and use prostate data. (a) Create a sub-data called oddprostate which only contains the odd rows of the data. (b) Calculate

Please install packages faraway and use prostate data.

(a) Create a sub-data called oddprostate which only contains the odd rows of the data.

(b) Calculate the mean, min, max and variance of each variable in our new oddprostate data.

(c) Use ordinary least square estimation to model two linear relationships: lpsa lcavol and lcavol lpsa, use original data.

(d) Display both regression lines on one plot. Use blue to represent lpsa lcavol, red to represent lcavol lpsa.

(e) What is the first 5 fitted values in lpsa lcavol? What is the last 5 residual 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 Databases Questions!