Dear All,
I am trying to estimate firm productivities and I would highly appreciate if you could help me with a problem I encounter when using the opreg command (Olley & Pakes estimation - The Stata Journal (2008) 8, Number 2, pp. 221-231)
My dependent variable is Value added (lnVA) and my independent variables are labor (lnL), capital (lnK) and investment (lnINV).
TFP is estimated as the firm-specific error term (difference between actual lnVA and predicted lnVA).
Precisely, everything seems to work out fine (positive consistent coefficients) until I use the predict command to estimate predicted value added, where I only get negative values for value added.
My do-file looks as follows:
gen lnVA=ln(ValueaddedYitdeflated)
gen lnK=ln(CapitalStockKitdeflated)
gen lnL=ln(LaborStockLit)
gen lnINV=ln(InvestmentIitdeflated)
xtset gvkey FYEAR
gen firmid = gvkey
sort firmid FYEAR
by firmid: gen count = _N
gen survivor = count == 35
gen has95 = 1 if FYEAR == 2013
sort firmid has95
by firmid: replace has95 = 1 if has95[_n-1] == 1
replace has95 = 0 if has95 == .
sort firmid FYEAR
by firmid: gen has_gaps = 1 if FYEAR[_n-1] != FYEAR-1 & _n != 1
sort firmid has_gaps
by firmid: replace has_gaps = 1 if has_gaps[_n-1] == 1
replace has_gaps = 0 if has_gaps == .
by firmid: generate exit = survivor == 0 & has95 == 0 & has_gaps != 1 & _n == _N
replace exit = 0 if exit == 1 & FYEAR == 2013
opreg lnVA, exit(exit) state(lnK) proxy(lnINV) free(lnL) cvars(FYEAR SIC2) vce(bootstrap, seed(1) rep(5))
predict predictedlnVA
generate lnTFP= lnVA- predictedlnVA
generate TFP=exp(lnTFP)
example of results:
Coefficients
lnK 0.353347
lnL 0.6771758
FYEAR 0.0132599
SIC2 0.00034
Data
lnVA predictedlnVA lnTFP TFP
18.66503 -19.38246 38.04749 3.34e+16
19.76054 -19.72548 39.48602 1.41e+17
19.91087 -19.83262 39.74349 1.82e+17
19.24627 -19.3807 38.26238 4.14e+16
Do you maybe know what the reason for this might be? Obviously, I could just use the abs() command to obtain absolute values for predictedlnVA, however I am concerned that the results are not estimated correctly. Using simple OLS or panel regression, I obtain positive values, so I assume my input data is not wrong.
Thank you very much for your help!
Best regards,
Max Cuda
I am trying to estimate firm productivities and I would highly appreciate if you could help me with a problem I encounter when using the opreg command (Olley & Pakes estimation - The Stata Journal (2008) 8, Number 2, pp. 221-231)
My dependent variable is Value added (lnVA) and my independent variables are labor (lnL), capital (lnK) and investment (lnINV).
TFP is estimated as the firm-specific error term (difference between actual lnVA and predicted lnVA).
Precisely, everything seems to work out fine (positive consistent coefficients) until I use the predict command to estimate predicted value added, where I only get negative values for value added.
My do-file looks as follows:
gen lnVA=ln(ValueaddedYitdeflated)
gen lnK=ln(CapitalStockKitdeflated)
gen lnL=ln(LaborStockLit)
gen lnINV=ln(InvestmentIitdeflated)
xtset gvkey FYEAR
gen firmid = gvkey
sort firmid FYEAR
by firmid: gen count = _N
gen survivor = count == 35
gen has95 = 1 if FYEAR == 2013
sort firmid has95
by firmid: replace has95 = 1 if has95[_n-1] == 1
replace has95 = 0 if has95 == .
sort firmid FYEAR
by firmid: gen has_gaps = 1 if FYEAR[_n-1] != FYEAR-1 & _n != 1
sort firmid has_gaps
by firmid: replace has_gaps = 1 if has_gaps[_n-1] == 1
replace has_gaps = 0 if has_gaps == .
by firmid: generate exit = survivor == 0 & has95 == 0 & has_gaps != 1 & _n == _N
replace exit = 0 if exit == 1 & FYEAR == 2013
opreg lnVA, exit(exit) state(lnK) proxy(lnINV) free(lnL) cvars(FYEAR SIC2) vce(bootstrap, seed(1) rep(5))
predict predictedlnVA
generate lnTFP= lnVA- predictedlnVA
generate TFP=exp(lnTFP)
example of results:
Coefficients
lnK 0.353347
lnL 0.6771758
FYEAR 0.0132599
SIC2 0.00034
Data
lnVA predictedlnVA lnTFP TFP
18.66503 -19.38246 38.04749 3.34e+16
19.76054 -19.72548 39.48602 1.41e+17
19.91087 -19.83262 39.74349 1.82e+17
19.24627 -19.3807 38.26238 4.14e+16
Do you maybe know what the reason for this might be? Obviously, I could just use the abs() command to obtain absolute values for predictedlnVA, however I am concerned that the results are not estimated correctly. Using simple OLS or panel regression, I obtain positive values, so I assume my input data is not wrong.
Thank you very much for your help!
Best regards,
Max Cuda
Comment