1 What is efficiency?

Before we can sink our teeth into measuring efficiency, we have to address the definition of efficiency. A good start is to distinguish between allocative efficiency and technical efficiency. Allocative efficiency measures the ability of the firm to use inputs in optimal proportions given their prices and is thus associated with cost minimisation and profit maximisation. Technical efficiency on the other hand, measures the ability of the firm to obtain the maximum output from given inputs given that not all firms uses the same amount of inputs to produce the same amount of outputs. If company B uses less inputs to produce the same amount of output than company A, ceteris paribus, then company A has a lower technical efficiency than company B. The difference between the two companies can be illustrated using a isoquant as shown in Figure 1. It illustrates a production process where an fixed amount of output \(q\) is produced using two inputs as \(x_1\) and \(x_2\). Given that all firms are producing the same amount of output, firm A is using more inputs than firms B (\(x_{1A}\) vs \(x_{1B}\) and \(x_{2A}\) vs \(x_{2B}\)) and C, in fact firm A and B are using the inputs in the same proportions therefore their MRS is the same. Given that we do not know the prices of inputs \(x_1\) and \(x_2\) we do not know if whether firm B or C is as an allocatively efficient position. If its at B it would imply that firm A is allocatively efficient but not technically efficient.

Figure 1: Input distance function and input requirement set

Figure 1: Input distance function and input requirement set

Figure 1 is an example of input-orientated efficiency, if only one input is variable it can be expressed as follow:

\[ TE = \frac{x}{x^*}\ \ \ \Leftrightarrow \ \ \ x =TE.x^*\ \ \ \ \ TE \geq1 \] where \(x\) is the observed input quantity and \(x^*\) is the minimum input quantity at which the observed output quantities \(y\) can be produced.

If more than one input is variable it can be generalised as follow:

\[ TE = \frac{x_1}{x_1^*}=\frac{x_2}{x_2^*}=\frac{x_N}{x_N^*}\ \ \ \Leftrightarrow \ \ \ x_i =TE.x_i^*\ \forall \ i\ \ \ \ \ TE \geq1 \] where \(x_1, x_2, . . . , x_N\) are the observed input quantities, \(x_1, x_2 , . . . , x_N\) are the minimum input quantities (given a proportional decrease of all input quantities) at which the observed output quantities \(y\) can be produced, and \(N\) is the number of inputs. Note that the \(\forall\) symbol stands “for all”, thus in this instance it reads “for all values \(i\)”.

Technical efficiency can also be defined from the output side with one output:

\[ TE = \frac{y}{y^*}\ \ \ \Leftrightarrow \ \ \ y =TE.y^*\ \ \ \ \ 0 \leq TE \leq1 \] where \(y\) is the observed output quantity and \(y^*\) is the maximum output quantity that can be produced with the observed input quantities \(x\). This can also be generalised as follow:

\[ TE = \frac{y_1}{y_1^*}=\frac{y_2}{y_2^*}=\frac{y_M}{y_M^*}\ \ \ \Leftrightarrow \ \ \ y =TE.y_i^*\ \forall \ i\ \ \ \ \ 0 \leq TE \leq1 \] where \(y_1, y_2, . . . , y_M\) are the observed output quantities, \(y_1, y_2 , . . . , y_N\) are the maximum output quantities (given a proportional increase of all output quantities) that can be produced with the observed input quantities \(x\), and \(M\) is the number of outputs.

2 Stochastic Frontier Analysis (SFA)

Using stochastic frontier analysis we can estimate the output side technical efficiency.

2.1 Specification

To date we have estimated average production functions, where about half of the observations were below the estimated production function and about half of the observations were above the estimated production function (see left panel of Figure 2). This is because OLS minimises the squared residuals as the distance between the fitted function and the observations. However, in microeconomic theory, the production function indicates the maximum output quantity for each given set of input quantities i.e technically efficient output levels. Hence, theoretically, no observation could be above the production function and observations below the production function would indicate technical inefficiency. This means that all residuals must be negative or zero. A production function with only non-positive residuals could look like:

\[ \ln y\ = \ \ln f(x) − u \ \ \ \text{with}\ \ \ \ u \geq 0 \] where \(−u \leq 0\) are the non-positive residuals.

Figure 2: Production function estimation: ordinary regression and with intercept correction

Figure 2: Production function estimation: ordinary regression and with intercept correction

One solution to achieve this could be to estimate an average production function by ordinary least squares and then simply shift the production function up until all residuals are negative or zero (see right panel of Figure 2). However, this procedure does not account for statistical noise and is very sensitive to positive outliers. As virtually all data sets and models are flawed with statistical noise, e.g. due to measurement errors, omitted variables (variables that should have included in the specification), and approximation errors (wrong functional form), Meeusen and van den Broeck (1977) and Aigner, Lovell, and Schmidt (1977) independently proposed the stochastic frontier model that simultaneously accounts for technical inefficiency (\(u\)) and statistical noise (\(v\)):

\[ \ln y\ = \ \ln f(x) − u + v\ \ \ \text{with}\ \ \ \ u \geq 0 \] where \(−u \leq 0\) are the accounts for technical inefficiency and \(v\) accounts for statistical noise. This model can be re-written (see, e.g. Coelli et al., 2005, p. 243): \[ y\ = f(x)\ e^{ − u}e^v \] As explained in Section 1, output-oriented technical efficiencies are defined as the ratio between the observed output and the frontier (maximum) output (see also, e.g., Coelli et al., 2005,p. 244).

\[ TE=\frac{y}{f(x)\ e^v}=\frac{f(x)\ e^{ − u}e^v}{f(x)\ e^v}=e^{-u} \] This can also be illustrated graphically. In Figure 3 the blue dots represent the frontier values and the red dots the observed values. Firm A lies above the deterministic part of the production frontier only because the noise effect is positive (i.e. \(v_A > 0\)), while the frontier output for Firm B lies below the deterministic part of the frontier because the noise effect is negative (i.e.,\(v_B < 0\)). It can also be seen that the observed output of Firm A lies below the deterministic part of the frontier because the sum of the noise and inefficiency effects is negative (i.e. \(v_A-u_A < 0\))). While it is possible for outputs to lie above the deterministic part of the frontier (when the noise effect is positive and larger than the inefficiency possibly due to a specification error), observed outputs tend to lie below the deterministic part of the frontier.

Figure 3: The Stochastic Production Frontier

Figure 3: The Stochastic Production Frontier

The stochastic frontier model is usually estimated by an econometric maximum likelihood estimation, which requires distributional assumptions of the error terms. As a start it is assumed that all \(v\)s and \(u\)s are independent. Most often, it is assumed that the noise term \(v\) follows a normal distribution with zero mean and constant variance \(\sigma_v^2\), this is expressed mathematically as follow: \(v\sim N(0,\sigma_v^2)\). It is assumed that the inefficiency term \(u\) follows a positive half-normal distribution or a positive truncated normal distribution with constant scale parameter \(\sigma_u^2\) with mu (\(\mu\)), as the mean of the distribution, equal to 0 for a positive half-normal distribution and mu (\(\mu\)) not equal to zero for a positive truncated normal distribution. This is expressed mathematically as follow: \(u\sim N^+(\mu,\sigma_u^2)\). These assumptions result in a left-skewed distribution of the total error terms (known as epsilon) $= -u +v $, in other words the density function is flat at on the left and steep on the right. Figure 4 shows examples of half normal distributions of \(u\) given that \(\mu=0\) but with different variances.

Figure 4: Half normal distributions

Figure 4: Half normal distributions

Given that \(\mu=0\) it implies that most firms are close the efficiency frontier. If \(u\) exhibits a positive truncated normal distribution mu can take a value of less or more than 0 which would shift the distribution to left or right as shown in Figure 5. For example if \(\mu=2\) (represented by the red) the efficiency of most firms will be at plane below the frontier. Conversely if \(\mu=-2\) (represented by the black line) most firms would be closer to the frontier relative to the possibly where \(\mu=0\), assuming that they have the same variances. Note that the “positive” part of positive half-normal distribution or positive truncated normal distribution speaks to the fact that \(u\geq0\) and does not speak to the value of mu.

Figure 5: Half normal and trauncated normal distributions

Figure 5: Half normal and trauncated normal distributions

2.2 Marginal products and output elasticities in SFA models

Given the multiplicative specification of stochastic production frontier models and assuming that the random error \(v\) is zero, we can see that the marginal products are downscaled by the level of the technical efficiency:

\[ \frac{\partial y}{\partial x_i}=\frac{\partial f(x)}{\partial x_i}e^{-u}=TE\frac{\partial f(x)}{\partial x_i} = TE\ \alpha_i\ \frac{f(x)}{x_i} \] However, the partial production elasticities are unaffected by the efficiency level:

\[ \epsilon_i = \frac{MPP}{APP}=\frac{\partial f(x)}{\partial x_i}\frac{x_i}{y}=\alpha_i \] As the output elasticities do not depend on the firm’s technical efficiency, also the elasticity of scale does not depend on the firm’s technical efficiency.

2.3 Cobb-Douglas stochastic production frontier

2.3.1 Estimation

We can use the command sfa (package frontier) to estimate stochastic production frontiers. The basic syntax of the command sfa is similar to the syntax of the command lm. It estimates a Cobb-Douglas stochastic production frontier assuming that the inefficiency term \(u\) follows a positive halfnormal distribution. Lets run a regular linear and frontier model with the apple data:

remove(list=ls()) #clear all from memory
require("data.table")
require("ggplot2")
require("frontier")

dat <- setDT(read.csv("Data/apples_prepped.csv"))

prodCD <- dat[, lm(log(qOut) ~ log(qCap) + log(qLab) + log(qMat))]
summary(prodCD)
## 
## Call:
## lm(formula = log(qOut) ~ log(qCap) + log(qLab) + log(qMat))
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.67239 -0.28024  0.00667  0.47834  1.30115 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept) -2.06377    1.31259  -1.572   0.1182    
## log(qCap)    0.16303    0.08721   1.869   0.0637 .  
## log(qLab)    0.67622    0.15430   4.383 2.33e-05 ***
## log(qMat)    0.62720    0.12587   4.983 1.87e-06 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.656 on 136 degrees of freedom
## Multiple R-squared:  0.5943, Adjusted R-squared:  0.5854 
## F-statistic: 66.41 on 3 and 136 DF,  p-value: < 2.2e-16
prodCDSfa <- dat[, sfa(log(qOut) ~ log(qCap) + log(qLab) + log(qMat))]
summary(prodCDSfa)
## Error Components Frontier (see Battese & Coelli 1992)
## Inefficiency decreases the endogenous variable (as in a production function)
## The dependent variable is logged
## Iterative ML estimation terminated after 12 iterations:
## log likelihood values and parameters of two successive iterations
## are within the tolerance limit
## 
## final maximum likelihood estimates
##             Estimate Std. Error z value  Pr(>|z|)    
## (Intercept) 0.228813   1.247739  0.1834 0.8544981    
## log(qCap)   0.160934   0.081883  1.9654 0.0493668 *  
## log(qLab)   0.684777   0.146797  4.6648 3.089e-06 ***
## log(qMat)   0.465871   0.131588  3.5404 0.0003996 ***
## sigmaSq     1.000040   0.202456  4.9395 7.830e-07 ***
## gamma       0.896664   0.070952 12.6375 < 2.2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## log likelihood value: -133.8893 
## 
## cross-sectional data
## total number of observations = 140 
## 
## mean efficiency: 0.5379937

Comparing the two models you will see that the coefficients of the lm and sfa models are slightly different, for the time being it is just worth noting, in a later section we will do a statistical test to establish which model is better. In both models the monotonicity assumption is fulfilled since all of the output elasticities is positive, meaning that adding additional units of an input will not decrease output. With respect to the SFA model the output elasticity of capital is 0.161, the output elasticity of labour is 0.685, The output elasticity of materials is 0.466, and the elasticity of scale is 1.312 (as the sum of the three).

2.3.2 Variance parameters

Looking at your SFA model results you will see two additional coefficients as gamma (denoted by \(\gamma\)) and sigmaSq (denoted by \(\sigma^2\)). The sigmaSq is the sum of the parameterised variance of \(v\) and \(u\) as \(\sigma^2=\sigma_v^2 +\sigma_u^2\). Gamma on the other hand indicates the importance of the inefficiency term by showing the share of the variance of \(u\) in the total variance sigmaSq (\(\sigma^2\)) as \(\gamma=\sigma_u^2/\sigma^2\). If \(\gamma\) is zero, the inefficiency term \(u\) is irrelevant and the results should be equal to the OLS results. In contrast, if is one, the noise term \(v\) is irrelevant and all deviations from the production frontier are explained by technical inefficiency. As the estimate of is 0.897, we can conclude that both statistical noise and inefficiency are important for explaining deviations from the production function but that inefficiency is more important than noise. Note that \(\sigma_u^2\) is not equal to the variance of the inefficiency term \(u\), therefore the estimated parameter cannot be interpreted as the proportion of the total variance that is due to inefficiency (the mathematical proof of this is beyond the scope of this course). We can calculate the estimated variances of the inefficiency term \(u\) and the noise term \(v\) as follow:

gamma <- unname(coef(prodCDSfa)["gamma"])
gamma
## [1] 0.8966641
sigmaSq <- unname(coef(prodCDSfa)["sigmaSq"])
sigmaSq
## [1] 1.00004
varU <- gamma * sigmaSq * (1 - (2*dnorm(0) )^2)
varU
## [1] 0.3258429
varV <- (1 - gamma) * sigmaSq
varV
## [1] 0.10334

The proportion of the total variance \((Var(−u + v) = Var(u) + V ar(v))^2\) that is due to inefficiency can be estimated as follow:

varU / (varU + varV)
## [1] 0.7592169

This indicates that around 75.9% of the total variance is due to inefficiency. The frontier package calculates these additional variance parameters (and some further variance parameters) automatically, if argument extraPar of the summary() method is set to TRUE:

summary(prodCDSfa, extraPar = TRUE)
## Error Components Frontier (see Battese & Coelli 1992)
## Inefficiency decreases the endogenous variable (as in a production function)
## The dependent variable is logged
## Iterative ML estimation terminated after 12 iterations:
## log likelihood values and parameters of two successive iterations
## are within the tolerance limit
## 
## final maximum likelihood estimates
##             Estimate Std. Error z value  Pr(>|z|)    
## (Intercept) 0.228813   1.247739  0.1834 0.8544981    
## log(qCap)   0.160934   0.081883  1.9654 0.0493668 *  
## log(qLab)   0.684777   0.146797  4.6648 3.089e-06 ***
## log(qMat)   0.465871   0.131588  3.5404 0.0003996 ***
## sigmaSq     1.000040   0.202456  4.9395 7.830e-07 ***
## gamma       0.896664   0.070952 12.6375 < 2.2e-16 ***
## sigmaSqU    0.896700   0.241715  3.7097 0.0002075 ***
## sigmaSqV    0.103340   0.055831  1.8509 0.0641777 .  
## sigma       1.000020   0.101226  9.8791 < 2.2e-16 ***
## sigmaU      0.946942   0.127629  7.4195 1.176e-13 ***
## sigmaV      0.321465   0.086838  3.7019 0.0002140 ***
## lambdaSq    8.677179   6.644542  1.3059 0.1915829    
## lambda      2.945705   1.127836  2.6118 0.0090061 ** 
## varU        0.325843         NA      NA        NA    
## sdU         0.570827         NA      NA        NA    
## gammaVar    0.759217         NA      NA        NA    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## log likelihood value: -133.8893 
## 
## cross-sectional data
## total number of observations = 140 
## 
## mean efficiency: 0.5379937

Hence gammaVar shows the total variance due to inefficiency. Refer to Henningsen (2018,p235) for the calculation of the other parameters. Other than the gammaVar the other are not important for the interpretation of model results

2.3.3 Statistical tests for inefficiencies

If our producers have no inefficiencies, and this \(u = 0\) for all observations, then the coefficient of \(\gamma\) would be equal to zero. Hence, one can test the null hypothesis of no inefficiencies by simply testing whether \(gamma\) is equal to (or does not deviate significantly) from zero. However, a t-test of the null hypothesis \(\gamma=0\) (as reported in the output of the summary) is not valid because by definition it is bound to the interval [0, 1].Hence it cannot follow a t-distribution. Instead, we can use a likelihood ratio test to check whether adding the inefficiency term \(u\) significantly improves the fit of the model. A generalised likelihood ratio test compares the log likelihood value of the restricted model to that of the unrestricted model. If the \(lrtest\) method is called just with a single stochastic frontier model, it compares the stochastic frontier model with the corresponding OLS model (i.e. a model with equal to zero):

lrtest( prodCDSfa )
## Likelihood ratio test
## 
## Model 1: OLS (no inefficiency)
## Model 2: Error Components Frontier (ECF)
##   #Df  LogLik Df  Chisq Pr(>Chisq)   
## 1   5 -137.61                        
## 2   6 -133.89  1 7.4387   0.003192 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Under the null hypothesis (no inefficiency, only noise), the test statistic asymptotically follows a mixed Chi-squared (\(\chi^2\)) distribution (Coelli, 1995). The rather small P-value (0.003) indicates that the data clearly reject the OLS model in favour of the stochastic frontier model, i.e. there is significant technical inefficiency.

2.3.4 Obtaining technical efficiency estimates

Now we finally get to the point where we can look at the efficiency of our producers. The first is simply the mean efficiency, which as the name imply is the mean efficiency of all of the producers. This is provided in the summary, in this instance 0.54 or 54%. The efficiency estimates of our producers can be added to our dataset as shown below, we can also compare the efficiency scores with firm size and input usage (measured as aggregate input use by a Fisher quantity index of all inputs).

dat[, effCD := efficiencies(prodCDSfa)]
p1 <- 
  ggplot(data=dat) +
  geom_histogram(aes(x=effCD),bins = 20) +
  scale_x_continuous(breaks = scales::pretty_breaks(n = 5),expand = c(0, 0),limits = c(0.1,0.9)) +
  labs(title="Efficiency distribution", x="Efficiency")+
  theme_bw()

p2 <- 
  ggplot(data=dat,aes(y=effCD, x=log(qOut))) +
  geom_point() +
  geom_smooth(method='lm', formula= y~x) +
  scale_y_continuous(breaks = scales::pretty_breaks(n = 5),expand = c(0, 0),limits = c(0.1,0.9)) +
  labs(title="Efficiency vs Output", y="Efficiency", x="Output Quantity (logged)") +
  theme_bw()

p3 <- 
  ggplot(data=dat,aes(y=effCD, x=X)) +
  geom_point() +
  geom_smooth(method='lm', formula= y~x) +
  scale_y_continuous(breaks = scales::pretty_breaks(n = 5),expand = c(0, 0),limits = c(0.1,0.9)) +
  labs(title="Efficiency vs input use", y="Efficiency", x="Input index") +
  theme_bw()

require("gridExtra")
grid.arrange(p1,p2,p3,layout_matrix = rbind(c(1),c(2,3)))

The efficiency estimates are rather low: the firms only produce between 10% and 90% of the maximum possible output quantities. As the efficiency directly in influences the output quantity, it is not surprising that the efficiency estimates are highly correlated with the output quantity. This is evidenced by the narrow confidnece interval arround the linear line. On the other hand, the efficiency estimates are only slightly correlated with firm size (as evidenced by the flat slope and wide confidence interval). However, the largest firms all have an above-average efficiency estimate, while only a very few of the smallest firms have an above-average efficiency estimate. See this page for more info on using the gridExtra package.

3 Analysing the effects of \(z\) variables

In many empirical cases, the output quantity does not only depend on the input quantities but also on some other variables which are not included in the production process but does have an impact on it. Examples of such variables include the manager’s education and experience and in agricultural production also the soil quality and rainfall. If these factors in influence the production process, they must be included in applied production analyses to avoid an omitted-variables bias. The apple dataset that we have been using includes the dummy variable adv since it either takes a value of zero or one dependig on if the farmer makes use of advisory services (1) or not (0). In this section we will use different methods to establish if there is a difference between farmers who make use of such a service and those who do not.

3.1 OLS Cobb Douglas production functions with \(z\) variables

Additional factors that in influence the production process (\(z\)) can be included as additional explanatory variables in a production function:

\[ y=f(x,z) \] This function can be used to analyze how the additional explanatory variables (z) affect the output quantity for given input quantities, i.e. how they affect the productivity. In case of a Cobb-Douglas functional form, we get following extended production function:

\[ \ln y=\alpha_o \ + \ \sum_{i}\alpha_i\ln x_i \ + \ \alpha_z z \] We can extend our regular Cobb-Douglas production function, that we fitted to our data set on French apple producers, to check whether those who use an advisory service produce a different output quantity than non-users with the same input quantities, i.e. whether the productivity differs between users and non-users. This extended production function can be specified as follow:

prodCDadv <- dat[, lm(log(qOut) ~ log(qCap) + log(qLab) + log(qMat) + adv)]
summary(prodCDadv)
## 
## Call:
## lm(formula = log(qOut) ~ log(qCap) + log(qLab) + log(qMat) + 
##     adv)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.7807 -0.3821  0.0022  0.4709  1.3323 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept) -2.33371    1.29590  -1.801   0.0740 .  
## log(qCap)    0.15673    0.08581   1.826   0.0700 .  
## log(qLab)    0.69225    0.15190   4.557 1.15e-05 ***
## log(qMat)    0.62814    0.12379   5.074 1.26e-06 ***
## adv          0.25896    0.10932   2.369   0.0193 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.6452 on 135 degrees of freedom
## Multiple R-squared:  0.6105, Adjusted R-squared:  0.599 
## F-statistic:  52.9 on 4 and 135 DF,  p-value: < 2.2e-16

The estimation result shows that users of an advisory service produce significantly (*) more than non-users with the same input quantities. In fact our estimation result indicates that users of an advisory service produce approximately 25.9% more output than non-users with the same input quantity. However, the large standard error of this coefficient (the standard error is slightly less than half of the coefficient) indicates that this estimate is rather imprecise. Given that the change of a dummy variable from zero to one is not marginal (its is binary) and that the coefficient of the variable adv is not close to zero, the above interpretation of this coefficient is a rather poor approximation. In such instances it is more precise to look at the exponent (the opposite of log) of the coefficient given that the dependent variable is logged. On average the users of the advisory service is exp\(\alpha_z\) = 1.296 times as large or 29.6% larger than the output quantity of the apple producers who do not make use of the advisory service given the same input quantity. It is important to note that it would be wrong to say that the use of the advisory services increases output by 29.6%, we are saying that the output of producers who make use such a service is 29.6% greater. This is because the use of an advisory service could serve as a proxy of other unobserved characteristics such as motivation to increase production, education, age etc. that would make farmers more likely to make use of an advisory service and and is also likely to increase their productivity. If we were to control for all differences between farmers, meaning include it in our model, we would have more confidence in interpreting the coefficient of using an advisory service in a narrow sense.

3.2 Production frontiers with z variables

A production function that includes additional factors that influence the production process can also be estimated as a stochastic production frontier. In this specification it is assumed that the additional explanatory variables influence the production frontier. In other words, we are treating the use of an advisory service as an “input”. We specify the model as follow:

prodCDadvSFA <- dat[, sfa(log(qOut) ~ log(qCap) + log(qLab) + log(qMat) + adv)]
summary(prodCDadvSFA)
## Error Components Frontier (see Battese & Coelli 1992)
## Inefficiency decreases the endogenous variable (as in a production function)
## The dependent variable is logged
## Iterative ML estimation terminated after 14 iterations:
## log likelihood values and parameters of two successive iterations
## are within the tolerance limit
## 
## final maximum likelihood estimates
##              Estimate Std. Error z value  Pr(>|z|)    
## (Intercept) -0.247751   1.357917 -0.1824 0.8552301    
## log(qCap)    0.156906   0.081337  1.9291 0.0537222 .  
## log(qLab)    0.695977   0.148793  4.6775 2.904e-06 ***
## log(qMat)    0.491840   0.139348  3.5296 0.0004162 ***
## adv          0.150742   0.111233  1.3552 0.1753583    
## sigmaSq      0.916031   0.231604  3.9552 7.648e-05 ***
## gamma        0.861029   0.114087  7.5471 4.450e-14 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## log likelihood value: -132.8679 
## 
## cross-sectional data
## total number of observations = 140 
## 
## mean efficiency: 0.5545099

The estimation result still indicates that users of an advisory service have a higher productivity than non-users, but the coefficient is smaller and no longer statistically significant. We can compare the results of this frontier model with our previous frontier model using a likelihood-ratio test. Note that now we include both models in our lrtest function which compares the first one specified to the second. If we only include a single model the default is to compare it to an OLS model.

lrtest(prodCDSfa, prodCDadvSFA)
## Likelihood ratio test
## 
## Model 1: prodCDSfa
## Model 2: prodCDadvSFA
##   #Df  LogLik Df  Chisq Pr(>Chisq)
## 1   6 -133.89                     
## 2   7 -132.87  1 2.0428     0.1529

Since the t-value is not statistically significant the comparison indicates that the data does not clearly reject the frontier model without the inclusion of the advisory in favour of the frontier model where the advisory service is included. If we compare prodCDadvSFA model against the OLS model we find the following:

lrtest(prodCDadvSFA)
## Likelihood ratio test
## 
## Model 1: OLS (no inefficiency)
## Model 2: Error Components Frontier (ECF)
##   #Df  LogLik Df Chisq Pr(>Chisq)  
## 1   6 -134.76                      
## 2   7 -132.87  1  3.78    0.02593 *
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Ok, so the frontier model is still doing better than the OLS model given the small P-value (0.003) which indicates that the data clearly reject the OLS model in favour of the stochastic frontier model, i.e. there is significant technical inefficiency.

3.3 Efficiency effects production frontiers

As we saw above it does not seem to be too reasonable to have different frontier functions for users and non-users of an advisory service. However, it seems to be reasonable to assume that users of an advisory service have on average different efficiencies than non-users. A model that can account for this has been proposed by Battese and Coelli (1995). In this stochastic frontier model, the efficiency level might be affected by additional explanatory variables: The inefficiency term \(u\) follows a positive truncated normal distribution with constant scale parameter \(\sigma_u^2\) and a location parameter \(\mu\) that depends on additional explanatory variables. Hence we in effect break up mu (\(\mu\)):

\[ u\sim N^+(\mu,\sigma_u^2)\ \ \ \text{with} \ \ \ \mu=\delta z \] where \(\delta\) is an additional parameter to be estimated. An efficiency effects frontier can be estimated using the sfa function but now we include the \(z\) variables after an | at the end after the \(x\)’s:

prodCDadvINT <- dat[, sfa(log(qOut) ~ log(qCap) + log(qLab) + log(qMat) | adv)]
summary(prodCDadvINT)
## Efficiency Effects Frontier (see Battese & Coelli 1995)
## Inefficiency decreases the endogenous variable (as in a production function)
## The dependent variable is logged
## Iterative ML estimation terminated after 18 iterations:
## log likelihood values and parameters of two successive iterations
## are within the tolerance limit
## 
## final maximum likelihood estimates
##                Estimate Std. Error z value  Pr(>|z|)    
## (Intercept)   -0.090747   1.215594 -0.0747 0.9404914    
## log(qCap)      0.168625   0.082138  2.0529 0.0400775 *  
## log(qLab)      0.653868   0.142849  4.5773  4.71e-06 ***
## log(qMat)      0.513527   0.132644  3.8715 0.0001082 ***
## Z_(Intercept) -0.016714   1.220842 -0.0137 0.9890769    
## Z_adv         -1.077550   1.057873 -1.0186 0.3083926    
## sigmaSq        1.096441   0.747990  1.4659 0.1426891    
## gamma          0.863087   0.094468  9.1363 < 2.2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## log likelihood value: -130.516 
## 
## cross-sectional data
## total number of observations = 140 
## 
## mean efficiency: 0.600435

Again we must do a log likelihood test to see if we are indeed working with a frontier. The test indicates that the fit of this model is significantly better than the fitt of the OLS model without advisory service as explanatory variable:

lrtest(prodCDadvINT)
## Likelihood ratio test
## 
## Model 1: OLS (no inefficiency)
## Model 2: Efficiency Effects Frontier (EEF)
##   #Df  LogLik Df  Chisq Pr(>Chisq)   
## 1   5 -137.61                        
## 2   8 -130.52  3 14.185   0.001123 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

The coefficient of the advisory service in the inefficiency model is negative but statistically insignificant. According to Battese and Coelli (1995) we cannot interpret the value of the coefficient itself, all we can do is look at the sign with a negative value indicating that the \(z\) variable in question reduces inefficiency and a postitive value that it increases inefficiency. By default, an intercept is added to the inefficiency model but it is clearly statistically insignificant. In many econometric estimations of the efficiency effects frontier models the intercept of the inefficiency model (\(\delta_0\)) is only weakly identified, because the values can often be changed with only marginally reducing the log-likelihood value, if the slope parameters of the inefficiency model (\(\delta_i, i\neq 0\)) and the variance parameters (\(\sigma^2\)and\(\gamma\)) are adjusted accordingly. We can suppress the intercept by adding a “-1” to the specification of the inefficiency model:

prodCDadvINTslope <- dat[, sfa(log(qOut) ~ log(qCap) + log(qLab) + log(qMat) | adv - 1)]
summary(prodCDadvINTslope)
## Efficiency Effects Frontier (see Battese & Coelli 1995)
## Inefficiency decreases the endogenous variable (as in a production function)
## The dependent variable is logged
## Iterative ML estimation terminated after 14 iterations:
## log likelihood values and parameters of two successive iterations
## are within the tolerance limit
## 
## final maximum likelihood estimates
##              Estimate Std. Error z value  Pr(>|z|)    
## (Intercept) -0.090455   1.247496 -0.0725   0.94220    
## log(qCap)    0.168471   0.077008  2.1877   0.02869 *  
## log(qLab)    0.654341   0.139669  4.6849 2.800e-06 ***
## log(qMat)    0.513291   0.130854  3.9226 8.759e-05 ***
## Z_adv       -1.064859   0.545950 -1.9505   0.05112 .  
## sigmaSq      1.086417   0.255371  4.2543 2.097e-05 ***
## gamma        0.862306   0.081468 10.5845 < 2.2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## log likelihood value: -130.5161 
## 
## cross-sectional data
## total number of observations = 140 
## 
## mean efficiency: 0.599406

When we suppress the slope we find that adv is now statistically significant at the 10% level. A likelihood ratio test against the corresponding OLS model indicates that the fit of this SFA model is significantly better than the fit of the corresponding OLS model (without advisory service as explanatory variable):

lrtest(prodCDadvINTslope)
## Likelihood ratio test
## 
## Model 1: OLS (no inefficiency)
## Model 2: Efficiency Effects Frontier (EEF)
##   #Df  LogLik Df  Chisq Pr(>Chisq)    
## 1   5 -137.61                         
## 2   7 -130.52  2 14.185  0.0002907 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

A likelihood ratio test confirms the t-test that the intercept in the inefficiency model is statistically insignificant:

lrtest(prodCDadvINTslope,prodCDadvINT)
## Likelihood ratio test
## 
## Model 1: prodCDadvINTslope
## Model 2: prodCDadvINT
##   #Df  LogLik Df Chisq Pr(>Chisq)
## 1   7 -130.52                    
## 2   8 -130.52  1 2e-04     0.9892

Whilst we cannot interpret the coefficients (\(\delta\)) of the the \(z\) variables, Olsen and Henningsen (2011) has devised a method to calculate the marginal effects of the variables that should explain the efficiency level on the efficiency estimates. These are calculated when the margEff = TRUE option is included in the efficiencies function:

dat[, effCDAdv2 := efficiencies(prodCDadvINTslope, margEff = TRUE)]

Since the marginal efficiencies are stored as a attribute (descriptor of a variable) by the efficiencies function, you must extract them using the attributes function where after you can plot or summarise them.

dat[, Z_adv := attributes(effCDAdv2)]
p4 <- 
  ggplot(data=dat) +
  geom_histogram(aes(x=Z_adv),bins = 20) +
  scale_x_continuous(breaks = scales::pretty_breaks(n = 5),expand = c(0, 0),limits = c(0.01,0.07)) +
  labs(title="Z advice marginal efficiency", x="Marginal efficiency")+
  theme_bw()
p4
## Warning: Removed 2 rows containing missing values (geom_bar).

dat[, summary(Z_adv)]
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
## 0.01424 0.03296 0.04757 0.04584 0.05961 0.06316

It shows that apple producers who use an advisory service are between 3.3 and 6.3 percentage points (50% - 52% = 2 percentage points) more efficient than apple producers who do not use an advisory service. On average they are 4.8 percentage points more efficient.

4 Stochastic cost frontiers

Cost efficiency is a product of input-oriented technical efficiency and allocative efficiency. Input-oriented technical efficiency represents the ability to produce a given level of output with minimum inputs. Allocative efficiency represents the ability to produce a given level of output with the input bundle that costs the least under market prices at the time. Cost efficiency therefore measures the ability to produce a given level of output for the smallest cost. At an industry level, long-run competitiveness in generic commodity markets depends on low-cost production. At the farm level, then, evaluations of cost efficiency are crucial to signal the industry’s profit potential and identify areas for improvement.