Learn R Programming

gnrprod (version 1.1.2)

gnrflex: Estimate flexible input elasticity: Gandhi, Navarro, Rivers (GNR) share regression; first stage

Description

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).

Usage

gnrflex(output, fixed, flex, share, id, time, data, control)

Value

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.

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.

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

data.frame containing all variables with names specified by arguments above (left empty if arguments above are vector/matrix rather than strings).

control

an optional list of convergence settings. See gnrflex.control for listing.

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. 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.

Examples

Run this code
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