translogDeriv: Derivatives of a translog function

Description Usage Arguments Value Author(s) See Also Examples

View source: R/translogDeriv.R

Description

Calculate the derivatives of a translog function.

Usage

1
2
translogDeriv( xNames, data, coef, coefCov = NULL,
   yName = NULL, dataLogged = FALSE )

Arguments

xNames

a vector of strings containing the names of the independent variables.

data

dataframe containing the data.

coef

vector containing all coefficients.

coefCov

optional covariance matrix of the coefficients.

yName

an optional string containing the name of the dependent variable. If it is NULL, the dependent variable is calculated from the independent variables and the coefficients.

dataLogged

logical. Are the values in data already logged?

Value

a list of class translogDeriv containing following objects:

deriv

data frame containing the derivatives.

variance

data frame containing the variances of the derivatives (not implemented yet).

stdDev

data frame containing the standard deviations of the derivatives (not implemented yet).

Author(s)

Arne Henningsen

See Also

translogEst, translogCalc and translogHessian

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
   data( germanFarms )
   # output quantity:
   germanFarms$qOutput <- germanFarms$vOutput / germanFarms$pOutput
   # quantity of variable inputs
   germanFarms$qVarInput <- germanFarms$vVarInput / germanFarms$pVarInput
   # a time trend to account for technical progress:
   germanFarms$time <- c(1:20)

   # estimate a translog production function
   estResult <- translogEst( "qOutput", c( "qLabor", "land", "qVarInput", "time" ),
      germanFarms )

   # compute the marginal products of the inputs (with "fitted" Output)
   margProducts <- translogDeriv( c( "qLabor", "land", "qVarInput", "time" ),
      germanFarms, coef( estResult ), vcov( estResult ) )
   margProducts$deriv

   # compute the marginal products of the inputs (with observed Output)
   margProductsObs <- translogDeriv( c( "qLabor", "land", "qVarInput", "time" ),
      germanFarms, coef( estResult ), vcov( estResult ), "qOutput" )
   margProductsObs$deriv

Example output

If you have questions, suggestions, or comments regarding one of the 'micEcon' packages, please use a forum or 'tracker' at micEcon's R-Forge site:
https://r-forge.r-project.org/projects/micecon/
        qLabor      land  qVarInput      time
1   6137.01012 163.84424 -7.0437159 208.28371
2   4381.94904 123.58899 -4.3915969 110.90773
3   4012.40673 107.02978 -2.8183425  47.71083
4   2675.93516 105.71777 -2.3880325  45.81646
5   2202.67474  98.88737 -1.2879319  18.53370
6   1859.76689  82.11185 -0.4312382  16.62160
7   1804.01073  60.26294  0.2283467  23.31485
8   1340.31183  81.26647  0.8116562 -17.58298
9    727.94966  68.14356  1.7748328 -14.91299
10   291.56187  86.04333  1.5521664 -33.34425
11   -44.49238  74.82655  1.5188881 -21.32448
12 -1280.40242 126.38542 -1.3315384 -47.81918
13 -1527.38834 114.99121 -1.6257321 -38.28692
14 -1105.00422 103.10888 -1.2105681 -39.12230
15  -741.70138 102.00035  0.2458966 -53.68207
16  -189.44046  82.85026  1.2623097 -51.03273
17   453.37590  87.66300  1.4376562 -66.31119
18   920.19258  84.04253  1.4892366 -70.92061
19  1400.46605  76.03035  0.9669266 -69.91835
20  1662.32190  64.62612  0.3283968 -63.22596
        qLabor      land  qVarInput      time
1   6151.09408 164.22025 -7.0598807 208.76170
2   4322.43842 121.91054 -4.3319553 109.40151
3   4046.22938 107.93199 -2.8420998  48.11301
4   2737.48013 108.14922 -2.4429559  46.87021
5   2184.06311  98.05181 -1.2770494  18.37710
6   1828.21997  80.71900 -0.4239232  16.33965
7   1808.10324  60.39965  0.2288647  23.36774
8   1335.99579  81.00478  0.8090425 -17.52636
9    734.47034  68.75397  1.7907310 -15.04658
10   290.96199  85.86630  1.5489729 -33.27565
11   -44.43781  74.73478  1.5170253 -21.29832
12 -1278.81710 126.22893 -1.3298898 -47.75997
13 -1526.79177 114.94629 -1.6250971 -38.27196
14 -1102.59104 102.88371 -1.2079244 -39.03686
15  -747.14051 102.74835  0.2476998 -54.07574
16  -190.30127  83.22673  1.2680456 -51.26462
17   447.07430  86.44454  1.4176738 -65.38951
18   927.47329  84.70749  1.5010197 -71.48174
19  1400.09763  76.01035  0.9666722 -69.89995
20  1661.53281  64.59544  0.3282410 -63.19595

micEcon documentation built on Jan. 7, 2021, 3:01 p.m.