Hi,

I have a panel of 270 firms with quarterly observations ranging from year 2000 to 2019.

I want to run the following trans-log cost function for each of the firm using foreach and one_id program. Can anyone inform me of the correct syntax please as mine did not work and gave errors for all groups.

lnTC = a+ a1lnW12 +1/2 a2lnW3+ a3lnW12 *lnW3+ a4lnTA + 1/2a5(lnTA)2 +a6lnTA*lnW12+ a7lnTA*lnW3 + e

where, a denotes alpha (coefficients) in the above equation. TC=total cost, W12 and W3 are the prices of labor and capital, TA = total assets, e is the error term

Regards