dcomperr {dsfa}  R Documentation 
Probablitiy density, distribution, quantile function and random number generation for the composed error term distribution.
dcomperr(
x = 0,
mu = 0,
sigma_v = 1,
par_u = 1,
s = 1,
family = "normhnorm",
deriv = 0,
tri = NULL,
log.p = FALSE,
check = TRUE
)
pcomperr(
q,
mu = 0,
sigma_v = 1,
par_u = 1,
s = 1,
family = "normhnorm",
deriv = 0,
tri = NULL,
lower.tail = TRUE,
log.p = FALSE,
check = TRUE
)
qcomperr(
p,
mu = 0,
sigma_v = 1,
par_u = 1,
s = 1,
family = "normhnorm",
lower.tail = TRUE,
log.p = FALSE,
check = TRUE
)
rcomperr(
n,
mu = 0,
sigma_v = 1,
par_u = 1,
s = 1,
family = "normhnorm",
check = TRUE
)
x 
vector of quantiles. 
mu 
vector of 
sigma_v 
vector of 
par_u 
vector of parameter of the (in)efficiency term. Must be positive. 
s 

family 

deriv 
derivative of order 
tri 
optional, index arrays for upper triangular matrices, generated by 
log.p 
logical; if 
check 
logical; if TRUE, check inputs. 
q 
vector of quantiles. 
lower.tail 
logical; if TRUE (default), probabilities are 
p 
vector of probabilities. 
n 
number of observations. 
This is wrapper function for the normalhalfnormal and normalexponential distribution. A random variable \mathcal{E}
follows a composed error distribution if \mathcal{E} = V + s \cdot U
, where V \sim N(\mu, \sigma_V^2)
and U \sim HN(0,\sigma_U^2)
or U \sim Exp(0,\sigma_U^2)
.
For more details see dnormhnorm
and dnormexp
. Here, s=1
for production and s=1
for cost function.
dcomperr
gives the density, pcomperr
gives the distribution function, qcomperr
gives the quantile function, and rcomperr
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.
pcomperr()
: distribution function for the composed error distribution.
qcomperr()
: quantile function for the composed error distribution.
rcomperr()
: random number generation for the composed error distribution.
Aigner D, Lovell CK, Schmidt P (1977). “Formulation and estimation of stochastic frontier production function models.” Journal of econometrics, 6(1), 21–37.
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.
Azzalini A (2013). The skewnormal and related families, volume 3. Cambridge University Press.
pdf < dcomperr(x=seq(3, 3, by=0.1), mu=1, sigma_v=2, par_u=3, s=1, family="normhnorm")
cdf < pcomperr(q=seq(3, 3, by=0.1), mu=1, sigma_v=2, par_u=3, s=1, family="normhnorm")
q < qcomperr(p=seq(0.1, 0.9, by=0.1), mu=1, sigma_v=2, par_u=3, s=1, family="normhnorm")
r < rcomperr(n=100, mu=1, sigma_v=2, par_u=3, s=1, family="normhnorm")