plot.unitquantregs {unitquantreg} | R Documentation |
Plot method for unitquantregs
objects
Description
Provide two type of plots for unitquantregs
objects.
Usage
## S3 method for class '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 |
which |
character. Indicate the type of plot. Currently supported are |
output_df |
logical. Should |
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 |
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 |
... |
other parameters to be passed through to plotting functions. |
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"
.
Value
If output_df = TRUE
then returns a data.frame used to plot.
Otherwise, no return value, called for side effects.
Author(s)
André F. B. Menezes