plot.niqr: Plot Nonlinear Quantile Regression Coefficients In qrcmNP: Nonlinear and Penalized Quantile Regression Coefficients Modeling

 plot.niqr R Documentation

Plot Nonlinear Quantile Regression Coefficients

Description

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

Usage

## S3 method for class 'niqr'


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

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)