plotqtplot.lmscreg {VGAM} | R Documentation

## Quantile Plot for LMS Quantile Regression

### Description

Plots the quantiles associated with a LMS quantile regression.

### Usage

    plotqtplot.lmscreg(fitted.values, object, newdata = NULL,
        percentiles = object@misc$percentiles, lp = NULL,
        add.arg = FALSE, y = if (length(newdata)) FALSE else TRUE,
        spline.fit = FALSE, label = TRUE, size.label = 0.06,
        xlab = NULL, ylab = "",
        pch = par()$pch, pcex = par()$cex, pcol.arg = par()$col,
        xlim = NULL, ylim = NULL,
        llty.arg = par()$lty, lcol.arg = par()$col, llwd.arg = par()$lwd,
        tcol.arg = par()$col, tadj = 1, ...)

### Arguments

`fitted.values` | Matrix of fitted values.
`object` | A VGAM quantile regression model, i.e., an object produced by modelling functions such as `vglm` and `vgam` with a family function beginning with `"lms."`, e.g., `lms.yjn`.
`newdata` | Data frame at which predictions are made. By default, the original data are used.
`percentiles` | Numerical vector with values between 0 and 100 that specify the percentiles (quantiles). The default is to use the percentiles when fitting the model. For example, the value 50 corresponds to the median.
`lp` | Length of `percentiles`.
`add.arg` | Logical. Add the quantiles to an existing plot?
`y` | Logical. Add the response as points to the plot?
`spline.fit` | Logical. Add a spline curve to the plot?
`label` | Logical. Add the percentiles (as text) to the plot?
`size.label` | Numeric. How much room to leave at the RHS for the label. It is in percent (of the range of the primary variable).
`xlab` | Caption for the x-axis. See `par`.
`ylab` | Caption for the x-axis. See `par`.
`pch` | Plotting character. See `par`.
`pcex` | Character expansion of the points. See `par`.
`pcol.arg` | Color of the points. See the `col` argument of `par`.
`xlim` | Limits of the x-axis. See `par`.
`ylim` | Limits of the y-axis. See `par`.
`llty.arg` | Line type. Line type. See the `lty` argument of `par`.
`lcol.arg` | Color of the lines. See the `col` argument of `par`.
`llwd.arg` | Line width. See the `lwd` argument of `par`.
`tcol.arg` | Color of the text (if `label` is `TRUE`). See the `col` argument of `par`.
`tadj` | Text justification. See the `adj` argument of `par`.
`...` | Arguments passed into the `plot` function when setting up the entire plot. Useful arguments here include `main` and `las`.

### Details

The above graphical parameters offer some flexibility when plotting the quantiles.

### Value

The matrix of fitted values.

### Note

While the graphical arguments of this function are useful to the user, this function should not be called directly.

### Author(s)

Thomas W. Yee

### References

Yee, T. W. (2004) Quantile regression via vector generalized additive models. Statistics in Medicine, 23, 2295–2315.

Documentation accompanying the VGAM package at http://www.stat.auckland.ac.nz/~yee contains further information and examples.

### See Also

`qtplot.lmscreg`.

### Examples

    ## Not run:
    fit = vgam(BMI ~ s(age, df=c(4,2)), fam=lms.bcn(zero=1), data=bminz)
    qtplot(fit)
    qtplot(fit, perc=c(25,50,75,95), lcol="blue", tcol="blue", llwd=2)
    ## End(Not run)

[Package VGAM version 0.7-9 Index]