QLIM Procedure

Example 27.7 Stochastic Frontier Models

(View the complete code for this example.)

This example illustrates the estimation of stochastic frontier production and cost models.

First, a production function model is estimated. The data for this example were collected by Christensen Associates; they represent a sample of 125 observations on inputs and output for 10 airlines between 1970 and 1984. The explanatory variables (inputs) are fuel (LF), materials (LM), equipment (LE), labor (LL), and property (LP), and (LQ) is an index that represents passengers, charter, mail, and freight transported.

The following statements create the data set:

title1 'Estimating a Stochastic Frontier Production Model';

data airlines;
   input TS FIRM NI LQ LF LM LE LL LP;
datalines;
1 1 15 -0.0484 0.2473 0.2335 0.2294 0.2246 0.2124
1 1 15 -0.0133 0.2603 0.2492 0.241 0.2216 0.1069
2 1 15 0.088 0.2666 0.3273 0.3365 0.2039 0.0865

   ... more lines ...   

The following statements estimate a stochastic frontier exponential production model that uses Christensen Associates data:

/*-- Stochastic Frontier Production Model --*/
proc qlim data=airlines;
   model LQ=LF LM LE LL LP;
   endogenous LQ ~ frontier (type=exponential production);
run;

Output 27.7.1 shows the results from this production model.

Output 27.7.1: Stochastic Frontier Production Model

Estimating a Stochastic Frontier Production Model

The QLIM Procedure

Model Fit Summary
Number of Endogenous Variables1
Endogenous VariableLQ
Number of Observations125
Log Likelihood83.27815
Maximum Absolute Gradient9.92882E-7
Number of Iterations25
Optimization MethodQuasi-Newton
AIC-150.55630
Schwarz Criterion-127.92979
Sigma0.12445
Lambda0.55766

Parameter Estimates
ParameterDFEstimateStandard
Error
t ValueApprox
Pr > |t|
Intercept1-0.0850480.024528-3.470.0005
LF1-0.1158020.124178-0.930.3511
LM10.7562530.0787559.60<.0001
LE10.4249160.0818935.19<.0001
LL1-0.1364210.089702-1.520.1283
LP10.0989670.0427762.310.0207
_Sigma_v10.1086880.01006310.80<.0001
_Sigma_u10.0606110.0176033.440.0006


Similarly, the stochastic frontier production function can be estimated with TYPE=HALF or TYPE=TRUNCATED options that represent half-normal and truncated normal production models.

In the next step, stochastic frontier cost function is estimated. The data for the cost model are provided by Christensen and Greene (1976). The data describe costs and production inputs of 145 U.S. electricity producers in 1955. The model being estimated follows the nonhomogeneous version of the Cobb-Douglas cost function:

log left-parenthesis StartFraction Cost Over FPrice EndFraction right-parenthesis equals beta 0 plus beta 1 log left-parenthesis StartFraction KPrice Over FPrice EndFraction right-parenthesis plus beta 2 log left-parenthesis StartFraction LPrice Over FPrice EndFraction right-parenthesis plus beta 3 log left-parenthesis Output right-parenthesis plus beta 4 one-half log left-parenthesis Output right-parenthesis squared plus epsilon

All dollar values are normalized by fuel price. The quadratic log of the output is added to capture nonlinearities due to scale effects in cost functions. New variables, log_C_PF, log_PK_PF, log_PL_PF, log_y, and log_y_sq, are created to reflect transformations. The following statements create the data set and transformed variables:

title1 'Estimating a Stochastic Frontier Cost Model';

data electricity;
   input Firm Year Cost Output LPrice LShare KPrice KShare FPrice FShare;
datalines;
 1  1955  .0820  2.0  2.090  .3164  183.000  .4521  17.9000  .2315
 2  1955  .6610  3.0  2.050  .2073  174.000  .6676  35.1000  .1251
 3  1955  .9900  4.0  2.050  .2349  171.000  .5799  35.1000  .1852

   ... more lines ...   

/* Data transformations */
data electricity;
   set electricity;
   label Firm="firm index"
         Year="1955 for all observations"
         Cost="Total cost"
         Output="Total output"
         LPrice="Wage rate"
         LShare="Cost share for labor"
         KPrice="Capital price index"
         KShare="Cost share for capital"
         FPrice="Fuel price"
         FShare"Cost share for fuel";
   log_C_PF=log(Cost/FPrice);
   log_PK_PF=log(KPrice/FPrice);
   log_PL_PF=log(LPrice/FPrice);
   log_y=log(Output);
   log_y_sq=log_y**2/2;
run;

The following statements estimate a stochastic frontier exponential cost model that uses Christensen and Greene (1976) data:

/*-- Stochastic Frontier Cost Model --*/
proc qlim data=electricity;
   model log_C_PF = log_PK_PF log_PL_PF log_y log_y_sq;
   endogenous log_C_PF ~ frontier (type=exponential cost);
run;

Output 27.7.2 shows the results.

Output 27.7.2: Exponential Distribution

Estimating a Stochastic Frontier Cost Model

The QLIM Procedure

Model Fit Summary
Number of Endogenous Variables1
Endogenous Variablelog_C_PF
Number of Observations159
Log Likelihood-23.30430
Maximum Absolute Gradient5.33998E-6
Number of Iterations21
Optimization MethodQuasi-Newton
AIC60.60860
Schwarz Criterion82.09093
Sigma0.30750
Lambda1.71345

Parameter Estimates
ParameterDFEstimateStandard
Error
t ValueApprox
Pr > |t|
Intercept1-4.9832110.543328-9.17<.0001
log_PK_PF10.0902420.1092020.830.4086
log_PL_PF10.5042990.1182634.26<.0001
log_y10.4271820.0666806.41<.0001
log_y_sq10.0661200.0100796.56<.0001
_Sigma_v10.1549980.0202717.65<.0001
_Sigma_u10.2655810.0336147.90<.0001


Similarly, the stochastic frontier cost model can be estimated with TYPE=HALF or TYPE=TRUNCATED options that represent half-normal and truncated normal errors.

The following statements illustrate the half-normal option:

/*-- Stochastic Frontier Cost Model --*/
proc qlim data=electricity;
   model log_C_PF = log_PK_PF log_PL_PF log_y log_y_sq;
   endogenous log_C_PF ~ frontier (type=half cost);
run;

Output 27.7.3 shows the result.

Output 27.7.3: Half-Normal Distribution

Estimating a Stochastic Frontier Cost Model

The QLIM Procedure

Model Fit Summary
Number of Endogenous Variables1
Endogenous Variablelog_C_PF
Number of Observations159
Log Likelihood-34.95304
Maximum Absolute Gradient0.0001088
Number of Iterations22
Optimization MethodQuasi-Newton
AIC83.90607
Schwarz Criterion105.38840
Sigma0.42761
Lambda1.80031

Parameter Estimates
ParameterDFEstimateStandard
Error
t ValueApprox
Pr > |t|
Intercept1-4.4346340.690197-6.43<.0001
log_PK_PF10.0696240.1362500.510.6093
log_PL_PF10.4745780.1468123.230.0012
log_y10.2568740.0807773.180.0015
log_y_sq10.0880510.0118177.45<.0001
_Sigma_v10.2076370.0392225.29<.0001
_Sigma_u10.3738100.0736055.08<.0001


The following statements illustrate the truncated normal option:

/*-- Stochastic Frontier Cost Model --*/
proc qlim data=electricity;
   model log_C_PF = log_PK_PF log_PL_PF log_y log_y_sq;
   endogenous log_C_PF ~ frontier (type=truncated cost);
run;

Output 27.7.4 shows the results.

Output 27.7.4: Truncated Normal Distribution

Estimating a Stochastic Frontier Cost Model

The QLIM Procedure

Model Fit Summary
Number of Endogenous Variables1
Endogenous Variablelog_C_PF
Number of Observations159
Log Likelihood-36.87279
Maximum Absolute Gradient271.78546
Number of Iterations9
Optimization MethodQuasi-Newton
AIC89.74557
Schwarz Criterion114.29681
Sigma0.30309
Lambda1.04294E-7

Parameter Estimates
ParameterDFEstimateStandard
Error
t ValueApprox
Pr > |t|
Intercept1-3.7721320.338518-11.14<.0001
log_PK_PF1-0.0308410.143593-0.210.8299
log_PL_PF10.5746260.1553903.700.0002
log_y10.1332540.0580932.290.0218
log_y_sq10.1030280.00991210.39<.0001
_Sigma_v10.3030870.01689817.94<.0001
_Sigma_u13.1610137E-8...
_Mu10.5317200.3385381.570.1163


If no PRODUCTION or COST option is specified, the stochastic frontier production model is estimated by default.

Last updated: June 19, 2025