Hi,
I am a new STATA 15 user. I am doing my assignment on estimating the Total Factor Productivity for panel data in STATA using different methods, such as OLS, Olley and Pake, Ackerberg, Levinsohn and Petrin, and Woodridge. I have some questions as following:
1) I am wondering that it is acceptable to apply the user-developed command such as opreg, levpet, acfest or prodest directly.

2) When I try to run levpet, it always shows the error "repeated time values within panel" even if there is no error when I declare it as panel data. I also checked the duplicates.

3) My data is as this picture. I need to estimate TFP by sub-sectors, for example, isic2=25. When I ran an OLS:

regress va k l m if isic==25
predict TFP_25, resid

I found that the residuals (TFP_25) are calculated for all of the sub-sectors, not only the isic2=25.

Kindly help me to solve these issues. Thank you so much.


Array