rndald {bqror} | R Documentation |
Generates random numbers from an AL distribution
Description
This function generates a vector of random numbers from an AL distribution at quantile p.
Usage
rndald(sigma, p, n)
Arguments
sigma |
scale factor, a scalar value. |
p |
quantile or skewness parameter, p in (0,1). |
n |
number of observations |
Details
Generates a vector of random numbers from an AL distribution as a mixture of normal'–'exponential distributions.
Value
Returns a vector (n x 1)
of random numbers from an AL(0, \sigma
, p)
References
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
See Also
asymmetric Laplace distribution
Examples
set.seed(101)
sigma <- 2.503306
p <- 0.25
n <- 1
output <- rndald(sigma, p, n)
# output
# 1.07328