I am using a panel data set for the manufacturing industries (firm-level data) for about 20 years, which includes 4 inputs (capital, labour, energy and materials) and 1 output (value added). I am going to use a stochastic frontier analysis (Translog input distance function approach) to calculate technical efficiency (time-varying model preferably with half normal / truncated normal distribution) using the Maximum likelihood estimation (MLE) and the elasticity of substitution (between inputs of production).

I wish to seek some help in regards to formulate my STATA do-file for the project as I am a novice to this field.

My key objectives include:

1. Translog input distance function need to be formulated basis Coelli and Perelman (1995,1999)

2. Technical efficiency needs to be calculated basis Battese and Coelli (1992,1995) and further determinants of the technical efficiency also need to be evaluated basis a second stage regression.

3. The elasticity of substitution need to be calculated for multi-input case (basis Blackorby and Russell 1989, i.e. Allen elasticity of substitution (AES), Morishima elasticity of substitution (MES), and the shadow elasticity of substitution (SES)

Please help.