| gnrprod {gnrprod} | R Documentation |
Estimate production functions and productivity: Gandhi, Navarro, and Rivers (2020)
Description
The gnrprod function is the front end of the
gnrprod package. It estimates production functions and productivity
in two stages: gnrflex (estimate flexible input elasticity) and
gnriv (estimate fixed input elasticities and productivity).
If the production-related inputs are characters, a data.frame
must be specified under data. Alternatively, matrices/vectors may be
directly specified without specifying data. gnrprod currently
supports only one flexible input.
Usage
gnrprod(output, fixed, flex, share, in_price = NULL,
out_price = NULL, id, time, data, B = NULL,
fs_control = NULL, ss_control = NULL, ...)
Arguments
output |
name (character) of variable of log gross output in data or a numeric vector. |
fixed |
name (character or character vector) of variables of log fixed inputs in data or a numeric matrix. |
flex |
name (character) of variable of log flexible input in data or a numeric vector. |
share |
name (character) of variable of log intermediate input's revenue share in data or a numeric vector. |
in_price |
optional (required if |
out_price |
optional (required if |
id |
name (character) of variable of firm ID in data or a numeric vector. |
time |
name (character) of variable of time in data or a numeric vector. |
data |
|
B |
number of bootstrap repetitions to retrieve standard errors of elasticity estimates. By default, |
fs_control |
an optional list of convergence settings of the first stage. See |
ss_control |
an optional list of convergence settings of the second stage. See |
... |
additional optional arguments to be passed to |
Value
a list of class 'gnr' with five elements:
estimates: a list with two elements: elas the parameter estimates and std_errors the standard errors.
data: a data.frame containing: output, fixed, flex, share, id, time, estimated elasticities for each observation, estimated productivity, and first stage residuals.
first_stage: a list containing five elements describing the share regression (first stage):
coefficients: a numeric vector of the coefficients of the first stage estimator scaled by a constant. See Gandhi, Navarro, and Rivers (2020, p. 1994, equation (21)).SSR: sum of squared residual.iterations: number of iterations performed.convergence: boolean indicating whether convergence was achieved.control: list of convergence control parameters (seegnrflex.control).
second_stage: a list containing four elements describing the second stage:
optim_method: the method for optimization. Defaults to 'BFGS'. Seeoptimfor a listing of available methods.optim_info: the returned list of theoptimfunction estimating the coefficients of the constant of integration. See Gandhi, Navarro, and Rivers (2020, p. 1994, equation (21)).optim_control: the list of control parameters passed tooptim.degree_w: degree of Markov process for persistent productivity.degree_tau: degree of expansion for constant of integration.
call: the function call.
References
Gandhi, Amit, Salvador Navarro, and David Rivers. 2020. "On the Identification of Gross Output Production Functions." Journal of Political Economy, 128(8): 2973-3016. doi:10.1086/707736.
Examples
require(gnrprod)
data <- colombian
industry_311 <- gnrprod(output = "RGO", fixed = c("L", "K"),
flex = "RI", share = "share", id = "id",
time = "year", data = data,
fs_control = list(degree = 2, maxit = 200),
ss_control = list(trace = 1))