rndald | R Documentation |
This function generates a vector of random numbers from an AL distribution at quantile p.
rndald(sigma, p, n)
sigma |
scale factor, a scalar value. |
p |
quantile or skewness parameter, p in (0,1). |
n |
number of observations |
Generates a vector of random numbers from an AL distribution as a mixture of normal'–'exponential distributions.
Returns a vector (n x 1)
of random numbers from an AL(0, \sigma
, p)
Kozumi, H., and Kobayashi, G. (2011). '"Gibbs Sampling Methods for Bayesian Quantile Regression."' Journal of Statistical Computation and Simulation, 81(11): 1565'-'1578. DOI: 10.1080/00949655.2010.496117
Yu, K., and Zhang, J. (2005). '"A Three-Parameter Asymmetric Laplace Distribution."' Communications in Statistics - Theory and Methods, 34(9-10), 1867'-'1879. DOI: 10.1080/03610920500199018
asymmetric Laplace distribution
set.seed(101)
sigma <- 2.503306
p <- 0.25
n <- 1
output <- rndald(sigma, p, n)
# output
# 1.07328
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.