translogRayDeriv: Derivatives of a Translog Ray Function

Description Usage Arguments Value Author(s) See Also Examples

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

1
2
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 the (n+1)*(n+2)/2 beta coefficients must have names b_1_1, ..., b_1_n, b_1_t, b_2_2, ..., b_2_n, b_2_t, ..., b_n_n, b_n_t, b_t_t (only the elements of the upper right triangle of the beta matrix are directly obtained from coef; the elements of the lower left triangle are obtained by assuming symmetry of the beta matrix).

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.

Author(s)

Arne Henningsen and Geraldine Henningsen

See Also

translogRayEst, translogDeriv.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
   data( germanFarms, package = "micEcon" )
   # 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 ) )

micEconDist documentation built on May 2, 2019, 4:41 p.m.