The gnrflex
function implements the first stage (share
regression) of the GNR production function estimation routine,
nonparametrically identifying the flexible input elasticity of the
production function. This function is called within the main wrapper
function gnrprod
. 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. The parameters are optimized using the Gauss-Newton
algorithm. gnrflex
currently supports only one flexible input.
For details, see Gandhi, Navarro, and Rivers (2020).
gnrflex(output, fixed, flex, share, id, time, data, control)
a list of class 'gnrflex' containing three elements:
elas
: a list containing six elements describing the share regression:
flex_elas
: a numeric vector of the estimated flexible input elasticity for each observation.
coefficients
: a numeric vector of the coefficients of the estimator scaled by a constant. See Gandhi, Navarro, and Rivers (2020, p. 2994, equation (21)).
residuals
: a numeric vector of the residuals.
SSR
: sum of squared residuals.
iterations
: number of iterations performed.
convergence
: boolean indicating whether convergence was achieved.
arg
: a list containing eight elements to be passed to the second stage function gnriv
:
input
: a numeric matrix (S3: poly
) of the polynomial expansion of all inputs.
input_degree
: a numeric matrix corresponding to input
denoting each vector's degree.
all_input
: a numeric matrix of the inputs without polynomial expansion.
big_Y
: a numeric vector of persistent productivity minus the constant of integration. See Gandhi, Navarro, and Rivers (2020, p. 2991, equation (16)).
D_coef
: a numeric vector equaling coef
divided by an estimate of the constant.
id
: a numeric vector of the firm ids.
time
: a numeric vector of time.
degree
: the degree of the share regression.
fixed_names
: the names of fixed inputs. To be used in the second stage.
control
: the list of convergence control parameters. See gnrflex.control
for available parameters.
name (character) of variable of log gross output in data or a numeric vector.
name (character or character vector) of variables of log fixed inputs in data or a numeric matrix.
name (character) of variable of log flexible input in data or a numeric vector.
name (character) of variable of log intermediate input's revenue share in data or a numeric vector.
name (character) of variable of firm id in data or a numeric vector.
name (character) of variable of time in data or a numeric vector.
data.frame
containing all variables with names specified by arguments above (left empty if arguments above are vector/matrix rather than strings).
an optional list of convergence settings. See gnrflex.control
for listing.
Gandhi, Amit, Salvador Navarro, and David Rivers. 2020. "On the Identification of Gross Output Production Functions." Journal of Political Economy, 128(8): 2973-3016. tools:::Rd_expr_doi("10.1086/707736").
Davidson, Russell, James G. MacKinnon. 1993. "The Gauss-Newton Regression." In Estimation and Inference in Econometrics, 176-207. New York: Oxford University Press.
require(gnrprod)
data <- colombian
industry_311_flex <- gnrflex(output = "RGO", fixed = c("L", "K"),
flex = "RI", share = "share", id = "id",
time = "year", data = data,
control = list(degree = 2, maxit = 200))
Run the code above in your browser using DataLab