plot.iqrL: Plot Quantile Regression Coefficients with Longitudinal Data

Description Usage Arguments Author(s) See Also Examples

View source: R/iqrL2_auxfun.R

Description

Plots quantile regression coefficients β(u) and γ(v), based on a fitted model of class “iqrL”.

Usage

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

Arguments

x

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

conf.int

logical. If TRUE, asymptotic 95% confidence intervals are added to the plot.

polygon

logical. If TRUE, confidence intervals are represented by shaded areas via polygon. Otherwise, dashed lines are used.

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 options will permit creating Q-Q plots of u or v, which should be independently distributed according to a Uniform(0,1) distribution. The option ppplot(u,v) will generate a P-P plot that compares the empirical distribution of (u,v) with its theoretical value, F(u,v) = uv, at a discrete grid of points.

...

additional graphical parameters, that can include xlim, ylim, xlab, ylab, col, lwd, cex.lab, cex.axis, axes, frame.plot. See par.

Author(s)

Paolo Frumento paolo.frumento@unipi.it

See Also

iqrL for model fitting; summary.iqrL and predict.iqrL for model summary and prediction.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
  
  # using simulated data
  
  n <- 1000 # n. of observations
  n.id <- 100 # n. of clusters
  id <- rep(1:n.id, each = n/n.id) # cluster id

  x1 <- runif(n) # a level-1 covariate
  z1 <- rnorm(n.id) # a level-2 covariate

  V <- runif(n.id) # V_i
  U <- runif(n) # U_it

  alpha <- 2*(V - 1) + z1 # alpha
  y_alpha <- 1 + 2*qnorm(U) + 3*U*x1 # y - alpha
  y <- y_alpha + alpha[id] # observed outcome
  mydata <- data.frame(id = id, y = y, x1 = x1, z1 = z1[id])

  model <- iqrL(fx = y ~ x1, fu = ~ I(qnorm(u)) + u, 
    fz = ~ z1, fv = ~ -1 + I(qnorm(v)), id = id, data = mydata)
  par(mfrow = c(2,2))
  plot(model, ask = FALSE) 

qrcm documentation built on Feb. 2, 2021, 9:07 a.m.