distRayCalc {micEconDistRay}R Documentation

Calculate the Dependent Variable of a Ray-Based Input Distance Function

Description

Calculate the dependent variable (logarithmic distance) of a ray-based input distance function (Price & Henningsen, forthcoming).

Usage

distRayCalc( xNames, yNames, zNames = NULL, sNames = NULL, 
  coef, data, form = "tl", conDummy = NULL, fixThetas = FALSE )

Arguments

xNames

a vector of character strings containing the names of the variables that indicate the input quantities.

yNames

a vector of two or more character strings containing the names of the variables that indicate the output quantities.

zNames

an optional vector of character strings containing the names of ‘environmental’ variables, i.e., variables that affect the production possibility set (i.e., the feasible combinations of input-output quantities) that—in the case of a Translog functional form—should be interacted with the input quantities and the angles of the output vector.

sNames

an optional vector of character strings containing the names of ‘environmental’ variables, i.e., variables that affect the production possibility set (i.e., the feasible combinations of input-output quantities) that—in the case of a Translog functional form—should not be interacted with the input quantities and the angles of the output vector.

coef

numeric vector containing the coefficients.

data

data frame containing the data.

form

a character string that indicates the functional form; currently, "cd" for the Cobb-Douglas functional form and "tl" for the Translog functional form are available.

conDummy

an optional numeric vector indicating the positions in argument zNames that are dummy variables so that quadratic terms of these variables are omitted.

fixThetas

logical value that indicates whether undefined angles of the output should be ‘fixed’ if the last two or more output quantities are zero for some of the observations.

Value

A vector.

Author(s)

Arne Henningsen and Juan José Price

References

Price, J.J. & Henningsen, A. (forthcoming): A Ray-Based Input Distance Function to Model Zero-Valued Output Quantities: Derivation and an Empirical Application. Journal of Productivity Analysis.

Examples

# load and prepare data set 
data( appleProdFr86, package = "micEcon" )
appleProdFr86$qCap <- appleProdFr86$vCap / appleProdFr86$pCap
appleProdFr86$qLab <- appleProdFr86$vLab / appleProdFr86$pLab
appleProdFr86$qMat <- appleProdFr86$vMat / appleProdFr86$pMat

# Cobb-Douglas ray-based input distance function (with manually set parameters)
appleProdFr86$logDistCD <- distRayCalc( xNames = c( "qCap", "qLab", "qMat" ),
  yNames = c( "qApples", "qOtherOut" ), data = appleProdFr86,
  coef = c( "(Intercept)" = -11.116, alpha_1 = 0.082, alpha_2 = 0.615,
  beta_1 = -0.031, beta_2 = -0.388 ), form = "cd" )
summary( appleProdFr86$logDistCD )

# Translog ray-based input distance function (with estimated parameters)
estTL <- distRayEst( xNames = c( "qCap", "qLab", "qMat" ),
  yNames = c( "qApples", "qOtherOut" ),
  data = appleProdFr86 )
appleProdFr86$logDistTL <- distRayCalc( xNames = c( "qCap", "qLab", "qMat" ),
  yNames= c( "qApples", "qOtherOut" ), data = appleProdFr86,
  coef = coef( estTL ) )
summary( appleProdFr86$logDistTL )

[Package micEconDistRay version 0.1-2 Index]