Good afternoon to everyone,
I would like to use the Olley and Pakes estimator (1996) to estimate the input elasticities without using the command opreg. This estimator uses a control function (i.e. , a polynomial) to "semi-parametrically" control for productivity. Then it exploits the high persistence of productivity to derive unbiased estimates of the "dynamic" inputs elasticities, exploiting the fact that, assuming perfect competition, the optimal investment rule is related to the state variables (productivity, capital, time, etc.). Under certain conditions, this function can be inverted (non-zero investments, monotonic relationship between productivity, investment and capital).
To make a long story short: suppose we have one sector only, the algorithm is the following.
Let q l k a i be the natural logarithm of output, labour, capital, firm age, and investment.
First stage: I estimate the labour elasticity (capital and the "age" of each firm enter both the "productivity polynomial" and the production function, so their coefficient is not identified) via OLS. I predict output and I generate y - _b[l]*l and y_hat - _b[l]*l. I also save the constant of this regression.
Second stage: since productivity follows an unspecified first-order Markov process and since the probability of dropping out from my dataset ("exit the market") is basically the probability of getting a productivity draw below a given threshold conditional on the previous period productivity, I define an indicator that takes value 1 if a firm is present in the dataset in the next period, 0 if this is not the case and missing value in the last period of my dataset (NOTE: obviously you drop every firm with temporal "holes"). Then, I estimate a probit of this variable over the same 2nd order polynomial I used in the first-stage OLS, and I compute the propensity scores.
Third stage: now you exploit the time-series property of productivity and the fact that capital (and every "fixed" input) in t and in t+1 should be independent from an innovation shock you would get in t+1, and estimate the following (note that the aforementioned reasoning doesn't hold for labor, this is why you need the first stage) by non-linear-least-squares:
Now, suppose that instead of 1 sector, I have 20 sectors, coded by some 3 digit number, and that want to use industry dummies:
First stage becomes:
QUESTION 1 : How do I save the 20 scalars of the dummies, feasibly?
In the Third stage, you will now need to substitute the B_0 with each of the sectorial dummies (multiplied by a vector of ones, each): namely, suppose that j indexes a sector, the last stage becomes (obviously, the latter code would give an error! I use LaTeX language to try to convey the message...)
QUESTION 2 : How can I write down this summation in the nl command?
Sorry for being so long, I tried to be as clear as possible...
I would like to use the Olley and Pakes estimator (1996) to estimate the input elasticities without using the command opreg. This estimator uses a control function (i.e. , a polynomial) to "semi-parametrically" control for productivity. Then it exploits the high persistence of productivity to derive unbiased estimates of the "dynamic" inputs elasticities, exploiting the fact that, assuming perfect competition, the optimal investment rule is related to the state variables (productivity, capital, time, etc.). Under certain conditions, this function can be inverted (non-zero investments, monotonic relationship between productivity, investment and capital).
To make a long story short: suppose we have one sector only, the algorithm is the following.
Let q l k a i be the natural logarithm of output, labour, capital, firm age, and investment.
First stage: I estimate the labour elasticity (capital and the "age" of each firm enter both the "productivity polynomial" and the production function, so their coefficient is not identified) via OLS. I predict output and I generate y - _b[l]*l and y_hat - _b[l]*l. I also save the constant of this regression.
Code:
reg q l k a i (c.i c.a c.k)#(c.i c.a c.k) predict q_hat scalar b_l = _b[l] scalar b_zero = _b[_cons] gen phi = q - b_l*l gen phi_hat = q_hat - b_l*l
Second stage: since productivity follows an unspecified first-order Markov process and since the probability of dropping out from my dataset ("exit the market") is basically the probability of getting a productivity draw below a given threshold conditional on the previous period productivity, I define an indicator that takes value 1 if a firm is present in the dataset in the next period, 0 if this is not the case and missing value in the last period of my dataset (NOTE: obviously you drop every firm with temporal "holes"). Then, I estimate a probit of this variable over the same 2nd order polynomial I used in the first-stage OLS, and I compute the propensity scores.
Code:
probit P_s i a k (c.i c.a c.k)#(c.i c.a c.k) predict Ps, pr
Code:
gen lead_k = F.k
gen lead_phi = F.phi
gen lead_a = F.a
gen B_0 = 1*b_zero
nl (lead_phi = {c} + {a_k}*lead_k + {a_a}*lead_a ///
+ (phi_hat - {a_k}*k - {a_a}*a - B_0) ///
+ (phi_hat - {a_k}*k - {a_a}*a - B_0)^2 ///
+ Ps ///
+ Ps^2*(phi_hat - {a_k}*k - {a_a}*a - B_0) ///
+ Ps^2), ///
initial(a_k 0.48 a_a 0.3) vce(bootstrap)
First stage becomes:
Code:
reg q l k a i i.sector_id (c.i c.a c.k)#(c.i c.a c.k), noconstant predict q_hat gen phi = q - b_l*l gen phi_hat = q_hat - b_l*l
In the Third stage, you will now need to substitute the B_0 with each of the sectorial dummies (multiplied by a vector of ones, each): namely, suppose that j indexes a sector, the last stage becomes (obviously, the latter code would give an error! I use LaTeX language to try to convey the message...)
Code:
nl (lead_phi = {c} + {a_k}*lead_k + {a_a}*lead_a ///
+ \sum_j^{20} [ (phi_hat - {a_k}*k - {a_a}*a - B_j) ///
+ (phi_hat - {a_k}*k - {a_a}*a - B_j)^2 ///
+ Ps ///
+ Ps^2*(phi_hat - {a_k}*k - {a_a}*a - B_j) ///
+ Ps^2)], ///
initial(a_k 0.48 a_a 0.3) vce(bootstrap)
QUESTION 2 : How can I write down this summation in the nl command?
Sorry for being so long, I tried to be as clear as possible...
