Learn R Programming

micEcon (version 0.6-0)

translogRayDeriv: Derivatives of a Translog Ray Function

Description

Calculate the partial derivatives of a translog ray function with respect to the independent and the dependent variables. Please note that translogRayDeriv does not return the partial derivatives of the distance ($||y||$) but of the function $F(y,x)= Q( \log x, theta ) - \log ||y|| = 0$, where $Q(.)$ denotes a quadratic function.

Usage

translogRayDeriv( yNames, xNames, data, coef,
   dataLogged = FALSE )

Arguments

yNames
a single character string or a vector of character strings containing the name(s) of the output quantity.
xNames
a vector of strings containing the names of the input quantities.
data
dataframe containing the data.
coef
vector containing all coefficients: if there are n independent variables in xNames, the n+2 alpha coefficients must have names a_0, ..., a_n, a_t, and th
dataLogged
logical. Are the values in data already logged?

Value

  • A data frame containing the partial derivatives of the function $F(y,x)$ (see above) with respect to $x$ and $y$.

See Also

translogRayEst, translogDeriv.

Examples

Run this code
data( germanFarms )
   # quantity of crop outputs:
   germanFarms$qCrop <- germanFarms$vCrop / germanFarms$pOutput
   # quantity of animal outputs:
   germanFarms$qAnimal <- germanFarms$vAnimal / germanFarms$pOutput
   # quantity of variable inputs
   germanFarms$qVarInput <- germanFarms$vVarInput / germanFarms$pVarInput

   # estimate a translog ray production function
   estResult <- translogRayEst( yNames = c( "qCrop", "qAnimal" ),
      xNames = c( "qLabor", "land", "qVarInput" ),
      data = germanFarms )

   # compute the partial derivatives
   deriv <- translogRayDeriv( yNames = c( "qCrop", "qAnimal" ),
      xNames = c( "qLabor", "land", "qVarInput" ),
      data = germanFarms, coef = coef( estResult ) )

Run the code above in your browser using DataLab