Question: 3: Piecewise linear regression (15 marks) Consider the simulated data: simulated.data - read.csv (simulatedData.csv) attach (simulated.data) (a) (3 marks) Fit a simple linear model. Using

 3: Piecewise linear regression (15 marks) Consider the simulated data: simulated.data
- read.csv ("simulatedData.csv") attach (simulated.data) (a) (3 marks) Fit a simple linear
model. Using regression diagnostics, comment on the appropriateness of this model. (b)

3: Piecewise linear regression (15 marks) Consider the simulated data: simulated.data - read.csv ("simulatedData.csv") attach (simulated.data) (a) (3 marks) Fit a simple linear model. Using regression diagnostics, comment on the appropriateness of this model. (b) (3 marks) Fit a quadratic model. Using regression diagnostics, comment on the appropriateness of this model relative to part (a). (c) (3 marks) We will now consider a piecewise linear model of the form y={0+1x,2+3x,x=t, where t is a knot value separating the two pieces. Run the following code to get the model setup and visualize it: Using regression diagnostics, comment on the appropriateness of this model relative to parts (a) and (b). (d) (2 marks) Select the optimal placement of the knot t by finding the minima of the SSE for different values of t. Only consider the possible values of t to be in the set {8,9,10,11,12,13,14,15,16} (i.e the set of integers from 8 to 16 ). (e) (4 marks) Plot the model with the optimal knot selection in (d). Using regression diagnostics, comment on the appropriateness of this model relative to part (c). Decide which model is best and iustify. Back simulatedData.csv \begin{tabular}{|l|l|} \hliney & x \\ \hline 1.17255645638188 & 1 \\ \hline 2.30995938934991 & 2 \\ \hline 0.422280209539935 & 3 \\ \hline 0.910467129167686 & 4 \\ \hline 4.74079390935336 & 5 \\ \hline 2.05582451609365 & 6 \\ \hline 5.48941154106046 & 7 \\ \hline 4.78397581501351 & 8 \\ \hline 4.11780604382965 & 9 \\ \hline 3.04877664860426 & 10 \\ \hline 3.56746619594319 & 11 \\ \hline 4.51230758475783 & 12 \\ \hline 2.84638924407813 & 14 \\ \hline 5.9755419896824 & 15 \\ \hline 6.05674362087609 & 16 \\ \hline 9.01725775475125 & 17 \\ \hline 10.0211759762867 & 18 \\ \hline 12.9095469737425 & 19 \\ \hline 12.1709826081726 & 20 \\ \hline 13.4153279673201 & 21 \\ \hline 14.7111419955656 & 22 \\ \hline 16.9777985301804 & 23 \\ \hline 17.7136866338363 & 24 \\ \hline 20247165895 & 25 \\ \hline \hline \end{tabular}

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!