Last data update: 2014.03.03

R: Plot method for gcrq objects
plot.gcrqR Documentation

Plot method for gcrq objects

Description

Displaying the estimated growth charts from a gcrq fit.

Usage

## S3 method for class 'gcrq'
plot(x, term, add = FALSE, y = FALSE, legend = FALSE, select.tau, 
    deriv = FALSE, cv = FALSE, transf=NULL, lambda0=FALSE,...)

Arguments

x

a fitted "gcrq" object.

term

the smooth variable name entering the model via ps. Relevant fitted quantile curves will be plotted. It may be missing if the model includes a single smooth term.

add

logical. If TRUE the fitted quantile curves are added on the current plot.

y

logical. If TRUE raw data are also displayed, provided that the object has been called with the argument y=TRUE.

legend

logical. If TRUE a legend is drawn on on the right side of the fitted curves.

select.tau

an optional numeric vector to draw only some of the fitted quantiles. Percentile values or integers 1 to length(tau) may be supplied.

deriv

logical. If TRUE the first derivative of the curve is displayed.

cv

logical. If TRUE and the "gcrq" object contains the matrix cv, then the cross-validation scores against the lambda values are plotted.

transf

An optional character string (with "y" as argument) meaning a function to apply to the response variable before plotting. E.g. "(exp(y)-0.1)". See argument "transf" in gcrq().

lambda0

logical. If cv=TRUE, should the CV plot include also the first CV value? Usually the first CV value is at lambda=0, and typically it is much bigger than the other values making the plot not easy to read. Default to FALSE to ignore the first CV value in the plot.

...

Additional graphical parameters, such as ‘xlab’, ‘ylab’, and ‘xlim’; 'lwd', 'col' and 'lty' for the fitted quantile lines; ‘cex’ for the legend (if legend=TRUE); 'cex.p', 'col.p', and 'pch.p' for the points (if y=TRUE).

Details

Takes a "gcrq" object and diplays the fitted quantile curves. When the object contains the component cv, plot.gcrq can display cross-validation scores against the lambda values, see argument cv.

Value

The function simply generates a new plot or adds fitted curves to an existing one.

Author(s)

Vito M. R. Muggeo

See Also

gcrq

Examples

## see ?gcrq

Results