plot.niqr: Plot Nonlinear Quantile Regression Coefficients

Description Usage Arguments Author(s) See Also Examples

View source: R/qrcmNL.R

Description

Plots quantile regression coefficients β(θ, p) as a function of p, based on a fitted model of class “niqr”.

Usage

1
2
## S3 method for class 'niqr'
plot(x, conf.int=TRUE, which=NULL, ask=TRUE, ...)

Arguments

x

an object of class “niqr”, typically the result of a call to niqr.

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 par.

Author(s)

Gianluca Sottile gianluca.sottile@unipa.ot

See Also

niqr for model fitting; test.fit.niqr for goodness of fit test; summary.niqr and predict.niqr for model summary and prediction.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
  # using simulated data

n <- 1000
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)

par(mfrow=c(1,2))
plot(model, ask=FALSE)

gianluca-sottile/qrcmNL documentation built on May 6, 2019, 6:01 p.m.