efficiency {dsfa} R Documentation

## efficiency

### Description

Calculates the expected technical (in)efficiency index.

### Usage

efficiency(object, alpha = 0.05, type = "jondrow")


### Arguments

 object fitted mgcv object with family comper() or comper_mv(). alpha for the (1-\alpha) \cdot 100\% confidence interval. Must be in (0,1). type default is "jondrow" for E[U|\mathcal{E}], alternatively "battese" for E[\exp(-U)|\mathcal{E}].

### Value

Returns a matrix of the expected (in)efficiency estimates as well the lower and upper bound of the (1-\alpha)\cdot 100\% confidence interval.

### References

• Schmidt R, Kneib T (2023). “Multivariate distributional stochastic frontier models.” Computational Statistics & Data Analysis, 107796.

• Kumbhakar SC, Wang H, Horncastle AP (2015). A practitioner's guide to stochastic frontier analysis using Stata. Cambridge University Press.

• Azzalini A (2013). The skew-normal and related families, volume 3. Cambridge University Press.

• Jondrow J, Lovell CK, Materov IS, Schmidt P (1982). “On the estimation of technical inefficiency in the stochastic frontier production function model.” Journal of econometrics, 19(2-3), 233–238.

• Battese GE, Coelli TJ (1988). “Prediction of firm-level technical efficiencies with a generalized frontier production function and panel data.” Journal of econometrics, 38(3), 387–399.

### Examples


#Set seed, sample size and type of function
set.seed(1337)
N=500 #Sample size
s=-1 #Set to production function

#Generate covariates
x1<-runif(N,-1,1); x2<-runif(N,-1,1); x3<-runif(N,-1,1)
x4<-runif(N,-1,1); x5<-runif(N,-1,1)

#Set parameters of the distribution
mu=2+0.75*x1+0.4*x2+0.6*x2^2+6*log(x3+2)^(1/4) #production function parameter
sigma_v=exp(-1.5+0.75*x4) #noise parameter
sigma_u=exp(-1+sin(2*pi*x5)) #inefficiency parameter

y<-rcomper(n=N, mu=mu, sigma_v=sigma_v, sigma_u=sigma_u, s=s, distr="normhnorm")
dat<-data.frame(y, x1, x2, x3, x4, x5)

#Write formulae for parameters
mu_formula<-y~x1+x2+I(x2^2)+s(x3, bs="ps")
sigma_v_formula<-~1+x4
sigma_u_formula<-~1+s(x5, bs="ps")

#Fit model
model<-dsfa(formula=list(mu_formula, sigma_v_formula, sigma_u_formula),
data=dat, family=comper(s=s, distr="normhnorm"), optimizer = c("efs"))

#Estimate efficiency
efficiency(model, type="jondrow")
efficiency(model, type="battese")



[Package dsfa version 2.0.2 Index]