Plot the Contents of a preplot.gam Object

DESCRIPTION:
Plots a preplot.gam object.

USAGE:
gplot(x, y, se.y, residuals, rug, scale, se, ...)

REQUIRED ARGUMENTS:
x:
the x variable for plotting
y:
the numeric fitted response

OPTIONAL ARGUMENTS:
se.y:
pointwise standard errors for y; can be NULL.
residuals:
residuals corresponding to each point y; can be NULL.
rug:
if TRUE, a rugplot is produced at the base of the plot
scale:
a non-negative scale for the y-axis
se:
if TRUE, pointwise standard errors are included in the plot

Graphical parameters may also be supplied as arguments to this function (see par). In addition, the high-level graphics arguments described under par and the arguments to title may be supplied to this function.


SIDE EFFECTS:
a plot is produced on the current graphics device.

DETAILS:
This is a generic plotting function for representing fitted gam functions. The type of function plot depends on the class of x. Methods exists for several data classes. The default behavior is to produce no plot and issue a warning. If x is numeric, the function is represented by a polygon connecting the fitted values y ordered by x. If the class is factor, the values of y are constant within each level of x, and the function is represented by a step-function. If x is a list (with two numeric variables), or matrix (2 column), the function is represented by a perspective surface.

gplot is not called directly by users; rather, it is called by plot.preplot.gam, the plot method for preplot.gam objects. Such an object is a list of fitted terms, each of which has components x, y, se.y, etc, and plot.preplot.gam simply dispatches them as arguments to gplot.

Users will occasionally encounter examples where no gplot method corresponding to the data class of x exists. In this case, no plot is produced, and two possible avenues exist. Either one can write a new gplot method for that particular class which would then be available for all future encounters, or one could simply construct a plot on a one time basis using the precomputed data in the preplot.gam object.


SEE ALSO:
plot.gam , preplot.gam .