plot.niqr {qrcmNP} | R Documentation |
Plot Nonlinear Quantile Regression Coefficients
Description
Plots quantile regression coefficients as a function of p, based on a fitted model
of class “
niqr
”.
Usage
## S3 method for class 'niqr'
plot(x, conf.int=TRUE, which=NULL, ask=TRUE, ...)
Arguments
x |
an object of class “ |
conf.int |
logical. If TRUE, asymptotic 95% confidence intervals are added to the plot. |
which |
an optional numerical vector indicating which coefficient(s) to plot. If which = NULL, all coefficients are plotted. |
ask |
logical. If which = NULL and ask = TRUE (the default), you will be asked interactively which coefficients to plot. |
... |
additional graphical parameters, that can include xlim, ylim, xlab, ylab, col, lwd.
See |
Author(s)
Gianluca Sottile gianluca.sottile@unipa.ot
See Also
niqr
for model fitting; testfit.niqr
for goodness of fit test; summary.niqr
and predict.niqr
for model summary and prediction.
Examples
# using simulated data
n <- 300
x <- runif(n)
fun <- function(theta, p){
beta0 <- theta[1] + exp(theta[2]*p)
beta1 <- theta[3] + theta[4]*p
cbind(beta0, beta1)}
beta <- fun(c(1,1,1,1), runif(n))
y <- beta[, 1] + beta[, 2]*x
model <- niqr(fun=fun, x0=rep(0, 4), X=cbind(1, x), y=y)
plot(model, ask=FALSE)
[Package qrcmNP version 0.2.1 Index]