Description Usage Arguments Value Examples
density function plot of the error term on each quantile
1 |
y |
vector, dependent variable of quantile regression |
x |
matrix, matrix consisted independent variables of quantie regression |
tau |
sigle number or vector, quantiles |
smooth |
sigular, default is 100, the larger the smoother of density function |
error |
the convergence maximum error |
iter |
maximum iterations of the EM algorithm |
dataframe to plot the density function of the error term
1 2 3 4 5 6 7 8 9 10 11 12 | library(ggplot2)
data(ais)
x <- matrix(ais$LBM, ncol = 1)
y <- ais$BMI
tau = c(0.1, 0.5, 0.9)
ald_data <- frame_ald(y, x, tau, smooth = 10, error = 1e-6,
iter = 2000)
ggplot(ald_data) +
geom_line(aes(x = r, y = d, group = obs, colour = tau_flag)) +
facet_wrap(~tau_flag, ncol = 1, scale = "free") +
xlab('') +
ylab('Asymmetric Laplace Distribution Density Function')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.