Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

. In Section 7.7, it was mentioned that GAMs are generally fit using a backfitting approach. The idea behind backfitting is actually quite simple. We

. In Section 7.7, it was mentioned that GAMs are generally fit using a backfitting approach. The idea behind backfitting is actually quite simple. We will now explore backfitting in the context of multiple linear regression. Suppose that we would like to perform multiple linear regression, but we do not have software to do so. Instead, we only have software to perform simple linear regression. Therefore, we take the following iterative approach: we repeatedly hold all but one coefficient estimate fixed at its current value, and update only that coefficient estimate using a simple linear regression. The process is continued until convergencethat is, until the coefficient estimates stop changing. We now try this out on a toy example. (a) Generate a response Y and two predictors X1 and X2, with n = 100. (b) Initialize 1 to take on a value of your choice. It does not matter what value you choose. (c) Keeping 1 fixed, fit the model Y 1X1 = 0 + 2X2 + . You can do this as follows: > a beta2 a beta1 <- lm(a x1)$coef[2] (e) Write a for loop to repeat (c) and (d) 1,000 times. Report the estimates of 0, 1, and 2 at each iteration of the for loop. Create a plot in which each of these values is displayed, with 0, 1, and 2 each shown in a different color. 326 7. Moving Beyond Linearity (f) Compare your answer in (e) to the results of simply performing multiple linear regression to predict Y using X1 and X2. Use the abline() function to overlay those multiple linear regression coefficient estimates on the plot obtained in (e). (g) On this data set, how many backfitting iterations were required in order to obtain a good approximation to the multiple regression coefficient estimates?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Expert Performance Indexing In SQL Server

Authors: Jason Strate, Grant Fritchey

2nd Edition

1484211189, 9781484211182

More Books

Students also viewed these Databases questions