Comparing the kernel and local-linear estimators: To illustrate the reduced bias of the local-linear estimator in comparison to the kernel estimator, generate n = 100 observations of artificial data according to the cubic regression equation
where the X-values are sampled from the uniform distribution X ; Uð0; 100Þ, and the errors are sampled from the normal distribution ε ; Nð0; 202Þ. Draw a scatterplot of the data showing the true regression line EðYÞ ¼ 100 – 5 (x/10 - 5 ) + (x/10 – 5)3. Then, use both kernel regression and local-linear regression to estimate the regression of Y on X, in each case adjusting the span to produce a smooth regression curve. Which estimator has less bias? Why?67 Save the data from this exercise, or generate the data in a manner that can be replicated.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here