en:learning:schools:s01:worksheets:ba-ws-08-1

This worksheet revisits the regression and prediction topic but this time from a non-linear point of view. After completing this worksheet you should know how to use local regression models for fitting relationships within your data sets.

R Studio — we recommend to use R Studio for (interactive) programming with R. You can download R Studio from the official web page.

- your script and data from W02-1: Reading CSV files

First things first: the following analysis is build on top of your script from W02-1. Please copy your script “W02-1.R”, rename the copy to “W08-1.R” and use it for the programming tasks of this worksheet.

Please visualize once again the relation between animal activity and coverage.

Perhaps there are models that fit better than the linear regression! Let's try a polynomial regression using the loess() function. Add the prediction of the loess model in our scatterplot using the lines() function which works almost identical to regLine().

Now let's check out how the loess model compares to the linear regression when it comes to predictions. Please compute a leave-one-out validation as in W06-1 but this time use the loess model. How do the error statistics compare to the linear prediction model?

en/learning/schools/s01/worksheets/ba-ws-08-1.txt · Last modified: 2015/09/22 16:22 (external edit)

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 4.0 International