dnormexp {dsfa} | R Documentation |
Probablitiy density function, distribution, quantile function and random number generation for the normal-exponential distribution.
dnormexp(
x,
mu = 0,
sigma_v = 1,
lambda = 1,
s = -1,
deriv = 0,
tri = NULL,
log.p = FALSE,
check = TRUE
)
pnormexp(
q,
mu = 0,
sigma_v = 1,
lambda = 1,
s = -1,
deriv = 0,
tri = NULL,
lower.tail = TRUE,
log.p = FALSE,
check = TRUE
)
qnormexp(
p,
mu = 0,
sigma_v = 1,
lambda = 1,
s = -1,
lower.tail = TRUE,
log.p = FALSE,
check = TRUE
)
rnormexp(n, mu = 0, sigma_v = 1, lambda = 1, s = -1, check = TRUE)
x |
vector of quantiles. |
mu |
vector of |
sigma_v |
vector of |
lambda |
vector of |
s |
|
deriv |
derivative of order |
tri |
optional, index arrays for upper triangular matrices, generated by |
log.p |
logical; if TRUE, probabilities p are given as log(p). |
check |
logical; if TRUE, check inputs. |
q |
vector of probabilities. |
lower.tail |
logical; if TRUE (default), probabilities are |
p |
vector of quantiles. |
n |
number of observations. |
A random variable \mathcal{E}
follows a normal-exponential distribution if \mathcal{E} = V + s \cdot U
, where V \sim N(\mu, \sigma_V^2)
and U \sim Exp(\lambda)
.
The density is given by
f_\mathcal{E}(\epsilon)=\frac{\lambda}{2} \exp \{\lambda (s \mu) + \frac{1}{2} \lambda^2 \sigma_V^2-\lambda (s \epsilon) \} 2 \Phi(\frac{1}{\sigma_V} (-s \mu)-\lambda \sigma_V+\frac{1}{\sigma_V}(s \epsilon)) \qquad,
where s=-1
for production and s=1
for cost function.
dnormexp
gives the density, pnormexp
give the distribution function, qnormexp
gives the quantile function, and rnormexp
generates random numbers, with given parameters. If the derivatives are calculated these are provided as the attributes gradient
, hessian
, l3
and l4
of the output of the density.
pnormexp()
: distribution function for the normal-exponential distribution.
qnormexp()
: quantile function for the normal-exponential distribution.
rnormexp()
: random number generation for the normal-exponential distribution.
Meeusen W, van Den Broeck J (1977). “Efficiency estimation from Cobb-Douglas production functions with composed error.” International economic review, 435–444.
Kumbhakar SC, Wang H, Horncastle AP (2015). A practitioner's guide to stochastic frontier analysis using Stata. Cambridge University Press.
Schmidt R, Kneib T (2020). “Analytic expressions for the Cumulative Distribution Function of the Composed Error Term in Stochastic Frontier Analysis with Truncated Normal and Exponential Inefficiencies.” arXiv preprint arXiv:2006.03459.
Gradshteyn IS, Ryzhik IM (2014). Table of integrals, series, and products. Academic press.
pdf <- dnormexp(x=seq(-3, 3, by=0.1), mu=1, sigma_v=2, lambda=1/3, s=1)
cdf <- pnormexp(q=seq(-3, 3, by=0.1), mu=1, sigma_v=2, lambda=1/3, s=1)
q <- qnormexp(p=seq(0.1, 0.9, by=0.1), mu=1, sigma_v=2, lambda=1/3, s=1)
r <- rnormexp(n=100, mu=1, sigma_v=2, lambda=1/3, s=1)