RUNNING THE PROGRAMS:

To run the program that estimates factor demands using the Christensen and
Greene data, simply enter matlab by typing

matlab

After the prompt, >>, type 

Estimation

Once the algorithm has converged, you may graph the average cost functions by
typing, after the prompt

avgcost

To terminate the matlab session, simply type 

exit

OPTIONS

A log of the run of Estmation is saved in CG.out. To create your own log, simply remove the % in line 18 in Estimation.m from the line %diary CG.out and replace CG.out with the name of the file in which you wish to save the ouput.

If you wish to print the graph of the average cost functions, remove
the % from line 114 (the last line) in avgcost.m, from the line %print.

PROGRAMS:

Estimation.m is the main program which estimates factor demand functions using 
firm level data on factor prices, factor input levels, costs, and output levels. Factor inputs are estimated using nonparametric convex regression.

project.m is called by Estimation.m to project the current fit onto a set
of constraints.

active.m is called by Estimation.m when the solution seems to be cycling 
among the same set of constraints in subsequent iterations. An attempt is
made to jump to the final solution.

feq.m, fle.m, and flt.m are utility programs which make fuzzy comparisons of
variables (fuzzy equals, fuzzy less than or equal to, and fuzzy less than).

load_Christensen.m loads the Christensen and Greene data and makes appro-
priate transformations and normalizations of the data.

CG.out contains the log of the output from the run of Estimation.m.

results_cg.mat contains the output from the run - the fitted values (fit1),
the original factor input data (y), prices (p), and output levels (q). This
data is loaded into the program that graphs the average cost function.

avgcost.m calculates and graphs the average cost function using the nonparametric as well as translog fits. 

intpolfactor_p.m interpolates the range of possible input levels which would be consistent with observed output, prices, and factor demands. The interpolated
values of inputs are used to calculate the average cost function for the non-
parametric case. 

DATA:

Christensen.dat contains panel data on 99 utilities in the U.S. The data
format is 

OBSNO COST OUTPUT PL PK PF SL SK SF where 
PL is price of labor
PK if price of capital
PF is price of fuel
SL is cost share of labor
SK is cost share of capital
SF is cost share of fuel

A fuller description is given in E. R. Berndt, _The_Practice_of
Econometrics_, Addison-Wesley: Reading, MA, 1991.