Resources

Stochastic Frontier Models

/*--------------------------------------------------------------

                    SAS Sample Library

        Name: qliex07.sas
 Description: Example program from SAS/ETS User's Guide,
              The QLIM Procedure
       Title: Stochastic Frontier Models
     Product: SAS/ETS Software
        Keys: limited dependent variables
        PROC: QLIM
       Notes:

--------------------------------------------------------------*/

title1 '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
3 1 15 0.1619 0.3019 0.4573 0.3532 0.2346 0.0242
4 1 15 0.1486 0.1502 0.4167 0.3039 0.2179 0.0548
5 1 15 0.1602 0.1697 0.3519 0.2215 0.2341 0.0561
6 1 15 0.255 0.211 0.4399 0.2008 0.2086 0.1508
7 1 15 0.3298 0.2464 0.4899 0.2243 0.2773 0.2297
8 1 15 0.4779 0.2716 0.554 0.2518 0.2777 0.4238
9 1 15 0.6018 0.321 0.5914 0.314 0.2957 0.5184
10 1 15 0.4357 0.2232 0.5688 0.4127 0.3035 1.0321
11 1 15 0.4239 0.1045 0.4925 0.4021 0.1967 0.8129
12 1 15 0.5069 0.1232 0.5485 0.4509 0.1275 0.803
13 1 15 0.6001 0.1766 0.6765 0.4701 0.1949 0.7824
14 1 15 0.6609 0.2651 0.7925 0.4657 0.2341 0.7722
15 2 13 -1.3762 -0.9166 -0.9337 -1.1168 -1.0955 -1.5155
1 2 13 -1.4136 -1.0401 -0.9645 -1.2386 -1.1365 -1.4109
2 2 13 -1.3829 -0.9755 -0.9196 -1.2599 -1.0978 -1.5019
3 2 13 -1.2169 -0.9402 -0.894 -1.2146 -1.0435 -1.3642
4 2 13 -1.1221 -0.9165 -0.7476 -1.1269 -0.9862 -1.2585
5 2 13 -1.0928 -0.8856 -0.7244 -1.0946 -0.9857 -1.2561
6 2 13 -1.0051 -0.8723 -0.7485 -1.04 -1.0016 -1.2417
7 2 13 -0.9256 -0.7976 -0.6808 -0.9931 -0.9581 -1.1881
8 2 13 -0.6947 -0.6349 -0.4885 -0.9134 -0.8486 -1.0956
9 2 13 -0.3601 -0.4146 -0.1939 -0.7786 -0.6667 -0.762
10 2 13 -0.4682 -0.6371 -0.2165 -0.5659 -0.7133 -0.6895
11 2 13 -0.7835 -0.9199 -0.5724 -0.9579 -1.0103 -0.4252
12 2 13 -1.8298 -1.9861 -1.7097 -1.9193 -1.8828 -0.5247
13 3 12 -1.3731 -1.0855 -1.0699 -1.1998 -1.2809 -0.987
1 3 12 -1.3081 -1.05 -1.0006 -1.1273 -1.2406 -0.7581
2 3 12 -1.3412 -0.9905 -1.0009 -1.1455 -1.1956 -1.1354
3 3 12 -1.1404 -1.0215 -0.9918 -1.1126 -1.1561 -0.782
4 3 12 -1.1358 -1.1799 -1.0102 -1.0349 -1.1438 -0.774
5 3 12 -1.007 -1.0971 -0.9238 -1.0197 -1.1088 -0.8185
6 3 12 -1.0279 -1.1821 -1 -1.0254 -1.1335 -0.8815
7 3 12 -0.8799 -1.0426 -0.9088 -1.0344 -0.9916 -0.8618
8 3 12 -0.7105 -0.9482 -0.7978 -1.0298 -0.8933 -0.8471
9 3 12 -0.6277 -0.8681 -0.7007 -0.9563 -0.9163 -0.7953
10 3 12 -0.8121 -1.0449 -0.7192 -0.8316 -0.9036 -0.7836
11 3 12 -0.8398 -1.1135 -0.814 -0.9469 -0.9688 -0.7325
12 4 15 -0.6527 -0.307 -0.4665 -0.5098 -0.359 -0.3962
1 4 15 -0.6262 -0.2821 -0.3834 -0.4754 -0.3371 -0.3261
2 4 15 -0.4228 -0.2066 -0.2192 -0.3395 -0.1461 -0.3581
3 4 15 -0.2337 0.0193 -0.0287 -0.1845 -0.0393 -0.1019
4 4 15 -0.1709 -0.116 -0.0591 -0.0891 -0.038 0.0045
5 4 15 -0.1591 -0.0928 -0.0802 -0.0317 -0.0362 0.0386
6 4 15 -0.0803 -0.05 -0.0699 0.0003 -0.0301 0.0048
7 4 15 0 0 0 0 0 0
8 4 15 0.181 0.1053 0.1042 0.0106 0.0611 -0.0008
9 4 15 0.2932 0.1645 0.1814 0.0874 0.151 0.0483
10 4 15 0.2823 0.1295 0.2512 0.3503 0.1784 0.184
11 4 15 0.222 0.1135 0.2533 0.2602 0.1874 0.3101
12 4 15 0.2266 0.0957 0.3107 0.2211 0.1785 0.297
13 4 15 0.3161 0.1125 0.4768 0.2429 0.1875 0.4578
14 4 15 0.3291 0.116 0.5466 0.202 0.192 0.5847
15 5 14 -0.28 0.0176 0.1246 -0.0338 0.1059 -0.079
1 5 14 -0.2456 0.0336 0.1406 -0.0876 0.1219 0.0964
2 5 14 -0.1473 0.0476 0.1907 -0.0801 0.1338 -0.1392
3 5 14 -0.1173 0.0963 0.2473 0.0293 0.2316 -0.0548
4 5 14 -0.0836 -0.0595 0.2907 0.0921 0.1607 -0.0697
5 5 14 -0.0525 -0.0055 0.2217 0.0862 0.1618 -0.1256
6 5 14 0.0061 0.024 0.2944 0.0937 0.1745 -0.1631
7 5 14 0.0667 0.0519 0.3141 0.1371 0.1428 -0.1809
8 5 14 0.261 0.1088 0.3762 0.2288 0.1768 -0.1384
9 5 14 0.3914 0.1736 0.4077 0.2587 0.2472 -0.11
10 5 14 0.3 0.1172 0.4832 0.3531 0.2847 0.3942
11 5 14 0.2929 0.0816 0.518 0.3718 0.2727 0.5131
12 5 14 0.3696 0.1003 0.6172 0.4443 0.2295 0.4512
13 5 14 0.4159 0.1625 0.6716 0.4819 0.2539 0.3674
14 6 7 -1.4357 -1.0294 -0.9999 -1.157 -1.3689 -0.8044
1 6 7 -1.2341 -1.3022 -0.6525 -1.0948 -1.3419 -1.7
2 6 7 -1.1703 -1.0175 -0.7708 -1.0842 -1.342 -1.4218
3 6 7 -1.2923 -1.2556 -1.058 -1.1409 -1.3839 -1.3637
4 6 7 -1.128 -1.1509 -0.8881 -1.2102 -1.3301 -1.2783
5 6 7 -0.9071 -1.0991 -0.795 -1.2011 -1.3128 -1.3575
6 6 7 -0.86 -1.0726 -0.7804 -1.1281 -1.2835 -1.0661
7 7 11 -1.2565 -0.5917 -0.744 -0.363 -1.0705 -0.6389
1 7 11 -0.7402 -0.4647 -0.5578 -0.4136 -0.9706 -0.7789
2 7 11 -0.5903 -0.5124 -0.4745 -0.3871 -0.9226 -0.7844
3 7 11 -0.5379 -0.5014 -0.4428 -0.353 -0.9593 -0.7643
4 7 11 -0.4018 -0.461 -0.3795 -0.25 -0.945 -0.8308
5 7 11 -0.382 -0.436 -0.3797 -0.2125 -0.9334 -0.8798
6 7 11 -0.2129 -0.4117 -0.3608 -0.1466 -0.8865 -0.9321
7 7 11 -0.1763 -0.4024 -0.2277 0.0196 -0.8341 -0.8173
8 7 11 -0.1789 -0.4195 -0.1907 0.0406 -0.8186 -0.7969
9 7 11 0.0996 -0.3147 0.0987 0.1154 -0.7533 -0.6156
10 7 11 0.222 -0.235 0.2021 0.1927 -0.6935 -0.4791
11 8 10 0.074 0.1227 0.4156 0.1389 0.2273 0.5921
1 8 10 0.0791 0.1405 0.4244 0.156 0.213 0.4179
2 8 10 0.2139 0.2191 0.4659 0.1814 0.1943 0.4043
3 8 10 0.2171 0.1943 0.4464 0.0605 0.1452 0.5639
4 8 10 0.0971 0.0196 0.2355 0.0358 0.0979 0.4947
5 8 10 0.0169 -0.0413 0.2876 -0.0327 -0.003 0.4046
6 8 10 0.0843 -0.0744 0.2769 -0.0075 -0.0773 0.3432
7 8 10 0.1695 -0.0746 0.3354 0.0225 -0.1179 0.2722
8 8 10 0.3219 -0.0721 0.4368 -0.0092 -0.1489 0.1986
9 8 10 0.3874 -0.0563 0.4186 0.0628 -0.142 0.2723
10 9 14 0.0596 0.3577 0.4433 0.2313 0.3907 0.1389
1 9 14 0.0837 0.3459 0.3947 0.221 0.2454 0.1427
2 9 14 0.2168 0.368 0.4569 0.2473 0.1983 0.1335
3 9 14 0.1944 0.2579 0.4905 0.3125 0.198 0.0705
4 9 14 0.1598 0.1962 0.4425 0.2945 0.1796 -0.0068
5 9 14 0.2107 0.1812 0.4236 0.2699 0.1817 -0.0247
6 9 14 0.2666 0.2144 0.4826 0.2737 0.2148 -0.0957
7 9 14 0.3696 0.1971 0.4834 0.2174 0.1664 -0.1143
8 9 14 0.4803 0.1853 0.4938 0.174 0.1887 -0.053
9 9 14 0.3812 0.0539 0.4505 0.2039 0.1038 0.0233
10 9 14 0.3062 -0.0705 0.4301 0.232 0.0376 0.5144
11 9 14 0.2916 -0.1361 0.4112 0.2371 -0.0234 0.4323
12 9 14 0.3598 -0.1118 0.493 0.2468 -0.0723 0.5033
13 9 14 0.4143 -0.0673 0.5699 0.2726 -0.1099 0.4355
14 10 14 0.2985 0.5709 0.4447 0.5661 0.5254 0.8366
1 10 14 0.241 0.4818 0.3527 0.5478 0.4856 0.9377
2 10 14 0.3562 0.5164 0.3941 0.598 0.496 0.5582
3 10 14 0.4303 0.5241 0.4506 0.618 0.4998 0.579
4 10 14 0.4333 0.3997 0.4409 0.6381 0.5161 0.5072
5 10 14 0.3784 0.3547 0.4168 0.6463 0.5259 0.4934
6 10 14 0.4932 0.4199 0.5374 0.6442 0.5216 0.468
7 10 14 0.5508 0.4613 0.6004 0.6305 0.508 0.5065
8 10 14 0.7582 0.5187 0.657 0.6133 0.523 0.5673
9 10 14 0.7118 0.4636 0.6058 0.6621 0.4963 0.8269
10 10 14 0.6234 0.2749 0.5754 0.6536 0.4375 0.9444
11 10 14 0.7149 0.2742 0.5943 0.6722 0.3216 0.9084
12 10 14 0.8342 0.3526 0.7929 0.7287 0.3249 0.9864
13 10 14 0.893 0.4678 0.8952 0.7443 0.3947 0.9964
;


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

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
 4  1955  .3150  4.0  1.830  .1152  166.000  .7857  32.2000  .0990
 5  1955  .1970  5.0  2.120  .2300  233.000  .3841  28.6000  .3859
 6  1955  .0980  9.0  2.120  .1881  195.000  .2926  28.6000  .5193
 7  1955  .9490  11.0  1.980  .1584  206.000  .6093  35.5000  .2323
 8  1955  .6750  13.0  2.050  .1880  150.000  .4952  35.1000  .3169
 9  1955  .5250  13.0  2.190  .1852  155.000  .3651  29.1000  .4496
10  1955  .5010  22.0  1.720  .1845  188.000  .2491  15.0000  .5664
11  1955  1.1940  25.0  2.090  .1994  170.000  .5478  17.9000  .2528
12  1955  .6700  25.0  1.680  .1102  167.000  .6118  39.7000  .2780
13  1955  .3490  35.0  1.810  .1386  213.000  .3817  22.6000  .4797
14  1955  .4230  39.0  2.300  .1702  164.000  .4137  23.6000  .4161
15  1955  .5010  43.0  1.750  .1143  170.000  .3481  42.8000  .5376
16  1955  .5500  63.0  1.760  .0887  161.000  .5184  10.3000  .3929
17  1955  .7950  68.0  1.980  .1116  210.000  .3054  35.5000  .5830
18  1955  .6640  81.0  2.290  .1665  158.000  .3859  28.5000  .4476
19  1955  .7050  84.0  2.190  .1484  156.000  .3630  29.1000  .4883
20  1955  .9030  73.0  1.750  .0821  176.000  .2910  42.8000  .6269
21  1955  1.5040  99.0  2.200  .0906  170.000  .3947  36.2000  .5146
22  1955  1.6150  101.0  1.660  .1080  192.000  .3675  33.4000  .5245
23  1955  1.1270  119.0  1.920  .1980  164.000  .4164  22.5000  .3856
24  1955  .7180  120.0  1.770  .1648  175.000  .2664  21.3000  .5688
25  1955  2.4140  122.0  2.090  .2402  180.000  .4949  17.9000  .2649
26  1955  1.1300  130.0  1.820  .1171  176.000  .2779  38.9000  .6049
27  1955  .9920  138.0  1.800  .1304  202.000  .4011  20.2000  .4686
28  1955  1.5540  149.0  1.920  .0553  227.000  .4320  22.5000  .5127
29  1955  1.2250  196.0  1.920  .0722  186.000  .4550  29.1000  .4728
30  1955  1.5650  197.0  2.190  .0692  183.000  .4151  29.1000  .5157
31  1955  1.9360  209.0  1.920  .0801  169.000  .4858  22.5000  .4340
32  1955  3.1540  214.0  1.520  .1722  168.000  .4839  27.5000  .3439
33  1955  2.5990  220.0  1.920  .1500  164.000  .4886  22.5000  .3614
34  1955  3.2980  234.0  2.200  .1554  164.000  .4595  36.2000  .3851
35  1955  2.4410  235.0  2.110  .1905  170.000  .3797  24.4000  .4298
36  1955  2.0310  253.0  1.920  .1608  158.000  .1879  22.5000  .6513
37  1955  4.6660  279.0  2.050  .1689  177.000  .4548  35.1000  .3763
38  1955  1.8340  290.0  1.660  .1640  195.000  .4250  33.4000  .4110
39  1955  2.0720  290.0  1.800  .1156  176.000  .4768  20.2000  .4076
40  1955  2.0390  295.0  1.770  .1405  188.000  .3951  21.3000  .4644
41  1955  3.3980  299.0  1.700  .0896  187.000  .5786  26.9000  .3318
42  1955  3.0830  324.0  2.020  .1509  152.000  .0904  35.1000  .7587
43  1955  2.3440  333.0  2.190  .1161  157.000  .3626  29.1000  .5213
44  1955  2.3820  338.0  1.850  .0616  163.000  .4799  24.6000  .4585
45  1955  2.6570  353.0  2.190  .0809  143.000  .2829  29.1000  .6361
46  1955  1.7050  353.0  2.130  .0880  167.000  .6341  10.7000  .2780
47  1955  3.2300  416.0  1.540  .0839  217.000  .3623  26.2000  .5538
48  1955  5.0490  420.0  1.520  .1601  144.000  .3465  27.5000  .4934
49  1955  3.8140  456.0  2.090  .0883  178.000  .3349  30.0000  .5768
50  1955  4.5800  484.0  1.750  .1009  176.000  .2828  42.8000  .6163
51  1955  4.3580  516.0  2.300  .1515  167.000  .3981  23.6000  .4504
52  1955  4.7140  550.0  2.050  .0806  158.000  .2920  35.1000  .6275
53  1955  4.3570  563.0  2.320  .0703  162.000  .4024  31.9000  .5273
54  1955  3.9190  566.0  2.310  .0650  198.000  .3776  33.5000  .5574
55  1955  3.4420  592.0  1.920  .0915  164.000  .4564  22.5000  .4521
56  1955  4.8980  671.0  2.050  .1479  164.000  .3432  35.1000  .5089
57  1955  3.5840  696.0  1.760  .0702  161.000  .3709  10.3000  .5589
58  1955  5.5350  719.0  1.700  .0703  174.000  .4946  26.9000  .4351
59  1955  4.4060  742.0  2.040  .1516  157.000  .4633  20.7000  .3851
60  1955  4.2890  795.0  2.240  .0483  185.000  .3569  26.5000  .5949
61  1955  6.7310  800.0  1.700  .1170  157.000  .3396  26.9000  .5434
62  1955  6.8950  808.0  1.680  .0859  203.000  .4060  39.7000  .5081
63  1955  5.1120  811.0  2.290  .0847  178.000  .2884  28.5000  .6269
64  1955  5.1410  855.0  2.000  .1457  183.000  .4317  34.3000  .4226
65  1955  5.7200  860.0  2.310  .0597  168.000  .4528  33.5000  .4875
66  1955  4.6910  909.0  1.450  .0921  196.000  .4435  17.6000  .4644
67  1955  6.8320  913.0  1.700  .1250  166.000  .4028  26.9000  .4721
68  1955  4.8130  924.0  1.760  .1163  172.000  .5402  10.3000  .3436
69  1955  6.7540  984.0  1.700  .1083  158.000  .2435  26.9000  .6482
70  1955  5.1270  991.0  2.090  .0861  174.000  .4965  30.0000  .4174
71  1955  6.3880  1000.0  1.550  .0408  225.000  .3881  28.2000  .6667
72  1955  4.5090  1098.0  2.110  .0781  168.000  .4481  24.4000  .4738
73  1955  7.1850  1109.0  2.050  .0752  177.000  .2527  35.1000  .6721
74  1955  6.8000  1118.0  2.300  .1299  161.000  .3511  23.6000  .5311
75  1955  7.7430  1122.0  2.190  .0977  162.000  .3743  29.1000  .5279
76  1955  7.9680  1137.0  2.040  .0655  158.000  .4552  20.7000  .4793
77  1955  8.8580  1156.0  2.310  .1052  176.000  .3154  33.5000  .5794
78  1955  8.5880  1166.0  1.700  .1224  183.000  .4339  26.9000  .4436
79  1955  6.4490  1170.0  2.050  .0935  166.000  .2549  35.1000  .6516
80  1955  8.4880  1215.0  2.190  .0695  164.000  .4390  29.1000  .4915
81  1955  8.8770  1279.0  2.000  .0635  207.000  .3330  34.3000  .6034
82  1955  10.2740  1291.0  2.320  .0559  175.000  .8048  31.9000  .1393
83  1955  6.0240  1290.0  1.550  .0432  225.000  .3511  28.2000  .6057
84  1955  8.2580  1331.0  2.130  .0462  178.000  .4353  30.0000  .5185
85  1955  13.3760  1373.0  2.200  .1324  157.000  .3233  36.2000  .5443
86  1955  10.6900  1420.0  2.200  .0902  138.000  .3139  36.2000  .5959
87  1955  8.3080  1474.0  1.850  .0755  163.000  .4425  24.6000  .4819
88  1955  6.0820  1497.0  1.760  .0767  168.000  .5871  10.3000  .3362
89  1955  9.2840  1545.0  1.800  .0836  158.000  .4498  20.2000  .4665
90  1955  10.8790  1649.0  2.320  .0975  177.000  .3991  31.9000  .5035
91  1955  8.4770  1668.0  1.800  .0833  170.000  .4524  20.2000  .4643
92  1955  6.8770  1782.0  2.130  .0618  183.000  .6377  10.7000  .3005
93  1955  15.1060  1831.0  1.980  .1337  162.000  .3361  35.5000  .5302
94  1955  8.0310  1833.0  1.760  .0915  177.000  .6501  10.3000  .2584
95  1955  8.0820  1838.0  1.450  .0671  196.000  .4810  17.6000  .4519
96  1955  10.8660  1787.0  2.240  .1050  164.000  .4125  26.5000  .4824
97  1955  8.5960  1918.0  1.690  .0803  158.000  .5513  12.9000  .3684
98  1955  8.6730  1930.0  1.810  .0733  157.000  .3436  22.6000  .5831
99  1955  15.4370  2028.0  2.110  .0808  163.000  .3989  24.4000  .5204
100  1955  8.2110  2057.0  1.760  .1239  161.000  .6164  10.3000  .2597
101  1955  11.9820  2084.0  1.770  .0905  156.000  .4103  21.3000  .4992
102  1955  16.6740  2226.0  2.000  .0779  217.000  .3430  34.3000  .5791
103  1955  12.6200  2304.0  2.300  .0775  161.000  .4865  23.6000  .4360
104  1955  12.9050  2341.0  2.040  .0945  183.000  .4076  20.7000  .4980
105  1955  11.6150  2353.0  1.690  .1006  167.000  .5561  12.9000  .3433
106  1955  9.3210  2367.0  1.760  .0990  161.000  .5751  10.3000  .3259
107  1955  12.9620  2451.0  2.040  .0951  163.000  .3183  20.7000  .5866
108  1955  16.9320  2457.0  2.200  .0614  170.000  .3234  36.2000  .6152
109  1955  9.6480  2507.0  1.760  .0964  174.000  .5755  10.3000  .3281
110  1955  18.3500  2530.0  2.310  .0735  197.000  .4460  33.5000  .4805
111  1955  17.3330  2576.0  1.920  .1398  162.000  .4275  22.5000  .4327
112  1955  12.0150  2607.0  1.760  .1116  155.000  .5320  10.3000  .3564
113  1955  11.3200  2870.0  1.760  .1333  167.000  .5822  10.3000  .2845
114  1955  22.3370  2993.0  2.310  .0581  176.000  .4385  33.5000  .5034
115  1955  19.0350  3202.0  2.300  .0983  170.000  .4974  23.6000  .5034
116  1955  12.2050  3286.0  1.610  .0681  183.000  .4779  17.8000  .4540
117  1955  17.0780  3312.0  1.680  .0393  190.000  .3314  28.8000  .6294
118  1955  25.5280  3498.0  2.090  .1141  170.000  .3714  30.0000  .5145
119  1955  24.0210  3538.0  2.090  .0840  176.000  .3761  30.0000  .5399
120  1955  32.1970  3794.0  2.050  .0976  159.000  .4118  35.1000  .4906
121  1955  26.6520  3841.0  2.290  .1059  157.000  .3679  28.5000  .5262
122  1955  20.1640  4014.0  2.110  .0809  161.000  .5348  24.4000  .3843
123  1955  14.1320  4217.0  1.530  .0470  172.000  .5252  18.1000  .4278
124  1955  21.4100  4305.0  2.110  .0848  203.000  .8448  24.4000  .0703
125  1955  23.2440  4494.0  2.040  .0624  167.000  .5105  20.7000  .4271
126  1955  29.8450  4764.0  2.190  .1328  195.000  .3530  29.1000  .5143
127  1955  32.3180  5277.0  1.920  .0719  161.000  .3582  29.1000  .5699
128  1955  21.9880  5283.0  2.040  .0630  159.000  .4491  20.7000  .4879
129  1955  35.2290  5668.0  2.110  .0977  177.000  .5088  24.4000  .3936
130  1955  17.4670  5681.0  1.760  .0802  157.000  .5323  10.3000  .3875
131  1955  22.8280  5819.0  1.790  .0854  196.000  .3921  18.5000  .5226
132  1955  33.1540  6000.0  2.110  .1043  183.000  .4186  24.4000  .4771
133  1955  32.2280  6119.0  1.540  .0797  189.000  .3503  26.2000  .5700
134  1955  34.1680  6136.0  1.920  .0653  160.000  .6791  22.5000  .2556
135  1955  40.5940  7193.0  2.120  .0729  162.000  .3550  28.6000  .5721
136  1955  33.3540  7886.0  1.610  .0587  178.000  .5835  17.8000  .3578
137  1955  64.5420  8419.0  2.320  .1108  199.000  .3910  31.9000  .4982
138  1955  41.2380  8642.0  2.240  .0517  182.000  .3259  26.5000  .6224
139  1955  47.9930  8787.0  2.310  .0841  190.000  .3407  33.5000  .5753
140  1955  69.8780  9484.0  2.110  .0759  165.000  .4044  24.4000  .5198
141  1955  44.8940  9956.0  1.680  .0688  203.000  .2942  28.8000  .6370
142  1955  67.1200  11477.0  2.240  .0670  151.000  .3458  26.5000  .5872
143  1955  73.0500  11796.0  2.120  .1033  148.000  .3914  28.6000  .5054
144  1955  139.4220  14359.0  2.310  .1050  212.000  .4102  33.5000  .4848
145  1955  119.9390  16719.0  2.300  .0906  162.000  .4340  23.6000  .4754
166  1955  23.2200  3018.0  2.010  .1292  163.000  .3282  35.1000  .5425
167  1955  7.7970  874.0  2.050  .1084  155.000  .2123  35.1000  .6793
168  1955  1.6100  14.0  1.990  .1764  199.000  .6352  35.4000  .1884
169  1955  28.9960  4174.0  2.280  .1067  157.000  .3675  28.5500  .5258
170  1955  37.7670  6356.0  1.920  .0713  160.200  .6656  22.5000  .2631
171  1955  37.4960  8291.0  1.910  .0764  171.000  .5175  22.4300  .4060
172  1955  64.8880  13702.0  1.660  .0877  192.000  .3692  22.9000  .5431
174  1955  52.0830  8545.0  2.170  .0850  186.000  .5933  26.4000  .3217
175  1955  132.9010  19170.0  2.300  .0910  162.000  .4511  23.6000  .3217
176  1955  31.9800  4548.0  2.180  .0862  159.000  .3119  36.0000  .6020
177  1955  12.4830  2106.0  1.770  .0945  156.000  .3940  21.3000  .5115
178  1955  5.8170  895.0  2.270  .0924  174.360  .2975  28.5600  .6101
179  1955  12.0720  1787.0  2.110  .0595  178.000  .4036  30.0000  .5369
181  1955  9.3910  2050.0  1.800  .0803  157.980  .3377  22.5000  .5820
;


/* 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;

/*-- 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;

/*-- 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;

/*-- 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;