To do each example, just click the "Submit" button.
You do not have to type in any R instructions (that's already done for you).
You do not have to select a dataset (that's already done for you).

This the example from class (Wednesday, Sept. 20) of drawing a smooth
"trend" curve on a scatter plot, like the curves in the figures on p. 109
in Wild and Seber.

Comments

the plot command is just like any other plot command.
It draws the box, the axes, and the points. The curve is added later.

the library tells R (Rweb) to make available the commands
from a library. The ksmooth function
on-line help is in the modreg library
on-line help which is found under the "Packages" link on the
R documentation main page.
It can also be found by searching for "ksmooth" after following the
"Search Engine & Keywords" link on that same page.

Some libraries are there by default, others aren't. If you try a function
and R (Rweb) says "Error" ... "couldn't find", then either you spelled
the function wrong or you need a library command.

The function ksmooth fits a "smooth" curve to the scatter
plot. The function lines draws the line on the plot (the already
existing plot made by the plot command).

The value of the "smooth" curve at a particular x value
(call it x_{0} is the average of the y values
in a "window" of width 3.0 centered at x_{0},
that is, the average of all the y values corresponding
to x values
such that |x - x_{0}| < 1.5.

The value of the "bandwidth" (= box width) of 3.0 was chosen by trial and
error to get the prettiest picture. The argument kernel="box"
says to use a straight average of the y values in the window.

This the same data as the previous example, but a different smoother.

Everything just like the previous example except that we use
supsmu (the "super smoother") rather than ksmooth.
The operation of supsmu is too complicated to explain.
One virtue is that it needs no arguments other than the x
and y vectors it is to operate on. Another virtue is that
it draws prettier curves.