translogRayDeriv {micEcon} | R Documentation |
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.
translogRayDeriv( yNames, xNames, data, coef, dataLogged = FALSE )
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? |
A data frame containing the partial derivatives of the function F(y,x) (see above) with respect to x and y.
Arne Henningsen and Geraldine Henningsen
translogRayEst
, translogDeriv
.
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 ) )