plot.gcrq {quantregGrowth} | R 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=NULL, add = FALSE, res = FALSE, conf.level=0, axis.tau=FALSE,
interc=TRUE, se.interc=FALSE, legend = FALSE, select.tau, deriv = FALSE,
cv = FALSE, transf=NULL, lambda0=FALSE, shade=FALSE, overlap=NULL, rug=FALSE,
overall.eff=TRUE, grid=NULL, smoos=NULL, split=FALSE, shift=0, type=c("sandw","boot"),
n.points=NULL, ...)
Arguments
x |
a fitted |
term |
the variable name or its index in the formula entering the model. Can be vector. Both linear ad spline terms (i.e. included in the model via |
interc |
Should the smooth term be plotted along with the model intercept (provided it is included in the model)? Of course such argument is ignored if the smooth term has been called via |
se.interc |
logical. If |
add |
logical. If |
res |
logical. If |
conf.level |
logical. If larger than zero, pointwise confidence intervals for the fitted quantile curve are also shown (at the confidence level specified by |
axis.tau |
logical. If |
legend |
logical. If |
select.tau |
an optional numeric vector to draw only some of the fitted quantiles. Percentile values or integers 1 to |
deriv |
logical. If |
cv |
logical. If |
transf |
An optional character string (with |
lambda0 |
logical. If |
shade |
logical. If |
overlap |
NULL or numeric (scalar or vector). If provided and different from |
rug |
logical. If |
overall.eff |
logical. If the smooth term has been called via |
grid |
if provided, a grid of horizontal and vertical lines is drawn. |
smoos |
logical, indicating if the residuals (provided that |
split |
logical. If there are multiple terms (both smooth and linear) and |
shift |
Numerical value(s) to be added to the curve(s) to be plotted. If vector with length equal to the number of quantile curves to plot, the |
type |
If |
n.points |
On how many values the plotted lines should rely on? If |
... |
Additional graphical parameters: |
Details
Takes a "gcrq" object and diplays the fitted quantile curves as a function of the covariate specified in term
. If conf.level
>0 pointwise confidence intervals are also displayed. When the object contains the component cv
, plot.gcrq
can display cross-validation scores against the lambda values, see argument cv
. If a single quantile curve is being displayed, the default 'ylab' includes the relevant edf value (leaving out the basis intercept). If axis.tau=TRUE
and the fit includes several quantile curves, plot.gcrq()
portrays the estimated coefficients versus the probability values. If term
refers to a categorical variable, the point estimates against the categories are plotted (conf.level
is ignored).
Value
The function simply generates a new plot or adds fitted curves to an existing one.
Note
Plotting non-crossing curves could depend on the arguments 'interc' and 'shift', in turn depending on how the model has been specified. Take care about that!
Author(s)
Vito M. R. Muggeo
See Also
Examples
## Not run:
## use the fits from ?gcrq
#The additive model
plot(o, res=TRUE, col=2, conf.level=.9, shade=TRUE, split=TRUE)
par(mfrow=c(2,2))
plot(m5, select.tau=c(.1,.5,.9), overlap=0.6, legend=TRUE)
plot(m5, grid=list(x=8,y=5), lty=1) #a 8 times 5 grid..
plot(m7, cv=TRUE) #display CV score versus lambda values
plot(m7, res=TRUE, grid=list(x=5, y=8), col=4) #fitted curves at the best lambda value
## End(Not run)