Skip to contents

Provide two type of plots for unitquantregs objects.

Usage

# S3 method for unitquantregs
plot(
  x,
  which = c("coef", "conddist"),
  output_df = FALSE,
  parm = NULL,
  level = 0.95,
  mean_effect = FALSE,
  mfrow = NULL,
  mar = NULL,
  ylim = NULL,
  main = NULL,
  col = gray(c(0, 0.75)),
  border = NULL,
  cex = 1,
  pch = 20,
  type = "b",
  xlab = bquote("Quantile level (" * tau * ")"),
  ylab = "Estimate effect",
  dist_type = c("density", "cdf"),
  at_avg = TRUE,
  at_obs = NULL,
  legend_position = "topleft",
  ...
)

Arguments

x

fitted model object of class unitquantregs.

which

character. Indicate the type of plot. Currently supported are "coef" which provide the estimated coefficients for several quantiles and "conddist" which provide the conditional distribution (cdf or pdf) at specific values of covariates.

output_df

logical. Should data.frame used to plot be returned?

parm

a specification of which parameters are to be plotted, either a vector of numbers or a vector of names. By default, all parameters are considered.

level

level of significance for the confidence interval of parameters.

mean_effect

logical. Should a line for the mean effect coefficients be added?

mfrow, mar, ylim, main, col, border, cex, pch, type, xlab, ylab

graphical parameters.

dist_type

character. Which conditional distribution should be plotted? The options are "density" or "cdf".

at_avg

logical. Should consider the conditional distribution at average values of covariates?

at_obs

list. List with name and values for each covariate.

legend_position

character. The legend position argument used in legend function.

...

other parameters to be passed through to plotting functions.

Value

If output_df = TRUE then returns a data.frame used to plot. Otherwise, no return value, called for side effects.

Details

The plot method for unitquantregs objects is inspired in PROC QUANTREG of SAS/STAT. This plot method provide two type of visualizations.

If which = "coef" plot the estimated coefficients for several quantiles.

If which = "conddist" plot the conditional distribution at specific values of covariates. The conditional distribution could be the cumulative distribution function if dist_type = "cdf" or the probability density function if dist_type = "pdf".

See also

Author

André F. B. Menezes