CRAN Package Check Results for Package micEcon

Last updated on 2024-06-13 04:52:31 CEST.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 0.6-18 8.29 86.87 95.16 OK
r-devel-linux-x86_64-debian-gcc 0.6-18 4.70 63.08 67.78 ERROR
r-devel-linux-x86_64-fedora-clang 0.6-18 117.61 NOTE
r-devel-linux-x86_64-fedora-gcc 0.6-18 113.01 OK
r-devel-windows-x86_64 0.6-18 7.00 84.00 91.00 OK
r-patched-linux-x86_64 0.6-18 11.40 81.92 93.32 OK
r-release-linux-x86_64 0.6-18 7.97 79.99 87.96 OK
r-release-macos-arm64 0.6-18 36.00 OK
r-release-macos-x86_64 0.6-18 55.00 OK
r-release-windows-x86_64 0.6-18 8.00 86.00 94.00 OK
r-oldrel-macos-arm64 0.6-18 36.00 OK
r-oldrel-macos-x86_64 0.6-18 60.00 OK
r-oldrel-windows-x86_64 0.6-18 9.00 100.00 109.00 OK

Check Details

Version: 0.6-18
Check: package dependencies
Result: NOTE Packages suggested but not available for checking: 'Ecdat', 'systemfit' Flavor: r-devel-linux-x86_64-debian-gcc

Version: 0.6-18
Check: tests
Result: ERROR Running ‘cobbDouglasTest.R’ [5s/7s] Comparing ‘cobbDouglasTest.Rout’ to ‘cobbDouglasTest.Rout.save’ ... OK Running ‘logDataSetTest.R’ [1s/2s] Comparing ‘logDataSetTest.Rout’ to ‘logDataSetTest.Rout.save’ ... OK Running ‘quadFunc.R’ [2s/3s] Running ‘translog.R’ [2s/2s] Running ‘translogCost.R’ [1s/2s] Comparing ‘translogCost.Rout’ to ‘translogCost.Rout.save’ ... OK Running ‘utilityTest.R’ [1s/2s] Comparing ‘utilityTest.Rout’ to ‘utilityTest.Rout.save’ ... OK Running the tests in ‘tests/quadFunc.R’ failed. Complete output: > library( micEcon ) 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/ > library( plm ) > options( digits = 3 ) > printQuadFuncEst <- function( x ) { + for( n in names( x ) ) { + cat( "$", n, "\n", sep ="" ) + if( n == "model.matrix" && is.numeric( x[[ n ]] ) ) { + for( i in 1:ncol( x[[ n ]] ) ) { + size <- floor( log( x[[ n ]][ , i ], base = 10 ) ) + 1 + size[ size < -5 ] <- -5 + fac <- 10^( size - 5 ) + x[[ n ]][ , i ] <- fac * round( x[[ n ]][ , i ] / fac ) + } + } + print( x[[ n ]] ) + cat( "\n" ) + } + cat( "attr(,\"class\")\n" ) + print( class( x ) ) + } > > ## preparing data > 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) > # mean values of all variables > germanFarmsMeans <- colMeans( germanFarms[ , -1 ] ) > > ## estimate a quadratic production function > estResult <- quadFuncEst( "qOutput", + c( "qLabor", "land", "qVarInput", "time" ), germanFarms ) > coef( estResult ) a_0 a_1 a_2 a_3 a_4 b_1_1 b_1_2 b_1_3 -1.89e+04 1.64e+04 2.89e+01 1.92e+01 -1.50e+02 -1.14e+04 2.45e+02 -5.29e+00 b_1_4 b_2_2 b_2_3 b_2_4 b_3_3 b_3_4 b_4_4 -1.45e+02 -4.79e+00 -3.67e-01 5.18e+00 -7.90e-03 5.06e-01 -1.30e+01 > print( estResult ) $call quadFuncEst(yName = "qOutput", xNames = c("qLabor", "land", "qVarInput", "time"), data = germanFarms) $nExog [1] 4 $nShifter [1] 0 $est Call: lm(formula = as.formula(estFormula), data = estData) Coefficients: (Intercept) a_1 a_2 a_3 a_4 b_1_1 -1.89e+04 1.64e+04 2.89e+01 1.92e+01 -1.50e+02 -1.14e+04 b_1_2 b_1_3 b_1_4 b_2_2 b_2_3 b_2_4 2.45e+02 -5.29e+00 -1.45e+02 -4.79e+00 -3.67e-01 5.18e+00 b_3_3 b_3_4 b_4_4 -7.90e-03 5.06e-01 -1.30e+01 $residuals 1 2 3 4 5 6 7 8 9 10 7.432 -39.365 21.652 32.467 -0.816 -21.651 -0.640 -4.241 12.971 -7.827 11 12 13 14 15 16 17 18 19 20 -2.867 2.988 -6.250 0.863 7.942 7.057 -20.630 13.722 -3.067 0.260 $fitted 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 939 1002 1048 1139 1179 1207 1240 1293 1195 1286 1363 1538 1581 1695 1637 1619 17 18 19 20 1676 1742 1890 1992 $coef a_0 a_1 a_2 a_3 a_4 b_1_1 b_1_2 b_1_3 -1.89e+04 1.64e+04 2.89e+01 1.92e+01 -1.50e+02 -1.14e+04 2.45e+02 -5.29e+00 b_1_4 b_2_2 b_2_3 b_2_4 b_3_3 b_3_4 b_4_4 -1.45e+02 -4.79e+00 -3.67e-01 5.18e+00 -7.90e-03 5.06e-01 -1.30e+01 $coefCov a_0 a_1 a_2 a_3 a_4 b_1_1 b_1_2 a_0 1.94e+08 -2.20e+08 -6.68e+06 1.05e+05 6.70e+06 1.13e+08 4.31e+06 a_1 -2.20e+08 2.81e+08 6.63e+06 -1.51e+05 -7.66e+06 -1.69e+08 -4.62e+06 a_2 -6.68e+06 6.63e+06 5.13e+05 -1.06e+04 -3.64e+05 -2.55e+06 -3.15e+05 a_3 1.05e+05 -1.51e+05 -1.06e+04 3.56e+02 6.68e+03 9.83e+04 6.98e+03 a_4 6.70e+06 -7.66e+06 -3.64e+05 6.68e+03 3.83e+05 3.87e+06 2.36e+05 b_1_1 1.13e+08 -1.69e+08 -2.55e+06 9.83e+04 3.87e+06 1.54e+08 1.38e+06 b_1_2 4.31e+06 -4.62e+06 -3.15e+05 6.98e+03 2.36e+05 1.38e+06 2.19e+05 b_1_3 -5.15e+04 8.65e+04 5.88e+03 -2.18e+02 -3.90e+03 -1.23e+05 -3.00e+03 b_1_4 -4.18e+06 5.22e+06 1.98e+05 -4.24e+03 -2.25e+05 -2.28e+06 -1.55e+05 b_2_2 -3.05e+04 5.44e+04 -4.26e+03 1.12e+02 1.34e+03 -2.62e+04 1.32e+03 b_2_3 2.27e+03 -2.43e+03 1.66e+01 -2.32e+00 4.27e+01 2.20e+03 -2.74e+01 b_2_4 -4.87e+04 4.09e+04 6.71e+03 -1.44e+02 -4.86e+03 -2.31e+04 -3.26e+03 b_3_3 -1.41e+02 1.45e+02 3.27e+00 3.76e-03 -3.92e+00 4.58e+01 -3.77e+00 b_3_4 3.10e+02 -8.51e+02 -9.78e+01 4.01e+00 5.87e+01 -3.90e+02 8.93e+01 b_4_4 8.31e+04 -8.74e+04 -5.40e+03 9.41e+01 5.21e+03 5.26e+04 2.81e+03 b_1_3 b_1_4 b_2_2 b_2_3 b_2_4 b_3_3 b_3_4 a_0 -5.15e+04 -4.18e+06 -3.05e+04 2.27e+03 -4.87e+04 -1.41e+02 310.0540 a_1 8.65e+04 5.22e+06 5.44e+04 -2.43e+03 4.09e+04 1.45e+02 -851.3935 a_2 5.88e+03 1.98e+05 -4.26e+03 1.66e+01 6.71e+03 3.27e+00 -97.8391 a_3 -2.18e+02 -4.24e+03 1.12e+02 -2.32e+00 -1.44e+02 3.76e-03 4.0064 a_4 -3.90e+03 -2.25e+05 1.34e+03 4.27e+01 -4.86e+03 -3.92e+00 58.7104 b_1_1 -1.23e+05 -2.28e+06 -2.62e+04 2.20e+03 -2.31e+04 4.58e+01 -390.2702 b_1_2 -3.00e+03 -1.55e+05 1.32e+03 -2.74e+01 -3.26e+03 -3.77e+00 89.3295 b_1_3 2.47e+02 1.53e+03 -8.48e+01 -8.32e-02 1.01e+02 -2.22e-01 -0.6176 b_1_4 1.53e+03 1.63e+05 9.87e+02 -1.76e+01 1.55e+03 4.53e+00 -60.5660 b_2_2 -8.48e+01 9.87e+02 2.33e+02 -3.65e+00 -1.69e+02 1.56e-01 1.4021 b_2_3 -8.32e-02 -1.76e+01 -3.65e+00 1.66e-01 1.60e+00 -2.07e-03 -0.0899 b_2_4 1.01e+02 1.55e+03 -1.69e+02 1.60e+00 1.67e+02 -5.80e-02 -1.3807 b_3_3 -2.22e-01 4.53e+00 1.56e-01 -2.07e-03 -5.80e-02 6.19e-04 -0.0022 b_3_4 -6.18e-01 -6.06e+01 1.40e+00 -8.99e-02 -1.38e+00 -2.20e-03 0.0971 b_4_4 -7.19e+01 -2.31e+03 8.05e+01 1.74e-01 -1.10e+02 8.29e-03 0.4406 b_4_4 a_0 8.31e+04 a_1 -8.74e+04 a_2 -5.40e+03 a_3 9.41e+01 a_4 5.21e+03 b_1_1 5.26e+04 b_1_2 2.81e+03 b_1_3 -7.19e+01 b_1_4 -2.31e+03 b_2_2 8.05e+01 b_2_3 1.74e-01 b_2_4 -1.10e+02 b_3_3 8.29e-03 b_3_4 4.41e-01 b_4_4 1.01e+02 $r2 [1] 0.997 $r2bar [1] 0.99 $nObs [1] 20 $yName [1] "qOutput" $xNames [1] "qLabor" "land" "qVarInput" "time" $regScale [1] 1 $model.matrix (Intercept) a_1 a_2 a_3 a_4 b_1_1 b_1_2 b_1_3 b_1_4 b_2_2 b_2_3 b_2_4 1 1 1.44 23.4 557 1 1.04 33.7 801 1.44 274 13023 23.4 2 1 1.45 24.2 607 2 1.05 35.1 880 2.90 293 14681 48.4 3 1 1.44 24.7 608 3 1.04 35.6 875 4.32 305 15009 74.1 4 1 1.48 24.9 654 4 1.10 36.9 968 5.92 310 16290 99.6 5 1 1.48 24.9 648 5 1.10 36.9 958 7.40 310 16132 124.5 6 1 1.47 25.2 657 6 1.08 37.1 966 8.82 318 16576 151.4 7 1 1.45 25.9 673 7 1.05 37.6 977 10.15 336 17449 181.4 8 1 1.49 26.0 648 8 1.11 38.7 965 11.92 337 16826 207.8 9 1 1.48 25.2 640 9 1.10 37.3 947 13.32 317 16115 226.6 10 1 1.53 26.1 648 10 1.17 39.9 992 15.30 340 16906 260.7 11 1 1.53 26.8 682 11 1.17 41.0 1044 16.83 358 18267 294.5 12 1 1.69 29.9 761 12 1.43 50.5 1286 20.28 446 22730 358.4 13 1 1.70 31.1 801 13 1.44 52.9 1362 22.10 484 24927 404.4 14 1 1.67 32.2 798 14 1.39 53.8 1332 23.38 518 25681 450.7 15 1 1.65 31.5 737 15 1.36 52.0 1216 24.75 497 23230 472.8 16 1 1.61 31.9 719 16 1.30 51.3 1157 25.76 508 22914 510.1 17 1 1.62 33.5 701 17 1.31 54.3 1135 27.54 562 23501 570.2 18 1 1.62 35.1 702 18 1.31 56.8 1137 29.16 615 24605 631.1 19 1 1.62 37.3 731 19 1.31 60.4 1185 30.78 696 27283 708.9 20 1 1.62 39.4 770 20 1.31 63.8 1248 32.40 776 30337 787.8 b_3_3 b_3_4 b_4_4 1 154872 557 0.5 2 184006 1213 2.0 3 184781 1824 4.5 4 213832 2616 8.0 5 209710 3238 12.5 6 215817 3942 18.0 7 226774 4714 24.5 8 209890 5183 32.0 9 204785 5760 40.5 10 210262 6485 50.0 11 232820 7506 60.5 12 289533 9132 72.0 13 321010 10416 84.5 14 318247 11169 98.0 15 271572 11055 112.5 16 258318 11500 128.0 17 245488 11912 144.5 18 246256 12632 162.0 19 267367 13894 180.5 20 296583 15403 200.0 attr(,"assign") [1] 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 attr(,"class") [1] "quadFuncEst" > > ## compute fitted values > fitted <- quadFuncCalc( c( "qLabor", "land", "qVarInput", "time" ), + germanFarms, coef( estResult ) ) > all.equal( fitted, estResult$fitted ) [1] TRUE > all.equal( fitted, predict( estResult ) ) [1] TRUE > all.equal( fitted, predict( estResult, newdata = germanFarms ) ) [1] TRUE > > # only at mean values > fittedMean <- quadFuncCalc( + xNames = c( "qLabor", "land", "qVarInput", "time" ), + data = germanFarmsMeans, coef = coef( estResult ) ) > print( fittedMean ) 1 1556 > all.equal( fittedMean, + predict( estResult, newdata = germanFarmsMeans ) ) [1] TRUE > > ## compute the marginal products of the inputs > margProducts <- quadFuncDeriv( + c( "qLabor", "land", "qVarInput", "time" ), + germanFarms, coef( estResult ), vcov( estResult ) ) > print( margProducts ) qLabor land qVarInput time 1 2547 70.4 -0.877 31.42 2 2219 55.8 -1.113 46.48 3 2302 55.7 -0.744 38.12 4 1509 52.7 -0.894 43.80 5 1398 60.2 -0.338 27.60 6 1397 58.0 0.030 22.46 7 1561 49.0 0.262 24.22 8 1108 73.1 0.737 -7.18 9 927 82.5 1.648 -26.83 10 383 92.5 1.496 -38.13 11 230 81.9 1.477 -30.33 12 -1403 82.6 -0.622 -10.60 13 -1571 69.5 -0.942 1.79 14 -1089 63.4 -0.647 -3.02 15 -847 89.2 0.692 -47.38 16 -349 89.6 1.421 -61.94 17 -106 95.9 1.408 -76.92 18 116 93.4 1.347 -81.48 19 366 77.0 0.795 -67.89 20 525 57.9 0.230 -50.40 > print( attributes( margProducts )$variance ) qLabor land qVarInput time 1 3.03e+08 544271 364 401579 2 2.97e+08 542045 363 399238 3 2.92e+08 533248 358 393740 4 2.89e+08 538663 363 395792 5 2.84e+08 531000 359 390564 6 2.78e+08 521654 354 383957 7 2.71e+08 511097 348 376823 8 2.75e+08 517159 351 382143 9 2.66e+08 504238 344 371779 10 2.72e+08 516764 353 381507 11 2.67e+08 512576 350 377697 12 2.97e+08 573963 391 422271 13 2.96e+08 575409 393 423171 14 2.90e+08 561121 383 415690 15 2.84e+08 543736 371 405186 16 2.76e+08 524678 359 393181 17 2.83e+08 528807 362 400594 18 2.86e+08 528980 362 403758 19 2.90e+08 532351 364 409489 20 2.93e+08 534965 365 414060 > print( attributes( margProducts )$stdDev ) qLabor land qVarInput time 1 17415 738 19.1 634 2 17244 736 19.1 632 3 17085 730 18.9 627 4 17014 734 19.1 629 5 16859 729 18.9 625 6 16667 722 18.8 620 7 16470 715 18.6 614 8 16579 719 18.7 618 9 16305 710 18.6 610 10 16498 719 18.8 618 11 16354 716 18.7 615 12 17227 758 19.8 650 13 17190 759 19.8 651 14 17040 749 19.6 645 15 16851 737 19.3 637 16 16610 724 18.9 627 17 16815 727 19.0 633 18 16901 727 19.0 635 19 17023 730 19.1 640 20 17109 731 19.1 643 > # only at mean values > margProductsMean <- quadFuncDeriv( + xNames = c( "qLabor", "land", "qVarInput", "time" ), + data = germanFarmsMeans, coef = coef( estResult ), + coefCov = vcov( estResult ) ) > print( margProductsMean ) qLabor land qVarInput time 1 561 72.5 0.268 -13.3 > print( attributes( margProductsMean )$variance ) qLabor land qVarInput time 1 2.83e+08 532305 361 395950 > print( attributes( margProductsMean )$stdDev ) qLabor land qVarInput time 1 16814 730 19 629 > > ## estimate a quadratic production function with a shifter > estResultShifter <- quadFuncEst( yName = "qOutput", + xNames = c( "qLabor", "land", "qVarInput" ), + shifterNames = "time", data = germanFarms ) > coef( estResultShifter ) a_0 a_1 a_2 a_3 b_1_1 b_1_2 b_1_3 b_2_2 -1.15e+04 1.03e+04 1.41e+02 5.35e+00 -2.03e+03 -7.46e+01 -7.16e+00 -3.06e-01 b_2_3 b_3_3 d_1 3.27e-02 8.63e-03 9.66e+00 > print( estResultShifter ) $call quadFuncEst(yName = "qOutput", xNames = c("qLabor", "land", "qVarInput"), data = germanFarms, shifterNames = "time") $nExog [1] 3 $nShifter [1] 1 $est Call: lm(formula = as.formula(estFormula), data = estData) Coefficients: (Intercept) a_1 a_2 a_3 b_1_1 b_1_2 -1.15e+04 1.03e+04 1.41e+02 5.35e+00 -2.03e+03 -7.46e+01 b_1_3 b_2_2 b_2_3 b_3_3 d_1 -7.16e+00 -3.06e-01 3.27e-02 8.63e-03 9.66e+00 $residuals 1 2 3 4 5 6 7 8 9 10 11 17.93 -65.87 19.35 10.28 14.47 -5.97 -4.82 41.68 2.13 -18.24 -8.45 12 13 14 15 16 17 18 19 20 14.30 -28.06 16.30 27.35 -18.70 -32.87 7.02 22.26 -10.10 $fitted 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 928 1029 1050 1162 1164 1192 1244 1247 1206 1297 1369 1526 1603 1680 1617 1645 17 18 19 20 1688 1749 1865 2002 $coef a_0 a_1 a_2 a_3 b_1_1 b_1_2 b_1_3 b_2_2 -1.15e+04 1.03e+04 1.41e+02 5.35e+00 -2.03e+03 -7.46e+01 -7.16e+00 -3.06e-01 b_2_3 b_3_3 d_1 3.27e-02 8.63e-03 9.66e+00 $coefCov a_0 a_1 a_2 a_3 b_1_1 b_1_2 b_1_3 a_0 8.58e+07 -9.12e+07 -1.90e+06 3.56e+04 4.25e+07 9.52e+05 -1.89e+03 a_1 -9.12e+07 1.31e+08 9.73e+05 -7.13e+04 -1.04e+08 -2.64e+05 5.58e+04 a_2 -1.90e+06 9.73e+05 1.57e+05 -2.98e+03 2.53e+05 -9.17e+04 1.60e+03 a_3 3.56e+04 -7.13e+04 -2.98e+03 1.73e+02 1.01e+05 1.52e+03 -1.80e+02 b_1_1 4.25e+07 -1.04e+08 2.53e+05 1.01e+05 1.36e+08 -4.72e+05 -1.34e+05 b_1_2 9.52e+05 -2.64e+05 -9.17e+04 1.52e+03 -4.72e+05 5.71e+04 -8.00e+02 b_1_3 -1.89e+03 5.58e+04 1.60e+03 -1.80e+02 -1.34e+05 -8.00e+02 2.49e+02 b_2_2 -1.76e+03 2.62e+03 1.37e+02 -6.47e+00 -7.26e+02 -6.47e+01 8.92e-01 b_2_3 5.18e+02 -8.23e+02 -1.61e+01 9.90e-01 7.12e+02 1.29e+00 -4.41e-01 b_3_3 -6.97e+01 1.40e+01 1.32e+00 1.13e-01 1.24e+02 -4.00e-01 -2.82e-01 d_1 7.51e+04 -5.93e+04 -2.33e+03 1.30e+01 1.03e+04 1.26e+03 1.15e+01 b_2_2 b_2_3 b_3_3 d_1 a_0 -1.76e+03 5.18e+02 -6.97e+01 7.51e+04 a_1 2.62e+03 -8.23e+02 1.40e+01 -5.93e+04 a_2 1.37e+02 -1.61e+01 1.32e+00 -2.33e+03 a_3 -6.47e+00 9.90e-01 1.13e-01 1.30e+01 b_1_1 -7.26e+02 7.12e+02 1.24e+02 1.03e+04 b_1_2 -6.47e+01 1.29e+00 -4.00e-01 1.26e+03 b_1_3 8.92e-01 -4.41e-01 -2.82e-01 1.15e+01 b_2_2 1.15e+01 -5.69e-01 3.13e-02 5.30e+00 b_2_3 -5.69e-01 4.46e-02 -2.33e-03 6.41e-02 b_3_3 3.13e-02 -2.33e-03 5.72e-04 -4.71e-02 d_1 5.30e+00 6.41e-02 -4.71e-02 1.10e+02 $r2 [1] 0.993 $r2bar [1] 0.986 $nObs [1] 20 $yName [1] "qOutput" $xNames [1] "qLabor" "land" "qVarInput" $shifterNames [1] "time" $regScale [1] 1 $model.matrix (Intercept) a_1 a_2 a_3 b_1_1 b_1_2 b_1_3 b_2_2 b_2_3 b_3_3 d_1 1 1 1.44 23.4 557 1.04 33.7 801 274 13023 154872 1 2 1 1.45 24.2 607 1.05 35.1 880 293 14681 184006 2 3 1 1.44 24.7 608 1.04 35.6 875 305 15009 184781 3 4 1 1.48 24.9 654 1.10 36.9 968 310 16290 213832 4 5 1 1.48 24.9 648 1.10 36.9 958 310 16132 209710 5 6 1 1.47 25.2 657 1.08 37.1 966 318 16576 215817 6 7 1 1.45 25.9 673 1.05 37.6 977 336 17449 226774 7 8 1 1.49 26.0 648 1.11 38.7 965 337 16826 209890 8 9 1 1.48 25.2 640 1.10 37.3 947 317 16115 204785 9 10 1 1.53 26.1 648 1.17 39.9 992 340 16906 210262 10 11 1 1.53 26.8 682 1.17 41.0 1044 358 18267 232820 11 12 1 1.69 29.9 761 1.43 50.5 1286 446 22730 289533 12 13 1 1.70 31.1 801 1.44 52.9 1362 484 24927 321010 13 14 1 1.67 32.2 798 1.39 53.8 1332 518 25681 318247 14 15 1 1.65 31.5 737 1.36 52.0 1216 497 23230 271572 15 16 1 1.61 31.9 719 1.30 51.3 1157 508 22914 258318 16 17 1 1.62 33.5 701 1.31 54.3 1135 562 23501 245488 17 18 1 1.62 35.1 702 1.31 56.8 1137 615 24605 246256 18 19 1 1.62 37.3 731 1.31 60.4 1185 696 27283 267367 19 20 1 1.62 39.4 770 1.31 63.8 1248 776 30337 296583 20 attr(,"assign") [1] 0 1 2 3 4 5 6 7 8 9 10 attr(,"class") [1] "quadFuncEst" > # compute fitted values > fitted <- quadFuncCalc( c( "qLabor", "land", "qVarInput" ), + shifterNames = "time", data = germanFarms, coef( estResultShifter ) ) > all.equal( fitted, estResultShifter$fitted ) [1] TRUE > all.equal( fitted, predict( estResultShifter ) ) [1] TRUE > all.equal( fitted, predict( estResultShifter, newdata = germanFarms ) ) [1] TRUE > # compute marginal products = partial derivatives > margProdShifter <- quadFuncDeriv( + c( "qLabor", "land", "qVarInput" ), + germanFarms, coef( estResultShifter ), vcov( estResultShifter ) ) > print( margProdShifter ) qLabor land qVarInput 1 1636 44.9 0.613 2 1197 45.6 1.000 3 1172 46.2 1.098 4 745 44.6 1.217 5 790 44.4 1.162 6 719 45.4 1.325 7 591 47.2 1.633 8 689 43.4 1.128 9 825 44.1 1.105 10 596 40.4 0.849 11 301 41.3 1.165 12 -818 31.0 0.800 13 -1220 31.2 1.117 14 -1214 33.0 1.337 15 -688 32.7 0.933 16 -504 34.9 1.074 17 -518 33.1 0.901 18 -639 32.7 0.960 19 -1018 32.9 1.288 20 -1452 33.6 1.692 > print( attributes( margProdShifter )$variance ) qLabor land qVarInput 1 1.28e+08 140313 175 2 1.25e+08 141525 169 3 1.24e+08 140739 167 4 1.25e+08 144357 168 5 1.26e+08 144246 169 6 1.24e+08 143588 166 7 1.22e+08 142268 161 8 1.27e+08 144793 169 9 1.26e+08 144061 169 10 1.31e+08 147940 176 11 1.29e+08 148376 172 12 1.43e+08 163662 190 13 1.42e+08 165266 187 14 1.40e+08 161944 180 15 1.41e+08 158933 183 16 1.38e+08 154877 177 17 1.42e+08 155312 180 18 1.43e+08 155201 179 19 1.43e+08 155398 173 20 1.44e+08 155753 167 > print( attributes( margProdShifter )$stdDev ) qLabor land qVarInput 1 11306 375 13.2 2 11181 376 13.0 3 11135 375 12.9 4 11189 380 13.0 5 11205 380 13.0 6 11140 379 12.9 7 11032 377 12.7 8 11259 381 13.0 9 11228 380 13.0 10 11448 385 13.3 11 11357 385 13.1 12 11960 405 13.8 13 11929 407 13.7 14 11820 402 13.4 15 11861 399 13.5 16 11732 394 13.3 17 11896 394 13.4 18 11955 394 13.4 19 11968 394 13.2 20 11980 395 12.9 > > ## estimate a quadratic production function with 2 shifters > germanFarms$timeSq <- germanFarms$time^2 > estResultShifter2 <- quadFuncEst( yName = "qOutput", + xNames = c( "qLabor", "land", "qVarInput" ), + shifterNames = c( "time", "timeSq" ), data = germanFarms ) > coef( estResultShifter2 ) a_0 a_1 a_2 a_3 b_1_1 b_1_2 b_1_3 b_2_2 -1.33e+04 1.42e+04 -1.28e+01 6.89e+00 -4.78e+03 3.04e+01 -1.05e+01 -1.97e+00 b_2_3 b_3_3 d_1 d_2 1.45e-01 7.72e-03 3.97e+01 -2.58e+00 > print( estResultShifter2 ) $call quadFuncEst(yName = "qOutput", xNames = c("qLabor", "land", "qVarInput"), data = germanFarms, shifterNames = c("time", "timeSq")) $nExog [1] 3 $nShifter [1] 2 $est Call: lm(formula = as.formula(estFormula), data = estData) Coefficients: (Intercept) a_1 a_2 a_3 b_1_1 b_1_2 -1.33e+04 1.42e+04 -1.28e+01 6.89e+00 -4.78e+03 3.04e+01 b_1_3 b_2_2 b_2_3 b_3_3 d_1 d_2 -1.05e+01 -1.97e+00 1.45e-01 7.72e-03 3.97e+01 -2.58e+00 $residuals 1 2 3 4 5 6 7 8 9 10 11 23.04 -50.56 11.51 19.01 8.98 -9.62 -1.67 9.91 3.60 -32.99 15.03 12 13 14 15 16 17 18 19 20 9.97 -15.83 -2.24 25.01 7.80 -37.88 6.40 19.28 -8.76 $fitted 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 923 1013 1058 1153 1169 1195 1241 1279 1204 1311 1346 1531 1591 1698 1620 1618 17 18 19 20 1693 1749 1868 2001 $coef a_0 a_1 a_2 a_3 b_1_1 b_1_2 b_1_3 b_2_2 -1.33e+04 1.42e+04 -1.28e+01 6.89e+00 -4.78e+03 3.04e+01 -1.05e+01 -1.97e+00 b_2_3 b_3_3 d_1 d_2 1.45e-01 7.72e-03 3.97e+01 -2.58e+00 $coefCov a_0 a_1 a_2 a_3 b_1_1 b_1_2 b_1_3 a_0 6.85e+07 -7.39e+07 -1.41e+06 2.72e+04 3.49e+07 6.95e+05 2.24e+02 a_1 -7.39e+07 1.08e+08 5.92e+05 -5.44e+04 -8.54e+07 -8.91e+04 4.02e+04 a_2 -1.41e+06 5.92e+05 1.30e+05 -2.42e+03 3.23e+05 -7.70e+04 1.41e+03 a_3 2.72e+04 -5.44e+04 -2.42e+03 1.37e+02 7.83e+04 1.24e+03 -1.43e+02 b_1_1 3.49e+07 -8.54e+07 3.23e+05 7.83e+04 1.09e+08 -4.56e+05 -1.03e+05 b_1_2 6.95e+05 -8.91e+04 -7.70e+04 1.24e+03 -4.56e+05 4.82e+04 -7.32e+02 b_1_3 2.24e+02 4.02e+04 1.41e+03 -1.43e+02 -1.03e+05 -7.32e+02 1.99e+02 b_2_2 -5.24e+02 1.76e+02 1.83e+02 -5.84e+00 7.65e+02 -1.02e+02 2.31e+00 b_2_3 3.50e+02 -5.22e+02 -1.77e+01 8.30e-01 4.71e+02 4.45e+00 -4.55e-01 b_3_3 -5.44e+01 9.99e+00 1.08e+00 8.87e-02 9.86e+01 -3.43e-01 -2.21e-01 d_1 4.36e+04 -1.27e+04 -3.18e+03 2.38e+01 -1.59e+04 1.91e+03 -1.99e+01 d_2 1.33e+03 -2.92e+03 1.16e+02 -1.16e+00 2.06e+03 -7.90e+01 2.49e+00 b_2_2 b_2_3 b_3_3 d_1 d_2 a_0 -524.2018 3.50e+02 -5.44e+01 4.36e+04 1.33e+03 a_1 175.9629 -5.22e+02 9.99e+00 -1.27e+04 -2.92e+03 a_2 183.2068 -1.77e+01 1.08e+00 -3.18e+03 1.16e+02 a_3 -5.8447 8.30e-01 8.87e-02 2.38e+01 -1.16e+00 b_1_1 764.5635 4.71e+02 9.86e+01 -1.59e+04 2.06e+03 b_1_2 -102.0921 4.45e+00 -3.43e-01 1.91e+03 -7.90e+01 b_1_3 2.3134 -4.55e-01 -2.21e-01 -1.99e+01 2.49e+00 b_2_2 9.8807 -5.03e-01 2.51e-02 -1.04e+01 1.25e+00 b_2_3 -0.5029 3.88e-02 -1.87e-03 1.03e+00 -8.41e-02 b_3_3 0.0251 -1.87e-03 4.51e-04 -4.52e-02 6.91e-04 d_1 -10.4405 1.03e+00 -4.52e-02 3.50e+02 -2.26e+01 d_2 1.2548 -8.41e-02 6.91e-04 -2.26e+01 1.94e+00 $r2 [1] 0.995 $r2bar [1] 0.989 $nObs [1] 20 $yName [1] "qOutput" $xNames [1] "qLabor" "land" "qVarInput" $shifterNames [1] "time" "timeSq" $regScale [1] 1 $model.matrix (Intercept) a_1 a_2 a_3 b_1_1 b_1_2 b_1_3 b_2_2 b_2_3 b_3_3 d_1 d_2 1 1 1.44 23.4 557 1.04 33.7 801 274 13023 154872 1 1 2 1 1.45 24.2 607 1.05 35.1 880 293 14681 184006 2 4 3 1 1.44 24.7 608 1.04 35.6 875 305 15009 184781 3 9 4 1 1.48 24.9 654 1.10 36.9 968 310 16290 213832 4 16 5 1 1.48 24.9 648 1.10 36.9 958 310 16132 209710 5 25 6 1 1.47 25.2 657 1.08 37.1 966 318 16576 215817 6 36 7 1 1.45 25.9 673 1.05 37.6 977 336 17449 226774 7 49 8 1 1.49 26.0 648 1.11 38.7 965 337 16826 209890 8 64 9 1 1.48 25.2 640 1.10 37.3 947 317 16115 204785 9 81 10 1 1.53 26.1 648 1.17 39.9 992 340 16906 210262 10 100 11 1 1.53 26.8 682 1.17 41.0 1044 358 18267 232820 11 121 12 1 1.69 29.9 761 1.43 50.5 1286 446 22730 289533 12 144 13 1 1.70 31.1 801 1.44 52.9 1362 484 24927 321010 13 169 14 1 1.67 32.2 798 1.39 53.8 1332 518 25681 318247 14 196 15 1 1.65 31.5 737 1.36 52.0 1216 497 23230 271572 15 225 16 1 1.61 31.9 719 1.30 51.3 1157 508 22914 258318 16 256 17 1 1.62 33.5 701 1.31 54.3 1135 562 23501 245488 17 289 18 1 1.62 35.1 702 1.31 56.8 1137 615 24605 246256 18 324 19 1 1.62 37.3 731 1.31 60.4 1185 696 27283 267367 19 361 20 1 1.62 39.4 770 1.31 63.8 1248 776 30337 296583 20 400 attr(,"assign") [1] 0 1 2 3 4 5 6 7 8 9 10 11 attr(,"class") [1] "quadFuncEst" > # compute fitted values > fitted <- quadFuncCalc( c( "qLabor", "land", "qVarInput" ), + shifterNames = c( "time", "timeSq" ), data = germanFarms, + coef( estResultShifter2 ) ) > all.equal( fitted, estResultShifter2$fitted ) [1] TRUE > all.equal( fitted, predict( estResultShifter2 ) ) [1] TRUE > all.equal( fitted, predict( estResultShifter2, newdata = germanFarms ) ) [1] TRUE > > ## estimate a linear functions with quadFuncEst > estResultLinear <- quadFuncEst( yName = "qOutput", xNames = NULL, + shifterNames = c( "time", "qLabor", "land", "qVarInput" ), + data = germanFarms ) > coef( estResultLinear ) a_0 d_1 d_2 d_3 d_4 -97.67 21.03 -185.95 29.34 1.06 > print( estResultLinear ) $call quadFuncEst(yName = "qOutput", xNames = NULL, data = germanFarms, shifterNames = c("time", "qLabor", "land", "qVarInput")) $nExog [1] 0 $nShifter [1] 4 $est Call: lm(formula = as.formula(estFormula), data = estData) Coefficients: (Intercept) d_1 d_2 d_3 d_4 -97.67 21.03 -185.95 29.34 1.06 $residuals 1 2 3 4 5 6 7 8 9 10 11 13.50 -65.69 2.54 35.86 27.87 -6.64 -15.27 45.70 -26.45 -2.61 2.04 12 13 14 15 16 17 18 19 20 16.62 -47.43 18.87 27.04 -11.33 -31.02 2.75 16.27 -2.61 $fitted 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 933 1028 1067 1136 1150 1192 1255 1243 1234 1281 1359 1524 1622 1677 1618 1637 17 18 19 20 1686 1753 1871 1994 $coef a_0 d_1 d_2 d_3 d_4 -97.67 21.03 -185.95 29.34 1.06 $coefCov a_0 d_1 d_2 d_3 d_4 a_0 52830.9 6.23e+02 -40094.9 -411.851 21.57957 d_1 623.2 1.61e+01 -221.6 -15.403 -0.00291 d_2 -40094.9 -2.22e+02 47108.1 25.245 -45.73182 d_3 -411.9 -1.54e+01 25.2 21.110 -0.11185 d_4 21.6 -2.91e-03 -45.7 -0.112 0.07665 $r2 [1] 0.992 $r2bar [1] 0.99 $nObs [1] 20 $yName [1] "qOutput" $shifterNames [1] "time" "qLabor" "land" "qVarInput" $regScale [1] 1 $model.matrix (Intercept) d_1 d_2 d_3 d_4 1 1 1 1.44 23.4 557 2 1 2 1.45 24.2 607 3 1 3 1.44 24.7 608 4 1 4 1.48 24.9 654 5 1 5 1.48 24.9 648 6 1 6 1.47 25.2 657 7 1 7 1.45 25.9 673 8 1 8 1.49 26.0 648 9 1 9 1.48 25.2 640 10 1 10 1.53 26.1 648 11 1 11 1.53 26.8 682 12 1 12 1.69 29.9 761 13 1 13 1.70 31.1 801 14 1 14 1.67 32.2 798 15 1 15 1.65 31.5 737 16 1 16 1.61 31.9 719 17 1 17 1.62 33.5 701 18 1 18 1.62 35.1 702 19 1 19 1.62 37.3 731 20 1 20 1.62 39.4 770 attr(,"assign") [1] 0 1 2 3 4 attr(,"class") [1] "quadFuncEst" > estResultLin <- quadFuncEst( yName = "qOutput", + xNames = c( "time", "qLabor", "land", "qVarInput" ), + data = germanFarms, linear = TRUE ) > all.equal( coef( estResultLinear ), coef( estResultLin )[1:5], + check.attributes = FALSE ) [1] TRUE > all.equal( vcov( estResultLinear ), vcov( estResultLin )[1:5,1:5], + check.attributes = FALSE ) [1] TRUE > coef( estResultLin ) a_0 a_1 a_2 a_3 a_4 b_1_1 b_1_2 b_1_3 b_1_4 b_2_2 -97.67 21.03 -185.95 29.34 1.06 0.00 0.00 0.00 0.00 0.00 b_2_3 b_2_4 b_3_3 b_3_4 b_4_4 0.00 0.00 0.00 0.00 0.00 > vcov( estResultLin ) a_0 a_1 a_2 a_3 a_4 b_1_1 b_1_2 b_1_3 b_1_4 a_0 52830.9 6.23e+02 -40094.9 -411.851 21.57957 0 0 0 0 a_1 623.2 1.61e+01 -221.6 -15.403 -0.00291 0 0 0 0 a_2 -40094.9 -2.22e+02 47108.1 25.245 -45.73182 0 0 0 0 a_3 -411.9 -1.54e+01 25.2 21.110 -0.11185 0 0 0 0 a_4 21.6 -2.91e-03 -45.7 -0.112 0.07665 0 0 0 0 b_1_1 0.0 0.00e+00 0.0 0.000 0.00000 0 0 0 0 b_1_2 0.0 0.00e+00 0.0 0.000 0.00000 0 0 0 0 b_1_3 0.0 0.00e+00 0.0 0.000 0.00000 0 0 0 0 b_1_4 0.0 0.00e+00 0.0 0.000 0.00000 0 0 0 0 b_2_2 0.0 0.00e+00 0.0 0.000 0.00000 0 0 0 0 b_2_3 0.0 0.00e+00 0.0 0.000 0.00000 0 0 0 0 b_2_4 0.0 0.00e+00 0.0 0.000 0.00000 0 0 0 0 b_3_3 0.0 0.00e+00 0.0 0.000 0.00000 0 0 0 0 b_3_4 0.0 0.00e+00 0.0 0.000 0.00000 0 0 0 0 b_4_4 0.0 0.00e+00 0.0 0.000 0.00000 0 0 0 0 b_2_2 b_2_3 b_2_4 b_3_3 b_3_4 b_4_4 a_0 0 0 0 0 0 0 a_1 0 0 0 0 0 0 a_2 0 0 0 0 0 0 a_3 0 0 0 0 0 0 a_4 0 0 0 0 0 0 b_1_1 0 0 0 0 0 0 b_1_2 0 0 0 0 0 0 b_1_3 0 0 0 0 0 0 b_1_4 0 0 0 0 0 0 b_2_2 0 0 0 0 0 0 b_2_3 0 0 0 0 0 0 b_2_4 0 0 0 0 0 0 b_3_3 0 0 0 0 0 0 b_3_4 0 0 0 0 0 0 b_4_4 0 0 0 0 0 0 > print( estResultLin ) $call quadFuncEst(yName = "qOutput", xNames = c("time", "qLabor", "land", "qVarInput"), data = germanFarms, linear = TRUE) $nExog [1] 4 $nShifter [1] 0 $est Call: lm(formula = as.formula(estFormula), data = estData) Coefficients: (Intercept) a_1 a_2 a_3 a_4 -97.67 21.03 -185.95 29.34 1.06 $residuals 1 2 3 4 5 6 7 8 9 10 11 13.50 -65.69 2.54 35.86 27.87 -6.64 -15.27 45.70 -26.45 -2.61 2.04 12 13 14 15 16 17 18 19 20 16.62 -47.43 18.87 27.04 -11.33 -31.02 2.75 16.27 -2.61 $fitted 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 933 1028 1067 1136 1150 1192 1255 1243 1234 1281 1359 1524 1622 1677 1618 1637 17 18 19 20 1686 1753 1871 1994 $coef a_0 a_1 a_2 a_3 a_4 b_1_1 b_1_2 b_1_3 b_1_4 b_2_2 -97.67 21.03 -185.95 29.34 1.06 0.00 0.00 0.00 0.00 0.00 b_2_3 b_2_4 b_3_3 b_3_4 b_4_4 0.00 0.00 0.00 0.00 0.00 $coefCov a_0 a_1 a_2 a_3 a_4 b_1_1 b_1_2 b_1_3 b_1_4 a_0 52830.9 6.23e+02 -40094.9 -411.851 21.57957 0 0 0 0 a_1 623.2 1.61e+01 -221.6 -15.403 -0.00291 0 0 0 0 a_2 -40094.9 -2.22e+02 47108.1 25.245 -45.73182 0 0 0 0 a_3 -411.9 -1.54e+01 25.2 21.110 -0.11185 0 0 0 0 a_4 21.6 -2.91e-03 -45.7 -0.112 0.07665 0 0 0 0 b_1_1 0.0 0.00e+00 0.0 0.000 0.00000 0 0 0 0 b_1_2 0.0 0.00e+00 0.0 0.000 0.00000 0 0 0 0 b_1_3 0.0 0.00e+00 0.0 0.000 0.00000 0 0 0 0 b_1_4 0.0 0.00e+00 0.0 0.000 0.00000 0 0 0 0 b_2_2 0.0 0.00e+00 0.0 0.000 0.00000 0 0 0 0 b_2_3 0.0 0.00e+00 0.0 0.000 0.00000 0 0 0 0 b_2_4 0.0 0.00e+00 0.0 0.000 0.00000 0 0 0 0 b_3_3 0.0 0.00e+00 0.0 0.000 0.00000 0 0 0 0 b_3_4 0.0 0.00e+00 0.0 0.000 0.00000 0 0 0 0 b_4_4 0.0 0.00e+00 0.0 0.000 0.00000 0 0 0 0 b_2_2 b_2_3 b_2_4 b_3_3 b_3_4 b_4_4 a_0 0 0 0 0 0 0 a_1 0 0 0 0 0 0 a_2 0 0 0 0 0 0 a_3 0 0 0 0 0 0 a_4 0 0 0 0 0 0 b_1_1 0 0 0 0 0 0 b_1_2 0 0 0 0 0 0 b_1_3 0 0 0 0 0 0 b_1_4 0 0 0 0 0 0 b_2_2 0 0 0 0 0 0 b_2_3 0 0 0 0 0 0 b_2_4 0 0 0 0 0 0 b_3_3 0 0 0 0 0 0 b_3_4 0 0 0 0 0 0 b_4_4 0 0 0 0 0 0 $r2 [1] 0.992 $r2bar [1] 0.99 $nObs [1] 20 $yName [1] "qOutput" $xNames [1] "time" "qLabor" "land" "qVarInput" $regScale [1] 1 $model.matrix (Intercept) a_1 a_2 a_3 a_4 1 1 1 1.44 23.4 557 2 1 2 1.45 24.2 607 3 1 3 1.44 24.7 608 4 1 4 1.48 24.9 654 5 1 5 1.48 24.9 648 6 1 6 1.47 25.2 657 7 1 7 1.45 25.9 673 8 1 8 1.49 26.0 648 9 1 9 1.48 25.2 640 10 1 10 1.53 26.1 648 11 1 11 1.53 26.8 682 12 1 12 1.69 29.9 761 13 1 13 1.70 31.1 801 14 1 14 1.67 32.2 798 15 1 15 1.65 31.5 737 16 1 16 1.61 31.9 719 17 1 17 1.62 33.5 701 18 1 18 1.62 35.1 702 19 1 19 1.62 37.3 731 20 1 20 1.62 39.4 770 attr(,"assign") [1] 0 1 2 3 4 attr(,"class") [1] "quadFuncEst" > # compute fitted values > fitted <- quadFuncCalc( xNames = NULL, + shifterNames = c( "time", "qLabor", "land", "qVarInput" ), + data = germanFarms, coef( estResultLinear ) ) > all.equal( fitted, estResultLinear$fitted ) [1] TRUE > all.equal( fitted, predict( estResultLinear ) ) [1] TRUE > all.equal( fitted, predict( estResultLinear, newdata = germanFarms ) ) [1] TRUE > > fitted <- quadFuncCalc( xNames = c( "time", "qLabor", "land", "qVarInput" ), + data = germanFarms, coef( estResultLin ) ) > all.equal( fitted, estResultLin$fitted ) [1] TRUE > all.equal( fitted, predict( estResultLin ) ) [1] TRUE > all.equal( fitted, predict( estResultLin, newdata = germanFarms ) ) [1] TRUE > all.equal( estResultLinear$fitted, estResultLin$fitted ) [1] TRUE > # compute partial derivatives > margProducts <- quadFuncDeriv( + c( "qLabor", "land", "qVarInput", "time" ), + data = germanFarms, coef = coef( estResultLin ), + coefCov = vcov( estResultLin ) ) > sapply( margProducts, sd ) qLabor land qVarInput time 0 0 0 0 > all.equal( margProducts[1,], coef( estResultLin )[2:5], + check.attributes = FALSE ) [1] TRUE > all.equal( attributes( margProducts )$variance[1,], diag( vcov( estResultLin ) )[2:5], + check.attributes = FALSE ) [1] TRUE > > ## estimate a quadratic production function with a logical variable as shifter > germanFarms$reUnif <- germanFarms$time >= 16 > estResultShifterLogi <- quadFuncEst( yName = "qOutput", + xNames = c( "qLabor", "land", "qVarInput" ), + shifterNames = c( "reUnif" ), data = germanFarms ) > coef( estResultShifterLogi ) a_0 a_1 a_2 a_3 b_1_1 b_1_2 b_1_3 b_2_2 -1.99e+04 1.69e+04 4.87e+02 8.21e-01 -4.35e+03 -2.33e+02 -5.45e+00 -1.18e+00 b_2_3 b_3_3 d_1_TRUE -2.71e-02 1.31e-02 -9.48e+01 > print( estResultShifterLogi ) $call quadFuncEst(yName = "qOutput", xNames = c("qLabor", "land", "qVarInput"), data = germanFarms, shifterNames = c("reUnif")) $nExog [1] 3 $nShifter [1] 1 $est Call: lm(formula = as.formula(estFormula), data = estData) Coefficients: (Intercept) a_1 a_2 a_3 b_1_1 b_1_2 -1.99e+04 1.69e+04 4.87e+02 8.21e-01 -4.35e+03 -2.33e+02 b_1_3 b_2_2 b_2_3 b_3_3 d_1_TRUE -5.45e+00 -1.18e+00 -2.71e-02 1.31e-02 -9.48e+01 $residuals 1 2 3 4 5 6 7 8 9 10 11 20.60 -64.61 6.52 10.39 20.72 2.26 -6.92 21.64 28.64 -27.53 -19.88 12 13 14 15 16 17 18 19 20 15.47 -17.18 5.18 4.68 13.37 -21.80 1.71 13.22 -6.50 $fitted 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 926 1027 1063 1161 1157 1184 1246 1267 1179 1306 1380 1525 1592 1691 1640 1613 17 18 19 20 1677 1754 1874 1998 $coef a_0 a_1 a_2 a_3 b_1_1 b_1_2 b_1_3 b_2_2 -1.99e+04 1.69e+04 4.87e+02 8.21e-01 -4.35e+03 -2.33e+02 -5.45e+00 -1.18e+00 b_2_3 b_3_3 d_1_TRUE -2.71e-02 1.31e-02 -9.48e+01 $coefCov a_0 a_1 a_2 a_3 b_1_1 b_1_2 b_1_3 a_0 2.79e+07 -4.04e+07 -3.08e+05 2.26e+04 28500046 9.36e+04 -9.04e+03 a_1 -4.04e+07 7.81e+07 -1.68e+05 -5.18e+04 -78103687 3.08e+05 4.97e+04 a_2 -3.08e+05 -1.68e+05 8.98e+04 -2.25e+03 315003 -5.28e+04 1.55e+03 a_3 2.26e+04 -5.18e+04 -2.25e+03 1.38e+02 79606 1.12e+03 -1.45e+02 b_1_1 2.85e+07 -7.81e+07 3.15e+05 7.96e+04 106386622 -4.45e+05 -1.07e+05 b_1_2 9.36e+04 3.08e+05 -5.28e+04 1.12e+03 -444670 3.40e+04 -7.68e+02 b_1_3 -9.04e+03 4.97e+04 1.55e+03 -1.45e+02 -107096 -7.68e+02 1.96e+02 b_2_2 -4.03e+03 4.15e+03 1.80e+02 -5.18e+00 -800 -9.32e+01 -4.73e-02 b_2_3 3.99e+02 -6.40e+02 -1.37e+01 8.23e-01 575 1.16e+00 -3.93e-01 b_3_3 -2.96e+01 -8.84e+00 2.67e-01 9.28e-02 101 1.06e-01 -2.17e-01 d_1_TRUE 4.77e+04 -3.72e+04 -3.75e+03 9.03e+01 37570 1.26e+03 -7.27e+01 b_2_2 b_2_3 b_3_3 d_1_TRUE a_0 -4.03e+03 3.99e+02 -2.96e+01 4.77e+04 a_1 4.15e+03 -6.40e+02 -8.84e+00 -3.72e+04 a_2 1.80e+02 -1.37e+01 2.67e-01 -3.75e+03 a_3 -5.18e+00 8.23e-01 9.28e-02 9.03e+01 b_1_1 -8.00e+02 5.75e+02 1.01e+02 3.76e+04 b_1_2 -9.32e+01 1.16e+00 1.06e-01 1.26e+03 b_1_3 -4.73e-02 -3.93e-01 -2.17e-01 -7.27e+01 b_2_2 8.88e+00 -4.43e-01 2.63e-02 1.08e+01 b_2_3 -4.43e-01 3.58e-02 -1.81e-03 1.45e+00 b_3_3 2.63e-02 -1.81e-03 4.33e-04 -9.53e-03 d_1_TRUE 1.08e+01 1.45e+00 -9.53e-03 2.53e+03 $r2 [1] 0.995 $r2bar [1] 0.989 $nObs [1] 20 $yName [1] "qOutput" $xNames [1] "qLabor" "land" "qVarInput" $shifterNames [1] "reUnif" $regScale [1] 1 $model.matrix (Intercept) a_1 a_2 a_3 b_1_1 b_1_2 b_1_3 b_2_2 b_2_3 b_3_3 d_1_TRUE 1 1 1.44 23.4 557 1.04 33.7 801 274 13023 154872 0 2 1 1.45 24.2 607 1.05 35.1 880 293 14681 184006 0 3 1 1.44 24.7 608 1.04 35.6 875 305 15009 184781 0 4 1 1.48 24.9 654 1.10 36.9 968 310 16290 213832 0 5 1 1.48 24.9 648 1.10 36.9 958 310 16132 209710 0 6 1 1.47 25.2 657 1.08 37.1 966 318 16576 215817 0 7 1 1.45 25.9 673 1.05 37.6 977 336 17449 226774 0 8 1 1.49 26.0 648 1.11 38.7 965 337 16826 209890 0 9 1 1.48 25.2 640 1.10 37.3 947 317 16115 204785 0 10 1 1.53 26.1 648 1.17 39.9 992 340 16906 210262 0 11 1 1.53 26.8 682 1.17 41.0 1044 358 18267 232820 0 12 1 1.69 29.9 761 1.43 50.5 1286 446 22730 289533 0 13 1 1.70 31.1 801 1.44 52.9 1362 484 24927 321010 0 14 1 1.67 32.2 798 1.39 53.8 1332 518 25681 318247 0 15 1 1.65 31.5 737 1.36 52.0 1216 497 23230 271572 0 16 1 1.61 31.9 719 1.30 51.3 1157 508 22914 258318 1 17 1 1.62 33.5 701 1.31 54.3 1135 562 23501 245488 1 18 1 1.62 35.1 702 1.31 56.8 1137 615 24605 246256 1 19 1 1.62 37.3 731 1.31 60.4 1185 696 27283 267367 1 20 1 1.62 39.4 770 1.31 63.8 1248 776 30337 296583 1 attr(,"assign") [1] 0 1 2 3 4 5 6 7 8 9 10 attr(,"contrasts") attr(,"contrasts")$d_1_ [1] "contr.treatment" attr(,"class") [1] "quadFuncEst" > # compute fitted values > fitted <- quadFuncCalc( c( "qLabor", "land", "qVarInput" ), + shifterNames = c( "reUnif" ), data = germanFarms, + coef( estResultShifterLogi ) ) > all.equal( fitted, estResultShifterLogi$fitted ) [1] TRUE > all.equal( fitted, predict( estResultShifterLogi ) ) [1] TRUE > all.equal( fitted, predict( estResultShifterLogi, newdata = germanFarms ) ) [1] TRUE > > ## estimate a quadratic production function with a factor as shifter > germanFarms$decade <- as.factor( c( rep( "70s", 5 ), rep( "80s", 10 ), + rep( "90s", 5 ) ) ) > estResultShifterFac <- quadFuncEst( yName = "qOutput", + xNames = c( "qLabor", "land", "qVarInput" ), + shifterNames = c( "decade" ), data = germanFarms ) > coef( estResultShifterFac ) a_0 a_1 a_2 a_3 b_1_1 b_1_2 b_1_3 b_2_2 -1.93e+04 1.69e+04 4.38e+02 9.90e-01 -5.07e+03 -2.05e+02 -4.85e+00 -1.18e+00 b_2_3 b_3_3 d_1_80s d_1_90s -2.07e-02 1.13e-02 7.61e+00 -8.29e+01 > print( estResultShifterFac ) $call quadFuncEst(yName = "qOutput", xNames = c("qLabor", "land", "qVarInput"), data = germanFarms, shifterNames = c("decade")) $nExog [1] 3 $nShifter [1] 1 $est Call: lm(formula = as.formula(estFormula), data = estData) Coefficients: (Intercept) a_1 a_2 a_3 b_1_1 b_1_2 -1.93e+04 1.69e+04 4.38e+02 9.90e-01 -5.07e+03 -2.05e+02 b_1_3 b_2_2 b_2_3 b_3_3 d_1_80s d_1_90s -4.85e+00 -1.18e+00 -2.07e-02 1.13e-02 7.61e+00 -8.29e+01 $residuals 1 2 3 4 5 6 7 8 9 10 11 20.42 -64.92 8.65 12.73 23.11 -1.57 -6.41 21.06 24.80 -27.53 -18.46 12 13 14 15 16 17 18 19 20 15.59 -17.66 5.49 4.69 13.40 -21.93 2.04 12.90 -6.41 $fitted 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 926 1028 1061 1159 1155 1187 1246 1268 1183 1306 1379 1525 1593 1690 1640 1613 17 18 19 20 1677 1754 1875 1998 $coef a_0 a_1 a_2 a_3 b_1_1 b_1_2 b_1_3 b_2_2 -1.93e+04 1.69e+04 4.38e+02 9.90e-01 -5.07e+03 -2.05e+02 -4.85e+00 -1.18e+00 b_2_3 b_3_3 d_1_80s d_1_90s -2.07e-02 1.13e-02 7.61e+00 -8.29e+01 $coefCov a_0 a_1 a_2 a_3 b_1_1 b_1_2 b_1_3 a_0 4.05e+07 -4.55e+07 -1.07e+06 2.78e+04 21264944 5.08e+05 -1.30e+03 a_1 -4.55e+07 8.74e+07 -1.67e+05 -5.80e+04 -87097217 3.34e+05 5.54e+04 a_2 -1.07e+06 -1.67e+05 1.57e+05 -2.72e+03 1180373 -9.06e+04 1.05e+03 a_3 2.78e+04 -5.80e+04 -2.72e+03 1.55e+02 86227 1.36e+03 -1.60e+02 b_1_1 2.13e+07 -8.71e+07 1.18e+06 8.62e+04 131222698 -9.60e+05 -1.30e+05 b_1_2 5.08e+05 3.34e+05 -9.06e+04 1.36e+03 -960052 5.57e+04 -4.76e+02 b_1_3 -1.30e+03 5.54e+04 1.05e+03 -1.60e+02 -129947 -4.76e+02 2.28e+02 b_2_2 -4.57e+03 4.64e+03 2.07e+02 -5.82e+00 -815 -1.07e+02 -1.20e-01 b_2_3 5.41e+02 -7.19e+02 -2.26e+01 9.46e-01 536 5.39e+00 -3.50e-01 b_3_3 -6.04e+01 -9.12e+00 2.43e+00 9.65e-02 144 -1.07e+00 -2.69e-01 d_1_80s 1.12e+05 -3.20e+03 -8.74e+03 3.02e+01 -128559 4.88e+03 1.07e+02 d_1_90s 2.30e+05 -4.66e+04 -1.79e+04 1.48e+02 -159729 9.07e+03 8.61e+01 b_2_2 b_2_3 b_3_3 d_1_80s d_1_90s a_0 -4.57e+03 5.41e+02 -6.04e+01 1.12e+05 2.30e+05 a_1 4.64e+03 -7.19e+02 -9.12e+00 -3.20e+03 -4.66e+04 a_2 2.07e+02 -2.26e+01 2.43e+00 -8.74e+03 -1.79e+04 a_3 -5.82e+00 9.46e-01 9.65e-02 3.02e+01 1.48e+02 b_1_1 -8.15e+02 5.36e+02 1.44e+02 -1.29e+05 -1.60e+05 b_1_2 -1.07e+02 5.39e+00 -1.07e+00 4.88e+03 9.07e+03 b_1_3 -1.20e-01 -3.50e-01 -2.69e-01 1.07e+02 8.61e+01 b_2_2 9.93e+00 -4.96e-01 2.97e-02 -8.48e-01 1.07e+01 b_2_3 -4.96e-01 4.10e-02 -2.31e-03 1.14e+00 3.41e+00 b_3_3 2.97e-02 -2.31e-03 5.65e-04 -3.30e-01 -5.29e-01 d_1_80s -8.48e-01 1.14e+00 -3.30e-01 1.36e+03 2.13e+03 d_1_90s 1.07e+01 3.41e+00 -5.29e-01 2.13e+03 6.18e+03 $r2 [1] 0.995 $r2bar [1] 0.988 $nObs [1] 20 $yName [1] "qOutput" $xNames [1] "qLabor" "land" "qVarInput" $shifterNames [1] "decade" $regScale [1] 1 $model.matrix (Intercept) a_1 a_2 a_3 b_1_1 b_1_2 b_1_3 b_2_2 b_2_3 b_3_3 d_1_80s 1 1 1.44 23.4 557 1.04 33.7 801 274 13023 154872 0 2 1 1.45 24.2 607 1.05 35.1 880 293 14681 184006 0 3 1 1.44 24.7 608 1.04 35.6 875 305 15009 184781 0 4 1 1.48 24.9 654 1.10 36.9 968 310 16290 213832 0 5 1 1.48 24.9 648 1.10 36.9 958 310 16132 209710 0 6 1 1.47 25.2 657 1.08 37.1 966 318 16576 215817 1 7 1 1.45 25.9 673 1.05 37.6 977 336 17449 226774 1 8 1 1.49 26.0 648 1.11 38.7 965 337 16826 209890 1 9 1 1.48 25.2 640 1.10 37.3 947 317 16115 204785 1 10 1 1.53 26.1 648 1.17 39.9 992 340 16906 210262 1 11 1 1.53 26.8 682 1.17 41.0 1044 358 18267 232820 1 12 1 1.69 29.9 761 1.43 50.5 1286 446 22730 289533 1 13 1 1.70 31.1 801 1.44 52.9 1362 484 24927 321010 1 14 1 1.67 32.2 798 1.39 53.8 1332 518 25681 318247 1 15 1 1.65 31.5 737 1.36 52.0 1216 497 23230 271572 1 16 1 1.61 31.9 719 1.30 51.3 1157 508 22914 258318 0 17 1 1.62 33.5 701 1.31 54.3 1135 562 23501 245488 0 18 1 1.62 35.1 702 1.31 56.8 1137 615 24605 246256 0 19 1 1.62 37.3 731 1.31 60.4 1185 696 27283 267367 0 20 1 1.62 39.4 770 1.31 63.8 1248 776 30337 296583 0 d_1_90s 1 0 2 0 3 0 4 0 5 0 6 0 7 0 8 0 9 0 10 0 11 0 12 0 13 0 14 0 15 0 16 1 17 1 18 1 19 1 20 1 attr(,"assign") [1] 0 1 2 3 4 5 6 7 8 9 10 10 attr(,"contrasts") attr(,"contrasts")$d_1_ [1] "contr.treatment" attr(,"class") [1] "quadFuncEst" > # compute fitted values > fitted <- quadFuncCalc( c( "qLabor", "land", "qVarInput" ), + shifterNames = c( "decade" ), data = germanFarms, + coef( estResultShifterFac ) ) > all.equal( fitted, estResultShifterFac$fitted ) [1] TRUE > all.equal( fitted, predict( estResultShifterFac ) ) [1] TRUE > all.equal( fitted, predict( estResultShifterFac, newdata = germanFarms ) ) [1] TRUE > > ## estimate a quadratic production function with some shifters are logical > estResultShifterLogi2 <- quadFuncEst( yName = "qOutput", + xNames = c( "qLabor", "land", "qVarInput" ), + shifterNames = c( "time", "reUnif" ), data = germanFarms ) > coef( estResultShifterLogi2 ) a_0 a_1 a_2 a_3 b_1_1 b_1_2 b_1_3 b_2_2 -1.61e+04 1.39e+04 3.62e+02 1.73e+00 -3.73e+03 -1.67e+02 -5.11e+00 -8.85e-01 b_2_3 b_3_3 d_1 d_2_TRUE -1.95e-02 1.08e-02 5.35e+00 -8.70e+01 > print( estResultShifterLogi2 ) $call quadFuncEst(yName = "qOutput", xNames = c("qLabor", "land", "qVarInput"), data = germanFarms, shifterNames = c("time", "reUnif")) $nExog [1] 3 $nShifter [1] 2 $est Call: lm(formula = as.formula(estFormula), data = estData) Coefficients: (Intercept) a_1 a_2 a_3 b_1_1 b_1_2 -1.61e+04 1.39e+04 3.62e+02 1.73e+00 -3.73e+03 -1.67e+02 b_1_3 b_2_2 b_2_3 b_3_3 d_1 d_2_TRUE -5.11e+00 -8.85e-01 -1.95e-02 1.08e-02 5.35e+00 -8.70e+01 $residuals 1 2 3 4 5 6 7 8 9 10 20.280 -62.629 9.130 16.474 22.003 0.344 -7.456 25.574 13.685 -26.917 11 12 13 14 15 16 17 18 19 20 -18.702 17.405 -20.083 7.416 3.476 13.421 -22.091 1.947 13.494 -6.772 $fitted 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 926 1025 1060 1155 1156 1185 1247 1263 1194 1305 1379 1523 1595 1689 1641 1613 17 18 19 20 1677 1754 1874 1999 $coef a_0 a_1 a_2 a_3 b_1_1 b_1_2 b_1_3 b_2_2 -1.61e+04 1.39e+04 3.62e+02 1.73e+00 -3.73e+03 -1.67e+02 -5.11e+00 -8.85e-01 b_2_3 b_3_3 d_1 d_2_TRUE -1.95e-02 1.08e-02 5.35e+00 -8.70e+01 $coefCov a_0 a_1 a_2 a_3 b_1_1 b_1_2 b_1_3 a_0 8.13e+07 -84219919 -2.01e+06 3.68e+04 39262698 9.77e+05 -5.29e+03 a_1 -8.42e+07 116647378 1.14e+06 -6.59e+04 -91400577 -3.56e+05 5.04e+04 a_2 -2.01e+06 1140366 1.53e+05 -2.85e+03 69726 -8.61e+04 1.54e+03 a_3 3.68e+04 -65896 -2.85e+03 1.53e+02 88472 1.42e+03 -1.56e+02 b_1_1 3.93e+07 -91400577 6.97e+04 8.85e+04 116928660 -3.41e+05 -1.16e+05 b_1_2 9.77e+05 -355785 -8.61e+04 1.42e+03 -340778 5.20e+04 -7.57e+02 b_1_3 -5.29e+03 50423 1.54e+03 -1.56e+02 -115613 -7.57e+02 2.14e+02 b_2_2 -4.62e+02 1420 6.72e+01 -4.69e+00 -234 -3.42e+01 2.96e-01 b_2_3 5.35e+02 -775 -1.82e+01 9.18e-01 641 3.00e+00 -4.18e-01 b_3_3 -6.33e+01 15 1.31e+00 9.33e-02 104 -4.20e-01 -2.39e-01 d_1 7.18e+04 -56612 -2.36e+03 1.72e+01 11662 1.23e+03 6.37e+00 d_2_TRUE 1.56e+05 -122693 -7.50e+03 1.23e+02 57774 3.15e+03 -6.97e+01 b_2_2 b_2_3 b_3_3 d_1 d_2_TRUE a_0 -462.1618 5.35e+02 -6.33e+01 7.18e+04 1.56e+05 a_1 1419.5359 -7.75e+02 1.50e+01 -5.66e+04 -1.23e+05 a_2 67.1620 -1.82e+01 1.31e+00 -2.36e+03 -7.50e+03 a_3 -4.6929 9.18e-01 9.33e-02 1.72e+01 1.23e+02 b_1_1 -234.0715 6.41e+02 1.04e+02 1.17e+04 5.78e+04 b_1_2 -34.1784 3.00e+00 -4.20e-01 1.23e+03 3.15e+03 b_1_3 0.2961 -4.18e-01 -2.39e-01 6.37e+00 -6.97e+01 b_2_2 9.9432 -4.73e-01 2.62e-02 5.49e+00 1.97e+01 b_2_3 -0.4734 3.91e-02 -2.03e-03 1.43e-01 1.78e+00 b_3_3 0.0262 -2.03e-03 4.89e-04 -4.38e-02 -7.41e-02 d_1 5.4950 1.43e-01 -4.38e-02 1.01e+02 1.47e+02 d_2_TRUE 19.7059 1.78e+00 -7.41e-02 1.47e+02 2.96e+03 $r2 [1] 0.995 $r2bar [1] 0.988 $nObs [1] 20 $yName [1] "qOutput" $xNames [1] "qLabor" "land" "qVarInput" $shifterNames [1] "time" "reUnif" $regScale [1] 1 $model.matrix (Intercept) a_1 a_2 a_3 b_1_1 b_1_2 b_1_3 b_2_2 b_2_3 b_3_3 d_1 d_2_TRUE 1 1 1.44 23.4 557 1.04 33.7 801 274 13023 154872 1 0 2 1 1.45 24.2 607 1.05 35.1 880 293 14681 184006 2 0 3 1 1.44 24.7 608 1.04 35.6 875 305 15009 184781 3 0 4 1 1.48 24.9 654 1.10 36.9 968 310 16290 213832 4 0 5 1 1.48 24.9 648 1.10 36.9 958 310 16132 209710 5 0 6 1 1.47 25.2 657 1.08 37.1 966 318 16576 215817 6 0 7 1 1.45 25.9 673 1.05 37.6 977 336 17449 226774 7 0 8 1 1.49 26.0 648 1.11 38.7 965 337 16826 209890 8 0 9 1 1.48 25.2 640 1.10 37.3 947 317 16115 204785 9 0 10 1 1.53 26.1 648 1.17 39.9 992 340 16906 210262 10 0 11 1 1.53 26.8 682 1.17 41.0 1044 358 18267 232820 11 0 12 1 1.69 29.9 761 1.43 50.5 1286 446 22730 289533 12 0 13 1 1.70 31.1 801 1.44 52.9 1362 484 24927 321010 13 0 14 1 1.67 32.2 798 1.39 53.8 1332 518 25681 318247 14 0 15 1 1.65 31.5 737 1.36 52.0 1216 497 23230 271572 15 0 16 1 1.61 31.9 719 1.30 51.3 1157 508 22914 258318 16 1 17 1 1.62 33.5 701 1.31 54.3 1135 562 23501 245488 17 1 18 1 1.62 35.1 702 1.31 56.8 1137 615 24605 246256 18 1 19 1 1.62 37.3 731 1.31 60.4 1185 696 27283 267367 19 1 20 1 1.62 39.4 770 1.31 63.8 1248 776 30337 296583 20 1 attr(,"assign") [1] 0 1 2 3 4 5 6 7 8 9 10 11 attr(,"contrasts") attr(,"contrasts")$d_2_ [1] "contr.treatment" attr(,"class") [1] "quadFuncEst" > # compute fitted values > fitted <- quadFuncCalc( c( "qLabor", "land", "qVarInput" ), + shifterNames = c( "time", "reUnif" ), data = germanFarms, + coef( estResultShifterLogi2 ) ) > all.equal( fitted, estResultShifterLogi2$fitted ) [1] TRUE > all.equal( fitted, predict( estResultShifterLogi2 ) ) [1] TRUE > all.equal( fitted, predict( estResultShifterLogi2, newdata = germanFarms ) ) [1] TRUE > > ## estimate a quadratic production function with some shifters are factors > estResultShifterFac2 <- quadFuncEst( yName = "qOutput", + xNames = c( "qLabor", "land", "qVarInput" ), + shifterNames = c( "time", "decade" ), data = germanFarms ) > coef( estResultShifterFac2 ) a_0 a_1 a_2 a_3 b_1_1 b_1_2 b_1_3 b_2_2 -1.53e+04 1.25e+04 3.85e+02 1.88e+00 -2.20e+03 -1.83e+02 -5.97e+00 -7.36e-01 b_2_3 b_3_3 d_1 d_2_80s d_2_90s -2.68e-02 1.29e-02 7.93e+00 -1.30e+01 -1.04e+02 > print( estResultShifterFac2 ) $call quadFuncEst(yName = "qOutput", xNames = c("qLabor", "land", "qVarInput"), data = germanFarms, shifterNames = c("time", "decade")) $nExog [1] 3 $nShifter [1] 2 $est Call: lm(formula = as.formula(estFormula), data = estData) Coefficients: (Intercept) a_1 a_2 a_3 b_1_1 b_1_2 -1.53e+04 1.25e+04 3.85e+02 1.88e+00 -2.20e+03 -1.83e+02 b_1_3 b_2_2 b_2_3 b_3_3 d_1 d_2_80s -5.97e+00 -7.36e-01 -2.68e-02 1.29e-02 7.93e+00 -1.30e+01 d_2_90s -1.04e+02 $residuals 1 2 3 4 5 6 7 8 9 10 11 20.44 -61.15 6.75 15.41 18.54 5.95 -8.59 28.47 13.03 -26.62 -20.55 12 13 14 15 16 17 18 19 20 18.13 -20.67 7.97 2.87 13.40 -22.01 1.49 14.17 -7.05 $fitted 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 926 1024 1063 1156 1160 1180 1248 1260 1195 1305 1381 1523 1596 1688 1642 1613 17 18 19 20 1677 1754 1873 1999 $coef a_0 a_1 a_2 a_3 b_1_1 b_1_2 b_1_3 b_2_2 -1.53e+04 1.25e+04 3.85e+02 1.88e+00 -2.20e+03 -1.83e+02 -5.97e+00 -7.36e-01 b_2_3 b_3_3 d_1 d_2_80s d_2_90s -2.68e-02 1.29e-02 7.93e+00 -1.30e+01 -1.04e+02 $coefCov a_0 a_1 a_2 a_3 b_1_1 b_1_2 b_1_3 a_0 1.03e+08 -1.15e+08 -1.96e+06 4.39e+04 6.59e+07 8.96e+05 -1.80e+04 a_1 -1.15e+08 1.69e+08 6.87e+05 -7.87e+04 -1.43e+08 -8.06e+03 7.94e+04 a_2 -1.96e+06 6.87e+05 1.83e+05 -3.17e+03 7.32e+05 -1.04e+05 1.38e+03 a_3 4.39e+04 -7.87e+04 -3.17e+03 1.74e+02 1.05e+05 1.57e+03 -1.80e+02 b_1_1 6.59e+07 -1.43e+08 7.32e+05 1.05e+05 1.75e+08 -8.13e+05 -1.55e+05 b_1_2 8.96e+05 -8.06e+03 -1.04e+05 1.57e+03 -8.13e+05 6.32e+04 -6.19e+02 b_1_3 -1.80e+04 7.94e+04 1.38e+03 -1.80e+02 -1.55e+05 -6.19e+02 2.56e+02 b_2_2 1.55e+03 -2.25e+03 1.40e+02 -4.91e+00 3.89e+03 -8.02e+01 -2.00e+00 b_2_3 5.06e+02 -6.91e+02 -2.37e+01 1.02e+00 5.24e+02 5.42e+00 -3.60e-01 b_3_3 -4.33e+01 -3.59e+01 2.36e+00 1.11e-01 1.76e+02 -1.04e+00 -3.03e-01 d_1 1.17e+05 -1.31e+05 -1.57e+03 2.66e+01 8.54e+04 6.76e+02 -3.33e+01 d_2_80s -1.81e+05 3.37e+05 -5.55e+03 -3.59e+01 -3.63e+05 3.62e+03 2.04e+02 d_2_90s -5.51e+04 2.93e+05 -1.56e+04 9.35e+01 -4.00e+05 8.21e+03 1.82e+02 b_2_2 b_2_3 b_3_3 d_1 d_2_80s d_2_90s a_0 1.55e+03 5.06e+02 -4.33e+01 1.17e+05 -1.81e+05 -5.51e+04 a_1 -2.25e+03 -6.91e+02 -3.59e+01 -1.31e+05 3.37e+05 2.93e+05 a_2 1.40e+02 -2.37e+01 2.36e+00 -1.57e+03 -5.55e+03 -1.56e+04 a_3 -4.91e+00 1.02e+00 1.11e-01 2.66e+01 -3.59e+01 9.35e+01 b_1_1 3.89e+03 5.24e+02 1.76e+02 8.54e+04 -3.63e+05 -4.00e+05 b_1_2 -8.02e+01 5.42e+00 -1.04e+00 6.76e+02 3.62e+03 8.21e+03 b_1_3 -2.00e+00 -3.60e-01 -3.03e-01 -3.33e+01 2.04e+02 1.82e+02 b_2_2 1.17e+01 -5.57e-01 3.53e-02 1.33e+01 -3.54e+01 -2.29e+01 b_2_3 -5.57e-01 4.53e-02 -2.58e-03 -1.80e-01 1.72e+00 4.22e+00 b_3_3 3.53e-02 -2.58e-03 6.31e-04 4.66e-02 -4.85e-01 -7.05e-01 d_1 1.33e+01 -1.80e-01 4.66e-02 2.36e+02 -6.13e+02 -6.19e+02 d_2_80s -3.54e+01 1.72e+00 -4.85e-01 -6.13e+02 3.09e+03 3.95e+03 d_2_90s -2.29e+01 4.22e+00 -7.05e-01 -6.19e+02 3.95e+03 8.42e+03 $r2 [1] 0.995 $r2bar [1] 0.987 $nObs [1] 20 $yName [1] "qOutput" $xNames [1] "qLabor" "land" "qVarInput" $shifterNames [1] "time" "decade" $regScale [1] 1 $model.matrix (Intercept) a_1 a_2 a_3 b_1_1 b_1_2 b_1_3 b_2_2 b_2_3 b_3_3 d_1 d_2_80s 1 1 1.44 23.4 557 1.04 33.7 801 274 13023 154872 1 0 2 1 1.45 24.2 607 1.05 35.1 880 293 14681 184006 2 0 3 1 1.44 24.7 608 1.04 35.6 875 305 15009 184781 3 0 4 1 1.48 24.9 654 1.10 36.9 968 310 16290 213832 4 0 5 1 1.48 24.9 648 1.10 36.9 958 310 16132 209710 5 0 6 1 1.47 25.2 657 1.08 37.1 966 318 16576 215817 6 1 7 1 1.45 25.9 673 1.05 37.6 977 336 17449 226774 7 1 8 1 1.49 26.0 648 1.11 38.7 965 337 16826 209890 8 1 9 1 1.48 25.2 640 1.10 37.3 947 317 16115 204785 9 1 10 1 1.53 26.1 648 1.17 39.9 992 340 16906 210262 10 1 11 1 1.53 26.8 682 1.17 41.0 1044 358 18267 232820 11 1 12 1 1.69 29.9 761 1.43 50.5 1286 446 22730 289533 12 1 13 1 1.70 31.1 801 1.44 52.9 1362 484 24927 321010 13 1 14 1 1.67 32.2 798 1.39 53.8 1332 518 25681 318247 14 1 15 1 1.65 31.5 737 1.36 52.0 1216 497 23230 271572 15 1 16 1 1.61 31.9 719 1.30 51.3 1157 508 22914 258318 16 0 17 1 1.62 33.5 701 1.31 54.3 1135 562 23501 245488 17 0 18 1 1.62 35.1 702 1.31 56.8 1137 615 24605 246256 18 0 19 1 1.62 37.3 731 1.31 60.4 1185 696 27283 267367 19 0 20 1 1.62 39.4 770 1.31 63.8 1248 776 30337 296583 20 0 d_2_90s 1 0 2 0 3 0 4 0 5 0 6 0 7 0 8 0 9 0 10 0 11 0 12 0 13 0 14 0 15 0 16 1 17 1 18 1 19 1 20 1 attr(,"assign") [1] 0 1 2 3 4 5 6 7 8 9 10 11 11 attr(,"contrasts") attr(,"contrasts")$d_2_ [1] "contr.treatment" attr(,"class") [1] "quadFuncEst" > # compute fitted values > fitted <- quadFuncCalc( c( "qLabor", "land", "qVarInput" ), + shifterNames = c( "time", "decade" ), data = germanFarms, + coef( estResultShifterFac2 ) ) > all.equal( fitted, estResultShifterFac2$fitted ) [1] TRUE > all.equal( fitted, predict( estResultShifterFac2 ) ) [1] TRUE > all.equal( fitted, predict( estResultShifterFac2, newdata = germanFarms ) ) [1] TRUE > > ## estimate with further argument passed to lm() > estResult2 <- quadFuncEst( yName = "qOutput", + xNames = c( "qLabor", "land", "qVarInput", "time" ), + germanFarms, x = TRUE, y = TRUE ) > coef( estResult2 ) a_0 a_1 a_2 a_3 a_4 b_1_1 b_1_2 b_1_3 -1.89e+04 1.64e+04 2.89e+01 1.92e+01 -1.50e+02 -1.14e+04 2.45e+02 -5.29e+00 b_1_4 b_2_2 b_2_3 b_2_4 b_3_3 b_3_4 b_4_4 -1.45e+02 -4.79e+00 -3.67e-01 5.18e+00 -7.90e-03 5.06e-01 -1.30e+01 > print( estResult2 ) $call quadFuncEst(yName = "qOutput", xNames = c("qLabor", "land", "qVarInput", "time"), data = germanFarms, x = TRUE, y = TRUE) $nExog [1] 4 $nShifter [1] 0 $est Call: lm(formula = as.formula(estFormula), data = estData, x = TRUE, y = TRUE) Coefficients: (Intercept) a_1 a_2 a_3 a_4 b_1_1 -1.89e+04 1.64e+04 2.89e+01 1.92e+01 -1.50e+02 -1.14e+04 b_1_2 b_1_3 b_1_4 b_2_2 b_2_3 b_2_4 2.45e+02 -5.29e+00 -1.45e+02 -4.79e+00 -3.67e-01 5.18e+00 b_3_3 b_3_4 b_4_4 -7.90e-03 5.06e-01 -1.30e+01 $residuals 1 2 3 4 5 6 7 8 9 10 7.432 -39.365 21.652 32.467 -0.816 -21.651 -0.640 -4.241 12.971 -7.827 11 12 13 14 15 16 17 18 19 20 -2.867 2.988 -6.250 0.863 7.942 7.057 -20.630 13.722 -3.067 0.260 $fitted 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 939 1002 1048 1139 1179 1207 1240 1293 1195 1286 1363 1538 1581 1695 1637 1619 17 18 19 20 1676 1742 1890 1992 $coef a_0 a_1 a_2 a_3 a_4 b_1_1 b_1_2 b_1_3 -1.89e+04 1.64e+04 2.89e+01 1.92e+01 -1.50e+02 -1.14e+04 2.45e+02 -5.29e+00 b_1_4 b_2_2 b_2_3 b_2_4 b_3_3 b_3_4 b_4_4 -1.45e+02 -4.79e+00 -3.67e-01 5.18e+00 -7.90e-03 5.06e-01 -1.30e+01 $coefCov a_0 a_1 a_2 a_3 a_4 b_1_1 b_1_2 a_0 1.94e+08 -2.20e+08 -6.68e+06 1.05e+05 6.70e+06 1.13e+08 4.31e+06 a_1 -2.20e+08 2.81e+08 6.63e+06 -1.51e+05 -7.66e+06 -1.69e+08 -4.62e+06 a_2 -6.68e+06 6.63e+06 5.13e+05 -1.06e+04 -3.64e+05 -2.55e+06 -3.15e+05 a_3 1.05e+05 -1.51e+05 -1.06e+04 3.56e+02 6.68e+03 9.83e+04 6.98e+03 a_4 6.70e+06 -7.66e+06 -3.64e+05 6.68e+03 3.83e+05 3.87e+06 2.36e+05 b_1_1 1.13e+08 -1.69e+08 -2.55e+06 9.83e+04 3.87e+06 1.54e+08 1.38e+06 b_1_2 4.31e+06 -4.62e+06 -3.15e+05 6.98e+03 2.36e+05 1.38e+06 2.19e+05 b_1_3 -5.15e+04 8.65e+04 5.88e+03 -2.18e+02 -3.90e+03 -1.23e+05 -3.00e+03 b_1_4 -4.18e+06 5.22e+06 1.98e+05 -4.24e+03 -2.25e+05 -2.28e+06 -1.55e+05 b_2_2 -3.05e+04 5.44e+04 -4.26e+03 1.12e+02 1.34e+03 -2.62e+04 1.32e+03 b_2_3 2.27e+03 -2.43e+03 1.66e+01 -2.32e+00 4.27e+01 2.20e+03 -2.74e+01 b_2_4 -4.87e+04 4.09e+04 6.71e+03 -1.44e+02 -4.86e+03 -2.31e+04 -3.26e+03 b_3_3 -1.41e+02 1.45e+02 3.27e+00 3.76e-03 -3.92e+00 4.58e+01 -3.77e+00 b_3_4 3.10e+02 -8.51e+02 -9.78e+01 4.01e+00 5.87e+01 -3.90e+02 8.93e+01 b_4_4 8.31e+04 -8.74e+04 -5.40e+03 9.41e+01 5.21e+03 5.26e+04 2.81e+03 b_1_3 b_1_4 b_2_2 b_2_3 b_2_4 b_3_3 b_3_4 a_0 -5.15e+04 -4.18e+06 -3.05e+04 2.27e+03 -4.87e+04 -1.41e+02 310.0540 a_1 8.65e+04 5.22e+06 5.44e+04 -2.43e+03 4.09e+04 1.45e+02 -851.3935 a_2 5.88e+03 1.98e+05 -4.26e+03 1.66e+01 6.71e+03 3.27e+00 -97.8391 a_3 -2.18e+02 -4.24e+03 1.12e+02 -2.32e+00 -1.44e+02 3.76e-03 4.0064 a_4 -3.90e+03 -2.25e+05 1.34e+03 4.27e+01 -4.86e+03 -3.92e+00 58.7104 b_1_1 -1.23e+05 -2.28e+06 -2.62e+04 2.20e+03 -2.31e+04 4.58e+01 -390.2702 b_1_2 -3.00e+03 -1.55e+05 1.32e+03 -2.74e+01 -3.26e+03 -3.77e+00 89.3295 b_1_3 2.47e+02 1.53e+03 -8.48e+01 -8.32e-02 1.01e+02 -2.22e-01 -0.6176 b_1_4 1.53e+03 1.63e+05 9.87e+02 -1.76e+01 1.55e+03 4.53e+00 -60.5660 b_2_2 -8.48e+01 9.87e+02 2.33e+02 -3.65e+00 -1.69e+02 1.56e-01 1.4021 b_2_3 -8.32e-02 -1.76e+01 -3.65e+00 1.66e-01 1.60e+00 -2.07e-03 -0.0899 b_2_4 1.01e+02 1.55e+03 -1.69e+02 1.60e+00 1.67e+02 -5.80e-02 -1.3807 b_3_3 -2.22e-01 4.53e+00 1.56e-01 -2.07e-03 -5.80e-02 6.19e-04 -0.0022 b_3_4 -6.18e-01 -6.06e+01 1.40e+00 -8.99e-02 -1.38e+00 -2.20e-03 0.0971 b_4_4 -7.19e+01 -2.31e+03 8.05e+01 1.74e-01 -1.10e+02 8.29e-03 0.4406 b_4_4 a_0 8.31e+04 a_1 -8.74e+04 a_2 -5.40e+03 a_3 9.41e+01 a_4 5.21e+03 b_1_1 5.26e+04 b_1_2 2.81e+03 b_1_3 -7.19e+01 b_1_4 -2.31e+03 b_2_2 8.05e+01 b_2_3 1.74e-01 b_2_4 -1.10e+02 b_3_3 8.29e-03 b_3_4 4.41e-01 b_4_4 1.01e+02 $r2 [1] 0.997 $r2bar [1] 0.99 $nObs [1] 20 $yName [1] "qOutput" $xNames [1] "qLabor" "land" "qVarInput" "time" $regScale [1] 1 $model.matrix (Intercept) a_1 a_2 a_3 a_4 b_1_1 b_1_2 b_1_3 b_1_4 b_2_2 b_2_3 b_2_4 1 1 1.44 23.4 557 1 1.04 33.7 801 1.44 274 13023 23.4 2 1 1.45 24.2 607 2 1.05 35.1 880 2.90 293 14681 48.4 3 1 1.44 24.7 608 3 1.04 35.6 875 4.32 305 15009 74.1 4 1 1.48 24.9 654 4 1.10 36.9 968 5.92 310 16290 99.6 5 1 1.48 24.9 648 5 1.10 36.9 958 7.40 310 16132 124.5 6 1 1.47 25.2 657 6 1.08 37.1 966 8.82 318 16576 151.4 7 1 1.45 25.9 673 7 1.05 37.6 977 10.15 336 17449 181.4 8 1 1.49 26.0 648 8 1.11 38.7 965 11.92 337 16826 207.8 9 1 1.48 25.2 640 9 1.10 37.3 947 13.32 317 16115 226.6 10 1 1.53 26.1 648 10 1.17 39.9 992 15.30 340 16906 260.7 11 1 1.53 26.8 682 11 1.17 41.0 1044 16.83 358 18267 294.5 12 1 1.69 29.9 761 12 1.43 50.5 1286 20.28 446 22730 358.4 13 1 1.70 31.1 801 13 1.44 52.9 1362 22.10 484 24927 404.4 14 1 1.67 32.2 798 14 1.39 53.8 1332 23.38 518 25681 450.7 15 1 1.65 31.5 737 15 1.36 52.0 1216 24.75 497 23230 472.8 16 1 1.61 31.9 719 16 1.30 51.3 1157 25.76 508 22914 510.1 17 1 1.62 33.5 701 17 1.31 54.3 1135 27.54 562 23501 570.2 18 1 1.62 35.1 702 18 1.31 56.8 1137 29.16 615 24605 631.1 19 1 1.62 37.3 731 19 1.31 60.4 1185 30.78 696 27283 708.9 20 1 1.62 39.4 770 20 1.31 63.8 1248 32.40 776 30337 787.8 b_3_3 b_3_4 b_4_4 1 154872 557 0.5 2 184006 1213 2.0 3 184781 1824 4.5 4 213832 2616 8.0 5 209710 3238 12.5 6 215817 3942 18.0 7 226774 4714 24.5 8 209890 5183 32.0 9 204785 5760 40.5 10 210262 6485 50.0 11 232820 7506 60.5 12 289533 9132 72.0 13 321010 10416 84.5 14 318247 11169 98.0 15 271572 11055 112.5 16 258318 11500 128.0 17 245488 11912 144.5 18 246256 12632 162.0 19 267367 13894 180.5 20 296583 15403 200.0 attr(,"assign") [1] 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 attr(,"class") [1] "quadFuncEst" > > ## calculating elasticities > estElaFit <- quadFuncEla( + xNames = c( "qLabor", "land", "qVarInput", "time" ), + data = germanFarms, coef = coef( estResult ) ) > all.equal( estElaFit, elas( estResult ) ) [1] TRUE > print( estElaFit ) qLabor land qVarInput time 1 3.907 1.75 -0.5199 0.0335 2 3.210 1.35 -0.6738 0.0928 3 3.163 1.31 -0.4316 0.1091 4 1.961 1.15 -0.5131 0.1538 5 1.755 1.27 -0.1855 0.1171 6 1.701 1.21 0.0163 0.1116 7 1.825 1.02 0.1424 0.1367 8 1.277 1.47 0.3692 -0.0444 9 1.148 1.74 0.8830 -0.2021 10 0.455 1.88 0.7543 -0.2965 11 0.258 1.61 0.7394 -0.2447 12 -1.541 1.60 -0.3078 -0.0827 13 -1.689 1.37 -0.4775 0.0147 14 -1.073 1.20 -0.3044 -0.0249 15 -0.854 1.72 0.3115 -0.4342 16 -0.347 1.76 0.6310 -0.6121 17 -0.103 1.92 0.5887 -0.7804 18 0.108 1.88 0.5428 -0.8420 19 0.314 1.52 0.3074 -0.6823 20 0.427 1.15 0.0889 -0.5061 > estElaObs <- quadFuncEla( + xNames = c( "qLabor", "land", "qVarInput", "time" ), + data = germanFarms, coef = coef( estResult ), + yName = "qOutput" ) > all.equal( estElaObs, elas( estResult, yObs = TRUE ) ) [1] TRUE > print( estElaObs ) qLabor land qVarInput time 1 3.876 1.74 -0.5159 0.0332 2 3.341 1.40 -0.7014 0.0966 3 3.099 1.29 -0.4228 0.1069 4 1.906 1.12 -0.4989 0.1495 5 1.757 1.27 -0.1856 0.1172 6 1.732 1.23 0.0166 0.1136 7 1.826 1.02 0.1425 0.1368 8 1.282 1.47 0.3704 -0.0446 9 1.136 1.72 0.8735 -0.1999 10 0.458 1.89 0.7589 -0.2983 11 0.259 1.61 0.7410 -0.2452 12 -1.538 1.60 -0.3072 -0.0826 13 -1.696 1.37 -0.4794 0.0147 14 -1.073 1.20 -0.3042 -0.0249 15 -0.850 1.71 0.3100 -0.4321 16 -0.346 1.76 0.6283 -0.6095 17 -0.104 1.94 0.5961 -0.7901 18 0.107 1.87 0.5386 -0.8354 19 0.315 1.52 0.3079 -0.6834 20 0.427 1.15 0.0888 -0.5060 > max( abs( estElaFit - estElaObs ) ) [1] 0.131 > # only at mean values > estElaMeanFit <- elas( estResult, data = germanFarmsMeans ) > print( estElaMeanFit ) qLabor land qVarInput time 1 0.56 1.35 0.118 -0.0898 > estElaMeanObs <- elas( estResult, data = germanFarmsMeans, yObs = TRUE ) > print( estElaMeanObs ) qLabor land qVarInput time 1 0.616 1.49 0.13 -0.0989 > print( estElaMeanFit - estElaMeanObs ) qLabor land qVarInput time 1 -0.0566 -0.136 -0.012 0.00908 > # with a shifter > estElaShifterFit <- quadFuncEla( + xNames = c( "qLabor", "land", "qVarInput" ), + data = germanFarms, coef = coef( estResultShifter ), + shifterNames = "time" ) > all.equal( estElaShifterFit, elas( estResultShifter ) ) [1] TRUE > print( estElaShifterFit ) qLabor land qVarInput 1 2.538 1.132 0.367 2 1.688 1.072 0.590 3 1.607 1.086 0.636 4 0.949 0.957 0.685 5 1.005 0.951 0.647 6 0.887 0.961 0.730 7 0.689 0.983 0.884 8 0.823 0.903 0.586 9 1.012 0.921 0.587 10 0.703 0.812 0.425 11 0.336 0.807 0.581 12 -0.906 0.606 0.399 13 -1.293 0.605 0.558 14 -1.208 0.632 0.635 15 -0.702 0.637 0.425 16 -0.493 0.677 0.469 17 -0.497 0.658 0.374 18 -0.592 0.655 0.385 19 -0.884 0.659 0.505 20 -1.175 0.661 0.651 > estElaShifterObs <- quadFuncEla( + xNames = c( "qLabor", "land", "qVarInput" ), + data = germanFarms, coef = coef( estResultShifter ), + yName = "qOutput" ) > all.equal( estElaShifterObs, elas( estResultShifter, yObs = TRUE ) ) [1] TRUE > print( estElaShifterObs ) qLabor land qVarInput 1 2.490 1.111 0.360 2 1.803 1.145 0.630 3 1.578 1.066 0.624 4 0.940 0.949 0.679 5 0.992 0.940 0.639 6 0.892 0.966 0.734 7 0.692 0.987 0.887 8 0.796 0.874 0.567 9 1.011 0.920 0.586 10 0.713 0.824 0.431 11 0.338 0.812 0.584 12 -0.898 0.600 0.395 13 -1.317 0.616 0.568 14 -1.196 0.626 0.629 15 -0.691 0.626 0.418 16 -0.499 0.685 0.475 17 -0.507 0.671 0.381 18 -0.590 0.652 0.384 19 -0.874 0.651 0.499 20 -1.181 0.664 0.654 > max( abs( estElaShifterFit - estElaShifterObs ) ) [1] 0.115 > estElaShifterObs2 <- quadFuncEla( + xNames = c( "qLabor", "land", "qVarInput" ), + data = germanFarms, coef = coef( estResultShifter ), + yName = "qOutput", shifterNames = "time" ) > all.equal( estElaShifterObs, estElaShifterObs2 ) [1] TRUE > # only at mean values > estElaShifterMeanFit <- elas( estResultShifter, data = germanFarmsMeans ) > print( estElaShifterMeanFit ) qLabor land qVarInput 1 0.0631 0.775 0.526 > estElaShifterMeanObs <- elas( estResultShifter, data = germanFarmsMeans, + yObs = TRUE ) > print( estElaShifterMeanObs ) qLabor land qVarInput 1 0.0653 0.802 0.544 > print( estElaShifterMeanFit - estElaShifterMeanObs ) qLabor land qVarInput 1 -0.00216 -0.0265 -0.018 > > > ################ imposing homogeneity ##################### > ## linear functions with homogeneity imposed > estResultLinHom <- quadFuncEst( yName = "qOutput", + xNames = c( "time", "qLabor", "land", "qVarInput" ), + data = germanFarms, linear = TRUE, + homWeights = c( qLabor = 0.2, land = 0.5, qVarInput = 0.3 ) ) > coef( estResultLinHom ) a_0 a_1 a_2 a_3 a_4 b_1_1 b_1_2 b_1_3 b_1_4 b_2_2 -204866 35 -169744 107691 62053 0 0 0 0 0 b_2_3 b_2_4 b_3_3 b_3_4 b_4_4 0 0 0 0 0 > all.equal( sum( coef( estResultLinHom )[3:4] ), - coef( estResultLinHom )[5], + check.attributes = FALSE ) [1] TRUE > vcov( estResultLinHom ) a_0 a_1 a_2 a_3 a_4 b_1_1 b_1_2 b_1_3 b_1_4 a_0 2.85e+09 197398.2 2.34e+09 -1.48e+09 -8.60e+08 0 0 0 0 a_1 1.97e+05 23.5 1.65e+05 -1.06e+05 -5.95e+04 0 0 0 0 a_2 2.34e+09 165444.1 1.93e+09 -1.22e+09 -7.07e+08 0 0 0 0 a_3 -1.48e+09 -105986.7 -1.22e+09 7.74e+08 4.47e+08 0 0 0 0 a_4 -8.60e+08 -59457.3 -7.07e+08 4.47e+08 2.59e+08 0 0 0 0 b_1_1 0.00e+00 0.0 0.00e+00 0.00e+00 0.00e+00 0 0 0 0 b_1_2 0.00e+00 0.0 0.00e+00 0.00e+00 0.00e+00 0 0 0 0 b_1_3 0.00e+00 0.0 0.00e+00 0.00e+00 0.00e+00 0 0 0 0 b_1_4 0.00e+00 0.0 0.00e+00 0.00e+00 0.00e+00 0 0 0 0 b_2_2 0.00e+00 0.0 0.00e+00 0.00e+00 0.00e+00 0 0 0 0 b_2_3 0.00e+00 0.0 0.00e+00 0.00e+00 0.00e+00 0 0 0 0 b_2_4 0.00e+00 0.0 0.00e+00 0.00e+00 0.00e+00 0 0 0 0 b_3_3 0.00e+00 0.0 0.00e+00 0.00e+00 0.00e+00 0 0 0 0 b_3_4 0.00e+00 0.0 0.00e+00 0.00e+00 0.00e+00 0 0 0 0 b_4_4 0.00e+00 0.0 0.00e+00 0.00e+00 0.00e+00 0 0 0 0 b_2_2 b_2_3 b_2_4 b_3_3 b_3_4 b_4_4 a_0 0 0 0 0 0 0 a_1 0 0 0 0 0 0 a_2 0 0 0 0 0 0 a_3 0 0 0 0 0 0 a_4 0 0 0 0 0 0 b_1_1 0 0 0 0 0 0 b_1_2 0 0 0 0 0 0 b_1_3 0 0 0 0 0 0 b_1_4 0 0 0 0 0 0 b_2_2 0 0 0 0 0 0 b_2_3 0 0 0 0 0 0 b_2_4 0 0 0 0 0 0 b_3_3 0 0 0 0 0 0 b_3_4 0 0 0 0 0 0 b_4_4 0 0 0 0 0 0 > all.equal( rowSums( vcov( estResultLinHom )[ , 3:4 ] ), + - vcov( estResultLinHom )[ , 5 ] ) [1] TRUE > all.equal( colSums( vcov( estResultLinHom )[ 3:4, ] ), + - vcov( estResultLinHom )[ 5, ] ) [1] TRUE > # different order of weights > estResultLinHom2 <- quadFuncEst( yName = "qOutput", + xNames = c( "time", "qLabor", "land", "qVarInput" ), + data = germanFarms, linear = TRUE, + homWeights = c( qVarInput = 0.3, land = 0.5, qLabor = 0.2 ) ) > all.equal( coef( estResultLinHom ), coef( estResultLinHom2 ) ) [1] TRUE > all.equal( vcov( estResultLinHom ), vcov( estResultLinHom2 ) ) [1] TRUE > # different order of xNames > estResultLinHom3 <- quadFuncEst( yName = "qOutput", + xNames = c( "qLabor", "land", "qVarInput", "time" ), + data = germanFarms, linear = TRUE, + homWeights = c( qLabor = 0.2, land = 0.5, qVarInput = 0.3 ) ) > all.equal( coef( estResultLinHom ), + coef( estResultLinHom3 )[ c( 1, 5, 2:4, 6:15 ) ], + check.attributes = FALSE ) [1] TRUE > all.equal( vcov( estResultLinHom ), + vcov( estResultLinHom3 )[ c( 1, 5, 2:4, 6:15 ), c( 1, 5, 2:4, 6:15 ) ], + check.attributes = FALSE ) [1] TRUE > # homogenous in all variables > estResultLinHom4 <- quadFuncEst( yName = "qOutput", + xNames = c( "time", "qLabor", "land", "qVarInput" ), + data = germanFarms, linear = TRUE, + homWeights = c( qLabor = 0.2, land = 0.5, qVarInput = 0.3, time = 0 ) ) > coef( estResultLinHom4 ) a_0 a_1 a_2 a_3 a_4 b_1_1 b_1_2 b_1_3 b_1_4 b_2_2 -281898 6871 -240607 148456 85281 0 0 0 0 0 b_2_3 b_2_4 b_3_3 b_3_4 b_4_4 0 0 0 0 0 > all.equal( sum( coef( estResultLinHom4 )[2:4] ), + - coef( estResultLinHom4 )[5], check.attributes = FALSE ) [1] TRUE > vcov( estResultLinHom4 ) a_0 a_1 a_2 a_3 a_4 b_1_1 b_1_2 b_1_3 b_1_4 a_0 4.02e+09 62725525 3.24e+09 -2.08e+09 -1.21e+09 0 0 0 0 a_1 6.27e+07 1980508 5.08e+07 -3.38e+07 -1.89e+07 0 0 0 0 a_2 3.24e+09 50755181 2.60e+09 -1.68e+09 -9.76e+08 0 0 0 0 a_3 -2.08e+09 -33849741 -1.68e+09 1.08e+09 6.29e+08 0 0 0 0 a_4 -1.21e+09 -18885947 -9.76e+08 6.29e+08 3.66e+08 0 0 0 0 b_1_1 0.00e+00 0 0.00e+00 0.00e+00 0.00e+00 0 0 0 0 b_1_2 0.00e+00 0 0.00e+00 0.00e+00 0.00e+00 0 0 0 0 b_1_3 0.00e+00 0 0.00e+00 0.00e+00 0.00e+00 0 0 0 0 b_1_4 0.00e+00 0 0.00e+00 0.00e+00 0.00e+00 0 0 0 0 b_2_2 0.00e+00 0 0.00e+00 0.00e+00 0.00e+00 0 0 0 0 b_2_3 0.00e+00 0 0.00e+00 0.00e+00 0.00e+00 0 0 0 0 b_2_4 0.00e+00 0 0.00e+00 0.00e+00 0.00e+00 0 0 0 0 b_3_3 0.00e+00 0 0.00e+00 0.00e+00 0.00e+00 0 0 0 0 b_3_4 0.00e+00 0 0.00e+00 0.00e+00 0.00e+00 0 0 0 0 b_4_4 0.00e+00 0 0.00e+00 0.00e+00 0.00e+00 0 0 0 0 b_2_2 b_2_3 b_2_4 b_3_3 b_3_4 b_4_4 a_0 0 0 0 0 0 0 a_1 0 0 0 0 0 0 a_2 0 0 0 0 0 0 a_3 0 0 0 0 0 0 a_4 0 0 0 0 0 0 b_1_1 0 0 0 0 0 0 b_1_2 0 0 0 0 0 0 b_1_3 0 0 0 0 0 0 b_1_4 0 0 0 0 0 0 b_2_2 0 0 0 0 0 0 b_2_3 0 0 0 0 0 0 b_2_4 0 0 0 0 0 0 b_3_3 0 0 0 0 0 0 b_3_4 0 0 0 0 0 0 b_4_4 0 0 0 0 0 0 > all.equal( rowSums( vcov( estResultLinHom4 )[ , 2:4 ] ), + - vcov( estResultLinHom4 )[ , 5 ] ) [1] TRUE > all.equal( colSums( vcov( estResultLinHom4 )[ 2:4, ] ), + - vcov( estResultLinHom4 )[ 5, ] ) [1] TRUE > > ## computing fitted values of linear functions with homogeneity imposed > fitted <- quadFuncCalc( + xNames = c( "time", "qLabor", "land", "qVarInput" ), + coef = coef( estResultLinHom ), data = germanFarms, + homWeights = c( qLabor = 0.2, land = 0.5, qVarInput = 0.3 ) ) > all.equal( estResultLinHom$fitted, fitted ) [1] TRUE > all.equal( fitted, predict( estResultLinHom ) ) [1] TRUE > all.equal( fitted, predict( estResultLinHom, newdata = germanFarms ) ) [1] TRUE > fitted <- quadFuncCalc( + xNames = c( "time", "qLabor", "land", "qVarInput" ), + coef = coef( estResultLinHom ), data = germanFarms, + homWeights = c( qVarInput = 0.3, land = 0.5, qLabor = 0.2 ) ) > all.equal( estResultLinHom$fitted, fitted ) [1] TRUE > fitted <- quadFuncCalc( + xNames = c( "time", "qLabor", "land", "qVarInput" ), + coef = coef( estResultLinHom2 ), data = germanFarms, + homWeights = c( qVarInput = 0.3, land = 0.5, qLabor = 0.2 ) ) > all.equal( estResultLinHom2$fitted, fitted ) [1] TRUE > all.equal( fitted, predict( estResultLinHom2 ) ) [1] TRUE > all.equal( fitted, predict( estResultLinHom2, newdata = germanFarms ) ) [1] TRUE > fitted <- quadFuncCalc( + xNames = c( "qLabor", "land", "qVarInput", "time" ), + coef = coef( estResultLinHom3 ), data = germanFarms, + homWeights = c( qLabor = 0.2, land = 0.5, qVarInput = 0.3 ) ) > all.equal( estResultLinHom3$fitted, fitted ) [1] TRUE > all.equal( fitted, predict( estResultLinHom3 ) ) [1] TRUE > all.equal( fitted, predict( estResultLinHom3, newdata = germanFarms ) ) [1] TRUE > fitted <- quadFuncCalc( + xNames = c( "time", "qLabor", "land", "qVarInput" ), + coef = coef( estResultLinHom4 ), data = germanFarms, + homWeights = c( qLabor = 0.2, land = 0.5, qVarInput = 0.3, time = 0 ) ) > all.equal( estResultLinHom4$fitted, fitted ) [1] TRUE > all.equal( fitted, predict( estResultLinHom4 ) ) [1] TRUE > all.equal( fitted, predict( estResultLinHom4, newdata = germanFarms ) ) [1] TRUE > > ## derivatives of linear functions with homogeneity imposed > estResultLinHomDeriv <- quadFuncDeriv( + xNames = c( "time", "qLabor", "land", "qVarInput" ), + coef = coef( estResultLinHom ), data = germanFarms, + homWeights = c( qLabor = 0.2, land = 0.5, qVarInput = 0.3 ) ) > print( estResultLinHomDeriv ) time qLabor land qVarInput 1 35 -1178 27.0 1.912 2 35 -1085 24.6 1.610 3 35 -1082 24.5 1.567 4 35 -1009 22.8 1.416 5 35 -1019 23.0 1.443 6 35 -1004 22.6 1.378 7 35 -980 21.9 1.266 8 35 -1016 22.9 1.417 9 35 -1029 23.3 1.465 10 35 -1015 23.0 1.470 11 35 -966 21.7 1.313 12 35 -866 19.5 1.159 13 35 -823 18.4 1.033 14 35 -825 18.3 0.987 15 35 -889 19.9 1.140 16 35 -910 20.3 1.137 17 35 -928 20.7 1.154 18 35 -924 20.5 1.106 19 35 -885 19.5 0.965 20 35 -840 18.4 0.827 > all.equal( estResultLinHomDeriv$qLabor * germanFarms$qLabor + + estResultLinHomDeriv$land * germanFarms$land, + - estResultLinHomDeriv$qVarInput * germanFarms$qVarInput ) [1] TRUE > # different order of weights (different from order used for estimation) > estResultLinHom1Deriv <- quadFuncDeriv( + xNames = c( "time", "qLabor", "land", "qVarInput" ), + coef = coef( estResultLinHom ), data = germanFarms, + homWeights = c( qVarInput = 0.3, land = 0.5, qLabor = 0.2 ) ) > all.equal( estResultLinHomDeriv, estResultLinHom1Deriv ) [1] TRUE > # different order of weights (same order as used for estimation) > estResultLinHom2Deriv <- quadFuncDeriv( + xNames = c( "time", "qLabor", "land", "qVarInput" ), + coef = coef( estResultLinHom2 ), data = germanFarms, + homWeights = c( qVarInput = 0.3, land = 0.5, qLabor = 0.2 ) ) > all.equal( estResultLinHomDeriv, estResultLinHom2Deriv ) [1] TRUE > # different order of independent variables > estResultLinHom3Deriv <- quadFuncDeriv( + xNames = c( "qLabor", "land", "qVarInput", "time" ), + coef = coef( estResultLinHom3 ), data = germanFarms, + homWeights = c( qLabor = 0.2, land = 0.5, qVarInput = 0.3 ) ) > all.equal( estResultLinHomDeriv, + estResultLinHom3Deriv[ , c( 4, 1, 2, 3 ) ] ) [1] TRUE > # homogenous in all independent variables > estResultLinHom4Deriv <- quadFuncDeriv( + xNames = c( "time", "qLabor", "land", "qVarInput" ), + coef = coef( estResultLinHom4 ), data = germanFarms, + homWeights = c( qLabor = 0.2, land = 0.5, qVarInput = 0.3, time = 0 ) ) > print( estResultLinHom4Deriv ) time qLabor land qVarInput 1 38.4 -1661 39.6 2.563 2 35.3 -1529 36.0 2.101 3 35.2 -1524 35.7 1.985 4 32.9 -1423 33.2 1.754 5 33.2 -1436 33.4 1.739 6 32.7 -1415 32.8 1.609 7 31.9 -1381 31.7 1.420 8 33.1 -1431 33.0 1.559 9 33.5 -1451 33.5 1.567 10 33.1 -1430 33.0 1.538 11 31.5 -1361 31.1 1.323 12 28.2 -1221 27.9 1.170 13 26.8 -1160 26.3 1.004 14 26.9 -1162 26.2 0.904 15 29.0 -1253 28.3 1.005 16 29.6 -1282 28.8 0.934 17 30.2 -1308 29.3 0.889 18 30.1 -1302 29.0 0.785 19 28.8 -1248 27.5 0.610 20 27.4 -1184 25.9 0.454 > all.equal( estResultLinHom4Deriv$qLabor * germanFarms$qLabor + + estResultLinHom4Deriv$land * germanFarms$land + + estResultLinHom4Deriv$qVarInput * germanFarms$qVarInput, + - estResultLinHom4Deriv$time * germanFarms$time ) [1] TRUE > > ## quadratic functions with homogeneity imposed > estResultHom <- quadFuncEst( yName = "qOutput", + xNames = c( "time", "qLabor", "land", "qVarInput" ), + data = germanFarms, + homWeights = c( qLabor = 0.7, land = 0.1, qVarInput = 0.2 ) ) > coef( estResultHom ) a_0 a_1 a_2 a_3 a_4 b_1_1 b_1_2 b_1_3 -1.01e+08 -3.36e+04 -6.65e+07 2.60e+07 4.06e+07 -1.53e+00 -1.08e+04 4.02e+03 b_1_4 b_2_2 b_2_3 b_2_4 b_3_3 b_3_4 b_4_4 6.78e+03 -2.19e+07 8.51e+06 1.34e+07 -3.28e+06 -5.23e+06 -8.17e+06 > all.equal( sum( coef( estResultHom )[3:4] ), - coef( estResultHom )[5], + check.attributes = FALSE ) # a_2:4 [1] TRUE > all.equal( sum( coef( estResultHom )[7:8] ), - coef( estResultHom )[9], + check.attributes = FALSE ) # b_1_2:4 [1] TRUE > all.equal( sum( coef( estResultHom )[10:11] ), - coef( estResultHom )[12], + check.attributes = FALSE ) # b_2_2:4 [1] TRUE > all.equal( sum( coef( estResultHom )[13:14] ), - coef( estResultHom )[11], + check.attributes = FALSE ) # b_3_2:4 [1] TRUE > all.equal( sum( coef( estResultHom )[14:15] ), - coef( estResultHom )[12], + check.attributes = FALSE ) # b_4_2:4 [1] TRUE > vcov( estResultHom ) a_0 a_1 a_2 a_3 a_4 b_1_1 b_1_2 a_0 1.34e+16 3.83e+12 8.72e+15 -3.32e+15 -5.40e+15 6.19e+08 1.27e+12 a_1 3.83e+12 1.30e+09 2.54e+12 -9.90e+11 -1.55e+12 2.36e+05 4.41e+08 a_2 8.72e+15 2.54e+12 5.68e+15 -2.17e+15 -3.52e+15 4.13e+08 8.42e+11 a_3 -3.32e+15 -9.90e+11 -2.17e+15 8.32e+14 1.34e+15 -1.64e+08 -3.30e+11 a_4 -5.40e+15 -1.55e+12 -3.52e+15 1.34e+15 2.18e+15 -2.49e+08 -5.12e+11 b_1_1 6.19e+08 2.36e+05 4.13e+08 -1.64e+08 -2.49e+08 5.17e+01 8.06e+04 b_1_2 1.27e+12 4.41e+08 8.42e+11 -3.30e+11 -5.12e+11 8.06e+04 1.50e+08 b_1_3 -4.99e+11 -1.79e+08 -3.32e+11 1.31e+11 2.01e+11 -3.31e+04 -6.12e+07 b_1_4 -7.72e+11 -2.62e+08 -5.11e+11 1.99e+11 3.11e+11 -4.75e+04 -8.88e+07 b_2_2 2.85e+15 8.42e+11 1.86e+15 -7.11e+14 -1.15e+15 1.39e+08 2.80e+11 b_2_3 -1.09e+15 -3.31e+11 -7.13e+14 2.74e+14 4.38e+14 -5.54e+07 -1.11e+11 b_2_4 -1.76e+15 -5.11e+11 -1.15e+15 4.37e+14 7.09e+14 -8.32e+07 -1.70e+11 b_3_3 4.19e+14 1.32e+11 2.76e+14 -1.07e+14 -1.69e+14 2.25e+07 4.43e+10 b_3_4 6.68e+14 1.99e+11 4.37e+14 -1.68e+14 -2.69e+14 3.29e+07 6.65e+10 b_4_4 1.09e+15 3.11e+11 7.09e+14 -2.70e+14 -4.39e+14 5.02e+07 1.03e+11 b_1_3 b_1_4 b_2_2 b_2_3 b_2_4 b_3_3 b_3_4 a_0 -4.99e+11 -7.72e+11 2.85e+15 -1.09e+15 -1.76e+15 4.19e+14 6.68e+14 a_1 -1.79e+08 -2.62e+08 8.42e+11 -3.31e+11 -5.11e+11 1.32e+11 1.99e+11 a_2 -3.32e+11 -5.11e+11 1.86e+15 -7.13e+14 -1.15e+15 2.76e+14 4.37e+14 a_3 1.31e+11 1.99e+11 -7.11e+14 2.74e+14 4.37e+14 -1.07e+14 -1.68e+14 a_4 2.01e+11 3.11e+11 -1.15e+15 4.38e+14 7.09e+14 -1.69e+14 -2.69e+14 b_1_1 -3.31e+04 -4.75e+04 1.39e+08 -5.54e+07 -8.32e+07 2.25e+07 3.29e+07 b_1_2 -6.12e+07 -8.88e+07 2.80e+11 -1.11e+11 -1.70e+11 4.43e+10 6.65e+10 b_1_3 2.52e+07 3.60e+07 -1.11e+11 4.41e+10 6.68e+10 -1.78e+10 -2.63e+10 b_1_4 3.60e+07 5.28e+07 -1.69e+11 6.67e+10 1.03e+11 -2.65e+10 -4.01e+10 b_2_2 -1.11e+11 -1.69e+11 6.09e+14 -2.34e+14 -3.75e+14 9.09e+13 1.43e+14 b_2_3 4.41e+10 6.67e+10 -2.34e+14 9.07e+13 1.44e+14 -3.54e+13 -5.52e+13 b_2_4 6.68e+10 1.03e+11 -3.75e+14 1.44e+14 2.31e+14 -5.55e+13 -8.81e+13 b_3_3 -1.78e+10 -2.65e+10 9.09e+13 -3.54e+13 -5.55e+13 1.39e+13 2.15e+13 b_3_4 -2.63e+10 -4.01e+10 1.43e+14 -5.52e+13 -8.81e+13 2.15e+13 3.38e+13 b_4_4 -4.05e+10 -6.27e+10 2.31e+14 -8.84e+13 -1.43e+14 3.40e+13 5.43e+13 b_4_4 a_0 1.09e+15 a_1 3.11e+11 a_2 7.09e+14 a_3 -2.70e+14 a_4 -4.39e+14 b_1_1 5.02e+07 b_1_2 1.03e+11 b_1_3 -4.05e+10 b_1_4 -6.27e+10 b_2_2 2.31e+14 b_2_3 -8.84e+13 b_2_4 -1.43e+14 b_3_3 3.40e+13 b_3_4 5.43e+13 b_4_4 8.86e+13 > all.equal( rowSums( vcov( estResultHom )[ , 3:4 ] ), + - vcov( estResultHom )[ , 5 ] ) # a_2:4 [1] TRUE > all.equal( rowSums( vcov( estResultHom )[ , 7:8 ] ), + - vcov( estResultHom )[ , 9 ] ) # b_1_2:4 [1] TRUE > all.equal( rowSums( vcov( estResultHom )[ , 10:11 ] ), + - vcov( estResultHom )[ , 12 ] ) # b_2_2:4 [1] TRUE > all.equal( rowSums( vcov( estResultHom )[ , 13:14 ] ), + - vcov( estResultHom )[ , 11 ] ) # b_3_2:4 [1] TRUE > all.equal( rowSums( vcov( estResultHom )[ , 14:15 ] ), + - vcov( estResultHom )[ , 12 ] ) # b_4_2:4 [1] TRUE > all.equal( colSums( vcov( estResultHom )[ 3:4, ] ), + - vcov( estResultHom )[ 5, ] ) # a_2:4 [1] TRUE > all.equal( colSums( vcov( estResultHom )[ 7:8, ] ), + - vcov( estResultHom )[ 9, ] ) # b_1_2:4 [1] TRUE > all.equal( colSums( vcov( estResultHom )[ 10:11, ] ), + - vcov( estResultHom )[ 12, ] ) # b_2_2:4 [1] TRUE > all.equal( colSums( vcov( estResultHom )[ 13:14, ] ), + - vcov( estResultHom )[ 11, ] ) # b_3_2:4 [1] TRUE > all.equal( colSums( vcov( estResultHom )[ 14:15, ] ), + - vcov( estResultHom )[ 12, ] ) # b_4_2:4 [1] TRUE > # different order of weights > estResultHom2 <- quadFuncEst( yName = "qOutput", + xNames = c( "time", "qLabor", "land", "qVarInput" ), + data = germanFarms, + homWeights = c( qVarInput = 0.2, land = 0.1, qLabor = 0.7 ) ) > all.equal( coef( estResultHom ), coef( estResultHom2 ) ) [1] TRUE > all.equal( vcov( estResultHom ), vcov( estResultHom2 ) ) [1] TRUE > # different order of xNames > estResultHom3 <- quadFuncEst( yName = "qOutput", + xNames = c( "qLabor", "land", "qVarInput", "time" ), + data = germanFarms, + homWeights = c( qLabor = 0.7, land = 0.1, qVarInput = 0.2 ) ) > coefOrderHom3 <- c( 1, 5, 2:4, 15, 9, 12, 14, 6:8, 10, 11, 13 ) > all.equal( coef( estResultHom ), coef( estResultHom3 )[ coefOrderHom3 ], + check.attributes = FALSE ) [1] TRUE > all.equal( vcov( estResultHom ), + vcov( estResultHom3 )[ coefOrderHom3, coefOrderHom3 ], + check.attributes = FALSE ) [1] TRUE > # homogenous in all variables > estResultHom4 <- quadFuncEst( yName = "qOutput", + xNames = c( "time", "qLabor", "land", "qVarInput" ), + data = germanFarms, + homWeights = c( qLabor = 0.7, land = 0.1, qVarInput = 0.2, time = 0 ) ) > coef( estResultHom4 ) a_0 a_1 a_2 a_3 a_4 b_1_1 b_1_2 b_1_3 -1.33e+08 -8.59e+06 -7.99e+07 3.48e+07 5.37e+07 -1.33e+05 -2.67e+06 1.07e+06 b_1_4 b_2_2 b_2_3 b_2_4 b_3_3 b_3_4 b_4_4 1.73e+06 -2.39e+07 1.05e+07 1.61e+07 -4.58e+06 -7.00e+06 -1.08e+07 > all.equal( sum( coef( estResultHom4 )[2:4] ), - coef( estResultHom4 )[5], + check.attributes = FALSE ) # a_1:4 [1] TRUE > all.equal( sum( coef( estResultHom4 )[6:8] ), - coef( estResultHom4 )[9], + check.attributes = FALSE ) # b_1_1:4 [1] TRUE > all.equal( sum( coef( estResultHom4 )[10:12] ), - coef( estResultHom4 )[7], + check.attributes = FALSE ) # b_2_1:4 [1] TRUE > all.equal( sum( coef( estResultHom4 )[c(11,13,14)] ), - coef( estResultHom4 )[8], + check.attributes = FALSE ) # b_3_1:4 [1] TRUE > all.equal( sum( coef( estResultHom4 )[c(12,14,15)] ), - coef( estResultHom4 )[9], + check.attributes = FALSE ) # b_4_1:4 [1] TRUE > vcov( estResultHom4 ) a_0 a_1 a_2 a_3 a_4 b_1_1 b_1_2 a_0 1.23e+16 4.91e+14 7.41e+15 -2.94e+15 -4.97e+15 1.15e+13 1.48e+14 a_1 4.91e+14 2.88e+13 2.94e+14 -1.25e+14 -1.98e+14 8.54e+11 9.00e+12 a_2 7.41e+15 2.94e+14 4.47e+15 -1.77e+15 -2.99e+15 6.90e+12 8.88e+13 a_3 -2.94e+15 -1.25e+14 -1.77e+15 7.13e+14 1.19e+15 -3.12e+12 -3.80e+13 a_4 -4.97e+15 -1.98e+14 -2.99e+15 1.19e+15 2.00e+15 -4.63e+12 -5.98e+13 b_1_1 1.15e+13 8.54e+11 6.90e+12 -3.12e+12 -4.63e+12 3.58e+10 2.64e+11 b_1_2 1.48e+14 9.00e+12 8.88e+13 -3.80e+13 -5.98e+13 2.64e+11 2.83e+12 b_1_3 -6.08e+13 -4.07e+12 -3.64e+13 1.59e+13 2.45e+13 -1.28e+11 -1.29e+12 b_1_4 -9.89e+13 -5.78e+12 -5.93e+13 2.52e+13 3.99e+13 -1.72e+11 -1.81e+12 b_2_2 2.23e+15 8.83e+13 1.35e+15 -5.35e+14 -9.02e+14 2.08e+12 2.66e+13 b_2_3 -8.87e+14 -3.80e+13 -5.35e+14 2.16e+14 3.58e+14 -9.58e+11 -1.16e+13 b_2_4 -1.50e+15 -5.93e+13 -9.02e+14 3.58e+14 6.03e+14 -1.39e+12 -1.79e+13 b_3_3 3.55e+14 1.69e+13 2.14e+14 -8.78e+13 -1.43e+14 4.58e+11 5.18e+12 b_3_4 5.93e+14 2.52e+13 3.58e+14 -1.44e+14 -2.39e+14 6.28e+11 7.66e+12 b_4_4 1.00e+15 3.99e+13 6.03e+14 -2.39e+14 -4.04e+14 9.31e+11 1.20e+13 b_1_3 b_1_4 b_2_2 b_2_3 b_2_4 b_3_3 b_3_4 a_0 -6.08e+13 -9.89e+13 2.23e+15 -8.87e+14 -1.50e+15 3.55e+14 5.93e+14 a_1 -4.07e+12 -5.78e+12 8.83e+13 -3.80e+13 -5.93e+13 1.69e+13 2.52e+13 a_2 -3.64e+13 -5.93e+13 1.35e+15 -5.35e+14 -9.02e+14 2.14e+14 3.58e+14 a_3 1.59e+13 2.52e+13 -5.35e+14 2.16e+14 3.58e+14 -8.78e+13 -1.44e+14 a_4 2.45e+13 3.99e+13 -9.02e+14 3.58e+14 6.03e+14 -1.43e+14 -2.39e+14 b_1_1 -1.28e+11 -1.72e+11 2.08e+12 -9.58e+11 -1.39e+12 4.58e+11 6.28e+11 b_1_2 -1.29e+12 -1.81e+12 2.66e+13 -1.16e+13 -1.79e+13 5.18e+12 7.66e+12 b_1_3 5.99e+11 8.16e+11 -1.09e+13 4.85e+12 7.33e+12 -2.25e+12 -3.21e+12 b_1_4 8.16e+11 1.16e+12 -1.78e+13 7.66e+12 1.20e+13 -3.39e+12 -5.08e+12 b_2_2 -1.09e+13 -1.78e+13 4.07e+14 -1.62e+14 -2.72e+14 6.47e+13 1.08e+14 b_2_3 4.85e+12 7.66e+12 -1.62e+14 6.53e+13 1.08e+14 -2.67e+13 -4.35e+13 b_2_4 7.33e+12 1.20e+13 -2.72e+14 1.08e+14 1.82e+14 -4.32e+13 -7.21e+13 b_3_3 -2.25e+12 -3.39e+12 6.47e+13 -2.67e+13 -4.32e+13 1.12e+13 1.77e+13 b_3_4 -3.21e+12 -5.08e+12 1.08e+14 -4.35e+13 -7.21e+13 1.77e+13 2.90e+13 b_4_4 -4.94e+12 -8.04e+12 1.82e+14 -7.22e+13 -1.22e+14 2.89e+13 4.82e+13 b_4_4 a_0 1.00e+15 a_1 3.99e+13 a_2 6.03e+14 a_3 -2.39e+14 a_4 -4.04e+14 b_1_1 9.31e+11 b_1_2 1.20e+13 b_1_3 -4.94e+12 b_1_4 -8.04e+12 b_2_2 1.82e+14 b_2_3 -7.22e+13 b_2_4 -1.22e+14 b_3_3 2.89e+13 b_3_4 4.82e+13 b_4_4 8.16e+13 > all.equal( rowSums( vcov( estResultHom4 )[ , 2:4 ] ), + - vcov( estResultHom4 )[ , 5 ] ) # a_1:4 [1] TRUE > all.equal( rowSums( vcov( estResultHom4 )[ , 6:8 ] ), + - vcov( estResultHom4 )[ , 9 ] ) # b_1_1:4 [1] TRUE > all.equal( rowSums( vcov( estResultHom4 )[ , 10:12 ] ), + - vcov( estResultHom4 )[ , 7 ] ) # b_2_1:4 [1] TRUE > all.equal( rowSums( vcov( estResultHom4 )[ , c(11,13,14) ] ), + - vcov( estResultHom4 )[ , 8 ] ) # b_3_1:4 [1] TRUE > all.equal( rowSums( vcov( estResultHom4 )[ , c(12,14,15) ] ), + - vcov( estResultHom4 )[ , 9 ] ) # b_4_1:4 [1] TRUE > all.equal( colSums( vcov( estResultHom4 )[ 2:4, ] ), + - vcov( estResultHom4 )[ 5, ] ) # a_1:4 [1] TRUE > all.equal( colSums( vcov( estResultHom4 )[ 6:8, ] ), + - vcov( estResultHom4 )[ 9, ] ) # b_1_1:4 [1] TRUE > all.equal( colSums( vcov( estResultHom4 )[ 10:12, ] ), + - vcov( estResultHom4 )[ 7, ] ) # b_2_1:4 [1] TRUE > all.equal( colSums( vcov( estResultHom4 )[ c(11,13,14), ] ), + - vcov( estResultHom4 )[ 8, ] ) # b_3_1:4 [1] TRUE > all.equal( colSums( vcov( estResultHom4 )[ c(12,14,15), ] ), + - vcov( estResultHom4 )[ 9, ] ) # b_4_1:4 [1] TRUE > > ## computing fitted values of quadratic functions with homogeneity imposed > fitted <- quadFuncCalc( + xNames = c( "time", "qLabor", "land", "qVarInput" ), + coef = coef( estResultHom ), data = germanFarms, + homWeights = c( qLabor = 0.7, land = 0.1, qVarInput = 0.2 ) ) > all.equal( estResultHom$fitted, fitted ) [1] TRUE > all.equal( fitted, predict( estResultHom ) ) [1] TRUE > all.equal( fitted, predict( estResultHom, newdata = germanFarms ) ) [1] TRUE > fitted <- quadFuncCalc( + xNames = c( "time", "qLabor", "land", "qVarInput" ), + coef = coef( estResultHom ), data = germanFarms, + homWeights = c( qVarInput = 0.2, land = 0.1, qLabor = 0.7 ) ) > all.equal( estResultHom$fitted, fitted ) [1] TRUE > fitted <- quadFuncCalc( + xNames = c( "time", "qLabor", "land", "qVarInput" ), + coef = coef( estResultHom2 ), data = germanFarms, + homWeights = c( qVarInput = 0.2, land = 0.1, qLabor = 0.7 ) ) > all.equal( estResultHom2$fitted, fitted ) [1] TRUE > all.equal( fitted, predict( estResultHom2 ) ) [1] TRUE > all.equal( fitted, predict( estResultHom2, newdata = germanFarms ) ) [1] TRUE > fitted <- quadFuncCalc( + xNames = c( "qLabor", "land", "qVarInput", "time" ), + coef = coef( estResultHom3 ), data = germanFarms, + homWeights = c( qLabor = 0.7, land = 0.1, qVarInput = 0.2 ) ) > all.equal( estResultHom3$fitted, fitted ) [1] TRUE > all.equal( fitted, predict( estResultHom3 ) ) [1] TRUE > all.equal( fitted, predict( estResultHom3, newdata = germanFarms ) ) [1] TRUE > fitted <- quadFuncCalc( + xNames = c( "time", "qLabor", "land", "qVarInput" ), + coef = coef( estResultHom4 ), data = germanFarms, + homWeights = c( qLabor = 0.7, land = 0.1, qVarInput = 0.2, time = 0 ) ) > all.equal( estResultHom4$fitted, fitted ) [1] TRUE > all.equal( fitted, predict( estResultHom4 ) ) [1] TRUE > all.equal( fitted, predict( estResultHom4, newdata = germanFarms ) ) [1] TRUE > > ## derivatives of quadratic functions with homogeneity imposed > estResultHomDeriv <- quadFuncDeriv( + xNames = c( "time", "qLabor", "land", "qVarInput" ), + coef = coef( estResultHom ), data = germanFarms, + homWeights = c( qLabor = 0.7, land = 0.1, qVarInput = 0.2 ) ) > print( estResultHomDeriv ) time qLabor land qVarInput 1 5.57 -1158.7 26.07 1.902 2 30.04 -196.1 -7.96 0.786 3 34.40 -125.6 -10.41 0.720 4 42.46 -94.9 -18.44 0.917 5 38.42 -446.5 -10.24 1.414 6 44.69 -339.0 -15.22 1.343 7 57.50 71.6 -27.92 0.920 8 36.58 -982.6 1.84 2.186 9 30.55 -1519.1 12.35 3.027 10 23.94 -1935.7 24.14 3.597 11 38.90 -1416.0 6.83 2.907 12 41.00 -1343.6 6.32 2.736 13 54.71 -932.0 -6.17 2.217 14 62.76 -698.0 -11.59 1.929 15 44.58 -1522.6 11.80 2.904 16 47.90 -1493.2 11.61 2.830 17 45.49 -1589.5 19.15 2.758 18 51.17 -1385.5 16.05 2.396 19 68.46 -718.1 -1.17 1.651 20 85.95 -145.6 -17.41 1.196 > all.equal( estResultHomDeriv$qLabor * germanFarms$qLabor + + estResultHomDeriv$land * germanFarms$land, + - estResultHomDeriv$qVarInput * germanFarms$qVarInput ) [1] TRUE > # different order of weights (different from order used for estimation) > estResultHom1Deriv <- quadFuncDeriv( + xNames = c( "time", "qLabor", "land", "qVarInput" ), + coef = coef( estResultHom ), data = germanFarms, + homWeights = c( qVarInput = 0.2, land = 0.1, qLabor = 0.7 ) ) > all.equal( estResultHomDeriv, estResultHom1Deriv ) [1] TRUE > # different order of weights (same order as used for estimation) > estResultHom2Deriv <- quadFuncDeriv( + xNames = c( "time", "qLabor", "land", "qVarInput" ), + coef = coef( estResultHom2 ), data = germanFarms, + homWeights = c( qVarInput = 0.2, land = 0.1, qLabor = 0.7 ) ) > all.equal( estResultHomDeriv, estResultHom2Deriv ) [1] TRUE > # different order of independent variables > estResultHom3Deriv <- quadFuncDeriv( + xNames = c( "qLabor", "land", "qVarInput", "time" ), + coef = coef( estResultHom3 ), data = germanFarms, + homWeights = c( qLabor = 0.7, land = 0.1, qVarInput = 0.2 ) ) > all.equal( estResultHomDeriv, + estResultHom3Deriv[ , c( 4, 1, 2, 3 ) ] ) [1] TRUE > # homogenous in all independent variables > estResultHom4Deriv <- quadFuncDeriv( + xNames = c( "time", "qLabor", "land", "qVarInput" ), + coef = coef( estResultHom4 ), data = germanFarms, + homWeights = c( qLabor = 0.7, land = 0.1, qVarInput = 0.2, time = 0 ) ) > print( estResultHom4Deriv ) time qLabor land qVarInput 1 11.35 -606.9 7.66 1.2280 2 51.77 293.2 -19.61 -0.0891 3 56.28 192.5 -21.27 0.1301 4 60.85 77.0 -15.94 0.0607 5 49.44 -535.9 -1.18 0.8883 6 56.47 -529.6 -4.11 0.8270 7 75.52 -90.2 -19.94 0.1763 8 34.66 -1657.0 21.23 2.5316 9 16.83 -2579.7 46.59 3.8959 10 1.75 -3170.2 61.33 4.9871 11 26.67 -2422.8 39.55 3.4508 12 31.27 -1896.0 27.51 2.6378 13 50.76 -1241.4 8.37 1.4855 14 62.46 -991.2 -3.48 1.1191 15 31.21 -2455.0 31.00 3.5355 16 34.21 -2639.4 29.98 3.8210 17 29.73 -2955.8 30.48 4.6538 18 39.12 -2742.6 18.78 4.3895 19 69.07 -1651.7 -14.26 2.5918 20 96.01 -627.6 -42.79 1.0153 > all.equal( estResultHom4Deriv$qLabor * germanFarms$qLabor + + estResultHom4Deriv$land * germanFarms$land + + estResultHom4Deriv$qVarInput * germanFarms$qVarInput, + - estResultHom4Deriv$time * germanFarms$time ) [1] TRUE > > ## elasticities of quadratic functions with homogeneity imposed > estResultHomEla <- quadFuncEla( + xNames = c( "time", "qLabor", "land", "qVarInput" ), + coef = coef( estResultHom ), data = germanFarms, + homWeights = c( qLabor = 0.7, land = 0.1, qVarInput = 0.2 ) ) > all.equal( estResultHomEla, elas( estResultHom ) ) [1] TRUE > print( estResultHomEla ) time qLabor land qVarInput 1 0.00594 -1.7801 0.6507 1.129 2 0.05889 -0.2788 -0.1889 0.468 3 0.09824 -0.1722 -0.2447 0.417 4 0.15175 -0.1255 -0.4103 0.536 5 0.16670 -0.5735 -0.2213 0.795 6 0.22220 -0.4130 -0.3182 0.731 7 0.31842 0.0821 -0.5723 0.490 8 0.23342 -1.1677 0.0381 1.130 9 0.21589 -1.7652 0.2442 1.521 10 0.19018 -2.3527 0.4999 1.853 11 0.30331 -1.5358 0.1297 1.406 12 0.33426 -1.5428 0.1282 1.415 13 0.44241 -0.9856 -0.1194 1.105 14 0.52490 -0.6963 -0.2230 0.919 15 0.41674 -1.5656 0.2317 1.334 16 0.46079 -1.4454 0.2226 1.223 17 0.46322 -1.5425 0.3848 1.158 18 0.52712 -1.2846 0.3220 0.963 19 0.69109 -0.6180 -0.0232 0.641 20 0.86196 -0.1183 -0.3438 0.462 > all.equal( estResultHomEla$qLabor + estResultHomEla$land, + - estResultHomEla$qVarInput ) [1] TRUE > estResultHomElaObs <- quadFuncEla( + xNames = c( "time", "qLabor", "land", "qVarInput" ), + coef = coef( estResultHom ), data = germanFarms, yName = "qOutput", + homWeights = c( qLabor = 0.7, land = 0.1, qVarInput = 0.2 ) ) > all.equal( estResultHomElaObs, elas( estResultHom, yObs = TRUE ) ) [1] TRUE > print( estResultHomElaObs ) time qLabor land qVarInput 1 0.00589 -1.7635 0.6447 1.119 2 0.06240 -0.2954 -0.2001 0.496 3 0.09647 -0.1691 -0.2403 0.409 4 0.14494 -0.1199 -0.3919 0.512 5 0.16306 -0.5610 -0.2164 0.777 6 0.22610 -0.4203 -0.3238 0.744 7 0.32477 0.0838 -0.5838 0.500 8 0.22712 -1.1362 0.0370 1.099 9 0.22768 -1.8616 0.2576 1.604 10 0.18727 -2.3167 0.4923 1.824 11 0.31447 -1.5923 0.1344 1.458 12 0.31930 -1.4738 0.1225 1.351 13 0.45152 -1.0059 -0.1219 1.128 14 0.51808 -0.6873 -0.2201 0.907 15 0.40660 -1.5275 0.2261 1.301 16 0.47133 -1.4785 0.2277 1.251 17 0.46723 -1.5559 0.3881 1.168 18 0.52461 -1.2785 0.3205 0.958 19 0.68919 -0.6163 -0.0232 0.640 20 0.86298 -0.1184 -0.3442 0.463 > all.equal( estResultHomElaObs$qLabor + estResultHomElaObs$land, + - estResultHomElaObs$qVarInput ) [1] TRUE > max( abs( estResultHomEla - estResultHomElaObs ) ) [1] 0.0964 > # only at mean values > estResultHomElaMeanFit <- elas( estResultHom, data = germanFarmsMeans ) > print( estResultHomElaMeanFit ) time qLabor land qVarInput 1 0.351 -0.915 -0.0414 0.956 > estResultHomElaMeanObs <- elas( estResultHom, data = germanFarmsMeans, + yObs = TRUE ) > print( estResultHomElaMeanObs ) time qLabor land qVarInput 1 0.343 -0.894 -0.0405 0.935 > print( estResultHomElaMeanFit - estResultHomElaMeanObs ) time qLabor land qVarInput 1 0.00785 -0.0205 -0.000926 0.0214 > # different order of weights (different from order used for estimation) > estResultHom1Ela <- quadFuncEla( + xNames = c( "time", "qLabor", "land", "qVarInput" ), + coef = coef( estResultHom ), data = germanFarms, + homWeights = c( qVarInput = 0.2, land = 0.1, qLabor = 0.7 ) ) > all.equal( estResultHomEla, estResultHom1Ela ) [1] TRUE > estResultHom1ElaObs <- quadFuncEla( + xNames = c( "time", "qLabor", "land", "qVarInput" ), + coef = coef( estResultHom ), data = germanFarms, yName = "qOutput", + homWeights = c( qVarInput = 0.2, land = 0.1, qLabor = 0.7 ) ) > all.equal( estResultHomElaObs, estResultHom1ElaObs ) [1] TRUE > # different order of weights (same order as used for estimation) > estResultHom2Ela <- quadFuncEla( + xNames = c( "time", "qLabor", "land", "qVarInput" ), + coef = coef( estResultHom2 ), data = germanFarms, + homWeights = c( qVarInput = 0.2, land = 0.1, qLabor = 0.7 ) ) > all.equal( estResultHom2Ela, elas( estResultHom2 ) ) [1] TRUE > all.equal( estResultHomEla, estResultHom2Ela ) [1] TRUE > estResultHom2ElaObs <- quadFuncEla( + xNames = c( "time", "qLabor", "land", "qVarInput" ), + coef = coef( estResultHom2 ), data = germanFarms, yName = "qOutput", + homWeights = c( qVarInput = 0.2, land = 0.1, qLabor = 0.7 ) ) > all.equal( estResultHom2ElaObs, elas( estResultHom2, yObs = TRUE ) ) [1] TRUE > all.equal( estResultHomElaObs, estResultHom2ElaObs ) [1] TRUE > # different order of independent variables > estResultHom3Ela <- quadFuncEla( + xNames = c( "qLabor", "land", "qVarInput", "time" ), + coef = coef( estResultHom3 ), data = germanFarms, + homWeights = c( qLabor = 0.7, land = 0.1, qVarInput = 0.2 ) ) > all.equal( estResultHom3Ela, elas( estResultHom3 ) ) [1] TRUE > all.equal( estResultHomEla, estResultHom3Ela[ , c( 4, 1, 2, 3 ) ] ) [1] TRUE > estResultHom3ElaObs <- quadFuncEla( + xNames = c( "qLabor", "land", "qVarInput", "time" ), + coef = coef( estResultHom3 ), data = germanFarms, yName = "qOutput", + homWeights = c( qLabor = 0.7, land = 0.1, qVarInput = 0.2 ) ) > all.equal( estResultHom3ElaObs, elas( estResultHom3, yObs = TRUE ) ) [1] TRUE > all.equal( estResultHomElaObs, estResultHom3ElaObs[ , c( 4, 1, 2, 3 ) ] ) [1] TRUE > # homogenous in all independent variables > estResultHom4Ela <- quadFuncEla( + xNames = c( "time", "qLabor", "land", "qVarInput" ), + coef = coef( estResultHom4 ), data = germanFarms, + homWeights = c( qLabor = 0.7, land = 0.1, qVarInput = 0.2, time = 0 ) ) > all.equal( estResultHom4Ela, elas( estResultHom4 ) ) [1] TRUE > print( estResultHom4Ela ) time qLabor land qVarInput 1 0.0120 -0.922 0.1889 0.7207 2 0.1035 0.425 -0.4743 -0.0540 3 0.1620 0.266 -0.5038 0.0759 4 0.2200 0.103 -0.3588 0.0359 5 0.2133 -0.684 -0.0253 0.4964 6 0.2767 -0.636 -0.0847 0.4438 7 0.4077 -0.101 -0.3984 0.0916 8 0.2158 -1.921 0.4290 1.2764 9 0.1184 -2.983 0.9165 1.9479 10 0.0142 -3.940 1.2987 2.6268 11 0.2062 -2.605 0.7441 1.6549 12 0.2589 -2.211 0.5671 1.3853 13 0.4180 -1.337 0.1649 0.7539 14 0.5246 -0.993 -0.0672 0.5356 15 0.2919 -2.525 0.6091 1.6245 16 0.3253 -2.526 0.5680 1.6323 17 0.3043 -2.884 0.6157 1.9640 18 0.4053 -2.558 0.3790 1.7733 19 0.6917 -1.410 -0.2804 0.9989 20 0.9657 -0.511 -0.8477 0.3933 > all.equal( estResultHom4Ela$qLabor + estResultHom4Ela$land + + estResultHom4Ela$qVarInput, - estResultHom4Ela$time ) [1] TRUE > estResultHom4ElaObs <- quadFuncEla( + xNames = c( "time", "qLabor", "land", "qVarInput" ), + coef = coef( estResultHom4 ), data = germanFarms, yName = "qOutput", + homWeights = c( qLabor = 0.7, land = 0.1, qVarInput = 0.2, time = 0 ) ) > all.equal( estResultHom4ElaObs, elas( estResultHom4, yObs = TRUE ) ) [1] TRUE > print( estResultHom4ElaObs ) time qLabor land qVarInput 1 0.0120 -0.9237 0.1894 0.7224 2 0.1076 0.4416 -0.4930 -0.0562 3 0.1579 0.2591 -0.4909 0.0739 4 0.2077 0.0973 -0.3388 0.0339 5 0.2098 -0.6732 -0.0249 0.4883 6 0.2857 -0.6565 -0.0874 0.4582 7 0.4265 -0.1055 -0.4168 0.0958 8 0.2152 -1.9160 0.4279 1.2729 9 0.1254 -3.1613 0.9714 2.0645 10 0.0137 -3.7941 1.2507 2.5298 11 0.2156 -2.7244 0.7782 1.7307 12 0.2435 -2.0796 0.5333 1.3028 13 0.4190 -1.3399 0.1652 0.7557 14 0.5156 -0.9760 -0.0660 0.5264 15 0.2847 -2.4629 0.5940 1.5843 16 0.3366 -2.6134 0.5878 1.6890 17 0.3053 -2.8932 0.6176 1.9703 18 0.4011 -2.5308 0.3750 1.7547 19 0.6954 -1.4176 -0.2819 1.0042 20 0.9640 -0.5104 -0.8462 0.3926 > all.equal( estResultHom4ElaObs$qLabor + estResultHom4ElaObs$land + + estResultHom4ElaObs$qVarInput, - estResultHom4ElaObs$time ) [1] TRUE > max( abs( estResultHom4Ela - estResultHom4ElaObs ) ) [1] 0.179 > > > ################ panel data ##################### > data( "GrunfeldGreene", package = "systemfit" ) Error in find.package(package, lib.loc, verbose = verbose) : there is no package called 'systemfit' Calls: data -> find.package Execution halted Running the tests in ‘tests/translog.R’ failed. Complete output: > library( micEcon ) 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/ > library( plm ) > options( digits = 3 ) > > ## preparing data > 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) > # taking logarithms > germanFarms$qLogOutput <- log( germanFarms$qOutput ) > germanFarms$qLogLabor <- log( germanFarms$qLabor ) > germanFarms$qLogLand <- log( germanFarms$land ) > germanFarms$qLogVarInput <- log( germanFarms$qVarInput ) > germanFarms$logTime <- log( germanFarms$time ) > > ## testing translogEst > # estimate a translog production function > estResult <- translogEst( "qOutput", c( "qLabor", "land", "qVarInput", "time" ), + germanFarms ) > > print( estResult ) Estimated Translog function with 20 observations. a_0 a_1 a_2 a_3 a_4 b_1_1 b_1_2 b_1_3 -133.485 24.589 19.923 34.631 -12.467 -16.865 14.347 -8.591 b_1_4 b_2_2 b_2_3 b_2_4 b_3_3 b_3_4 b_4_4 -3.573 0.264 -3.468 -1.163 -3.910 2.793 -0.246 > > summary( estResult ) Estimated Translog function with 20 observations. Estimate Std. Error t value Pr(>|t|) a_0 -133.485 165.548 -0.81 0.457 a_1 24.589 66.497 0.37 0.727 a_2 19.923 16.500 1.21 0.281 a_3 34.631 55.323 0.63 0.559 a_4 -12.467 5.228 -2.38 0.063 . b_1_1 -16.865 19.101 -0.88 0.418 b_1_2 14.347 8.770 1.64 0.163 b_1_3 -8.591 10.551 -0.81 0.453 b_1_4 -3.573 1.900 -1.88 0.119 b_2_2 0.264 4.822 0.05 0.958 b_2_3 -3.468 3.490 -0.99 0.366 b_2_4 -1.163 1.542 -0.75 0.485 b_3_3 -3.910 9.323 -0.42 0.692 b_3_4 2.793 0.750 3.72 0.014 * b_4_4 -0.246 0.160 -1.54 0.185 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 R-squared: 0.998 Adjusted R-squared: 0.993 > > residuals( estResult ) 1 2 3 4 5 6 7 8 0.002292 -0.013674 0.008394 0.022739 -0.008485 -0.017108 0.002266 -0.003225 9 10 11 12 13 14 15 16 0.008918 -0.002060 -0.001227 -0.001239 -0.000391 -0.002186 0.007307 0.004534 17 18 19 20 -0.013997 0.007881 -0.000263 -0.000475 > > print.default( estResult ) $call translogEst(yName = "qOutput", xNames = c("qLabor", "land", "qVarInput", "time"), data = germanFarms) $nExog [1] 4 $nShifter [1] 0 $est Call: lm(formula = as.formula(estFormula), data = estData) Coefficients: (Intercept) a_1 a_2 a_3 a_4 b_1_1 -133.485 24.589 19.923 34.631 -12.467 -16.865 b_1_2 b_1_3 b_1_4 b_2_2 b_2_3 b_2_4 14.347 -8.591 -3.573 0.264 -3.468 -1.163 b_3_3 b_3_4 b_4_4 -3.910 2.793 -0.246 $residuals 1 2 3 4 5 6 7 8 0.002292 -0.013674 0.008394 0.022739 -0.008485 -0.017108 0.002266 -0.003225 9 10 11 12 13 14 15 16 0.008918 -0.002060 -0.001227 -0.001239 -0.000391 -0.002186 0.007307 0.004534 17 18 19 20 -0.013997 0.007881 -0.000263 -0.000475 $fitted 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 944 976 1061 1145 1188 1206 1237 1293 1197 1281 1362 1543 1576 1700 1633 1619 17 18 19 20 1678 1742 1888 1993 $coef a_0 a_1 a_2 a_3 a_4 b_1_1 b_1_2 b_1_3 -133.485 24.589 19.923 34.631 -12.467 -16.865 14.347 -8.591 b_1_4 b_2_2 b_2_3 b_2_4 b_3_3 b_3_4 b_4_4 -3.573 0.264 -3.468 -1.163 -3.910 2.793 -0.246 $coefCov a_0 a_1 a_2 a_3 a_4 b_1_1 b_1_2 b_1_3 a_0 27405.99 9712.33 17.69 -9083.87 143.477 1775.85 -623.173 -1333.833 a_1 9712.33 4421.91 -133.02 -3202.91 18.862 775.11 -174.763 -656.263 a_2 17.69 -133.02 272.23 -117.76 -53.119 -70.62 -45.788 46.233 a_3 -9083.87 -3202.91 -117.76 3060.62 -27.798 -553.94 222.167 430.516 a_4 143.48 18.86 -53.12 -27.80 27.334 -8.21 9.313 -7.382 b_1_1 1775.85 775.11 -70.62 -553.94 -8.208 364.84 -79.338 -101.467 b_1_2 -623.17 -174.76 -45.79 222.17 9.313 -79.34 76.906 -4.733 b_1_3 -1333.83 -656.26 46.23 430.52 -7.382 -101.47 -4.733 111.316 b_1_4 138.95 53.86 5.31 -49.19 0.917 -3.56 -6.106 -6.116 b_2_2 -77.18 2.72 2.44 18.50 9.162 -50.20 12.688 -5.016 b_2_3 44.60 22.99 -43.90 5.93 4.681 35.82 -1.026 -4.401 b_2_4 81.28 17.02 9.80 -29.22 -4.695 16.08 -9.146 0.943 b_3_3 1480.84 527.13 36.56 -507.78 3.046 75.19 -34.433 -71.365 b_3_4 -68.98 -13.76 3.43 20.98 -2.147 -6.28 3.316 0.968 b_4_4 -7.58 -3.43 -1.52 3.06 0.728 -0.88 0.602 0.293 b_1_4 b_2_2 b_2_3 b_2_4 b_3_3 b_3_4 b_4_4 a_0 138.9469 -77.18 44.605 81.2783 1480.837 -68.9803 -7.5838 a_1 53.8560 2.72 22.994 17.0231 527.126 -13.7558 -3.4281 a_2 5.3118 2.44 -43.897 9.8010 36.560 3.4335 -1.5210 a_3 -49.1889 18.50 5.926 -29.2154 -507.777 20.9840 3.0597 a_4 0.9168 9.16 4.681 -4.6948 3.046 -2.1473 0.7278 b_1_1 -3.5626 -50.20 35.823 16.0775 75.187 -6.2751 -0.8797 b_1_2 -6.1059 12.69 -1.026 -9.1463 -34.433 3.3158 0.6018 b_1_3 -6.1163 -5.02 -4.401 0.9429 -71.365 0.9681 0.2932 b_1_4 3.6094 4.74 -2.943 -0.0203 9.613 -0.3327 -0.0490 b_2_2 4.7394 23.25 -11.100 -5.6859 2.878 1.0467 0.3004 b_2_3 -2.9430 -11.10 12.177 1.0946 -6.539 -1.1226 0.1081 b_2_4 -0.0203 -5.69 1.095 2.3774 4.005 -0.4070 -0.1735 b_3_3 9.6127 2.88 -6.539 4.0047 86.920 -2.8993 -0.5340 b_3_4 -0.3327 1.05 -1.123 -0.4070 -2.899 0.5624 -0.0302 b_4_4 -0.0490 0.30 0.108 -0.1735 -0.534 -0.0302 0.0255 $r2 [1] 0.998 $r2bar [1] 0.993 $nObs [1] 20 $yName [1] "qOutput" $xNames [1] "qLabor" "land" "qVarInput" "time" $model.matrix (Intercept) a_1 a_2 a_3 a_4 b_1_1 b_1_2 b_1_3 b_1_4 b_2_2 b_2_3 b_2_4 1 1 0.365 3.15 6.32 0.000 0.0665 1.15 2.31 0.000 4.97 19.9 0.00 2 1 0.372 3.19 6.41 0.693 0.0690 1.18 2.38 0.258 5.08 20.4 2.21 3 1 0.365 3.21 6.41 1.099 0.0665 1.17 2.34 0.401 5.14 20.6 3.52 4 1 0.392 3.22 6.48 1.386 0.0768 1.26 2.54 0.543 5.17 20.8 4.46 5 1 0.392 3.22 6.47 1.609 0.0768 1.26 2.54 0.631 5.17 20.8 5.17 6 1 0.385 3.23 6.49 1.792 0.0742 1.24 2.50 0.690 5.21 20.9 5.78 7 1 0.372 3.25 6.51 1.946 0.0690 1.21 2.42 0.723 5.30 21.2 6.33 8 1 0.399 3.26 6.47 2.079 0.0795 1.30 2.58 0.829 5.30 21.1 6.77 9 1 0.392 3.23 6.46 2.197 0.0768 1.26 2.53 0.861 5.20 20.8 7.09 10 1 0.425 3.26 6.47 2.303 0.0904 1.39 2.75 0.979 5.32 21.1 7.51 11 1 0.425 3.29 6.53 2.398 0.0904 1.40 2.78 1.020 5.40 21.5 7.88 12 1 0.525 3.40 6.63 2.485 0.1377 1.78 3.48 1.304 5.77 22.5 8.44 13 1 0.531 3.44 6.69 2.565 0.1408 1.82 3.55 1.361 5.91 23.0 8.82 14 1 0.513 3.47 6.68 2.639 0.1315 1.78 3.43 1.353 6.03 23.2 9.16 15 1 0.501 3.45 6.60 2.708 0.1254 1.73 3.31 1.356 5.95 22.8 9.34 16 1 0.476 3.46 6.58 2.773 0.1134 1.65 3.13 1.320 5.99 22.8 9.60 17 1 0.482 3.51 6.55 2.833 0.1164 1.69 3.16 1.367 6.17 23.0 9.95 18 1 0.482 3.56 6.55 2.890 0.1164 1.72 3.16 1.394 6.33 23.3 10.28 19 1 0.482 3.62 6.59 2.944 0.1164 1.75 3.18 1.420 6.55 23.9 10.66 20 1 0.482 3.67 6.65 2.996 0.1164 1.77 3.21 1.445 6.75 24.4 11.00 b_3_3 b_3_4 b_4_4 1 20.0 0.00 0.000 2 20.5 4.44 0.240 3 20.5 7.04 0.603 4 21.0 8.99 0.961 5 21.0 10.42 1.295 6 21.0 11.62 1.605 7 21.2 12.67 1.893 8 21.0 13.46 2.162 9 20.9 14.20 2.414 10 21.0 14.91 2.651 11 21.3 15.65 2.875 12 22.0 16.49 3.087 13 22.4 17.15 3.289 14 22.3 17.63 3.482 15 21.8 17.88 3.667 16 21.6 18.24 3.844 17 21.5 18.56 4.014 18 21.5 18.94 4.177 19 21.7 19.42 4.335 20 22.1 19.91 4.487 attr(,"assign") [1] 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 $r2nonLog [,1] [1,] 0.999 $dataLogged [1] FALSE attr(,"class") [1] "translogEst" > > fitted( estResult ) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 944 976 1061 1145 1188 1206 1237 1293 1197 1281 1362 1543 1576 1700 1633 1619 17 18 19 20 1678 1742 1888 1993 > all.equal( fitted( estResult ), predict( estResult ) ) [1] TRUE > all.equal( log( fitted( estResult ) ), predict( estResult, dataLogged = TRUE ) ) [1] TRUE > all.equal( fitted( estResult ), predict( estResult, newdata = germanFarms ) ) [1] TRUE > > > # estimate the translog production function with a different order of inputs > estResultOrder <- translogEst( yName = "qOutput", + xNames = c( "qLabor", "qVarInput", "land", "time" ), + data = germanFarms ) > print( estResultOrder ) Estimated Translog function with 20 observations. a_0 a_1 a_2 a_3 a_4 b_1_1 b_1_2 b_1_3 -133.485 24.589 34.631 19.923 -12.467 -16.865 -8.591 14.347 b_1_4 b_2_2 b_2_3 b_2_4 b_3_3 b_3_4 b_4_4 -3.573 -3.910 -3.468 2.793 0.264 -1.163 -0.246 > summary( estResultOrder ) Estimated Translog function with 20 observations. Estimate Std. Error t value Pr(>|t|) a_0 -133.485 165.548 -0.81 0.457 a_1 24.589 66.497 0.37 0.727 a_2 34.631 55.323 0.63 0.559 a_3 19.923 16.500 1.21 0.281 a_4 -12.467 5.228 -2.38 0.063 . b_1_1 -16.865 19.101 -0.88 0.418 b_1_2 -8.591 10.551 -0.81 0.453 b_1_3 14.347 8.770 1.64 0.163 b_1_4 -3.573 1.900 -1.88 0.119 b_2_2 -3.910 9.323 -0.42 0.692 b_2_3 -3.468 3.490 -0.99 0.366 b_2_4 2.793 0.750 3.72 0.014 * b_3_3 0.264 4.822 0.05 0.958 b_3_4 -1.163 1.542 -0.75 0.485 b_4_4 -0.246 0.160 -1.54 0.185 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 R-squared: 0.998 Adjusted R-squared: 0.993 > all.equal( residuals( estResult ), residuals( estResultOrder ) ) [1] TRUE > > # estimate the translog production function with a different order of inputs > estResultOrder2 <- translogEst( yName = "qOutput", + xNames = c( "land", "qVarInput", "qLabor", "time" ), + data = germanFarms ) > print( estResultOrder2 ) Estimated Translog function with 20 observations. a_0 a_1 a_2 a_3 a_4 b_1_1 b_1_2 b_1_3 -133.485 19.923 34.631 24.589 -12.467 0.264 -3.468 14.347 b_1_4 b_2_2 b_2_3 b_2_4 b_3_3 b_3_4 b_4_4 -1.163 -3.910 -8.591 2.793 -16.865 -3.573 -0.246 > summary( estResultOrder2 ) Estimated Translog function with 20 observations. Estimate Std. Error t value Pr(>|t|) a_0 -133.485 165.548 -0.81 0.457 a_1 19.923 16.500 1.21 0.281 a_2 34.631 55.323 0.63 0.559 a_3 24.589 66.497 0.37 0.727 a_4 -12.467 5.228 -2.38 0.063 . b_1_1 0.264 4.822 0.05 0.958 b_1_2 -3.468 3.490 -0.99 0.366 b_1_3 14.347 8.770 1.64 0.163 b_1_4 -1.163 1.542 -0.75 0.485 b_2_2 -3.910 9.323 -0.42 0.692 b_2_3 -8.591 10.551 -0.81 0.453 b_2_4 2.793 0.750 3.72 0.014 * b_3_3 -16.865 19.101 -0.88 0.418 b_3_4 -3.573 1.900 -1.88 0.119 b_4_4 -0.246 0.160 -1.54 0.185 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 R-squared: 0.998 Adjusted R-squared: 0.993 > all.equal( residuals( estResult ), residuals( estResultOrder2 ) ) [1] TRUE > > # estimate the translog production function with a different order of inputs > estResultOrder3 <- translogEst( yName = "qOutput", + xNames = c( "land", "qVarInput", "time", "qLabor" ), + data = germanFarms ) > print( estResultOrder3 ) Estimated Translog function with 20 observations. a_0 a_1 a_2 a_3 a_4 b_1_1 b_1_2 b_1_3 -133.485 19.923 34.631 -12.467 24.589 0.264 -3.468 -1.163 b_1_4 b_2_2 b_2_3 b_2_4 b_3_3 b_3_4 b_4_4 14.347 -3.910 2.793 -8.591 -0.246 -3.573 -16.865 > summary( estResultOrder3 ) Estimated Translog function with 20 observations. Estimate Std. Error t value Pr(>|t|) a_0 -133.485 165.548 -0.81 0.457 a_1 19.923 16.500 1.21 0.281 a_2 34.631 55.323 0.63 0.559 a_3 -12.467 5.228 -2.38 0.063 . a_4 24.589 66.497 0.37 0.727 b_1_1 0.264 4.822 0.05 0.958 b_1_2 -3.468 3.490 -0.99 0.366 b_1_3 -1.163 1.542 -0.75 0.485 b_1_4 14.347 8.770 1.64 0.163 b_2_2 -3.910 9.323 -0.42 0.692 b_2_3 2.793 0.750 3.72 0.014 * b_2_4 -8.591 10.551 -0.81 0.453 b_3_3 -0.246 0.160 -1.54 0.185 b_3_4 -3.573 1.900 -1.88 0.119 b_4_4 -16.865 19.101 -0.88 0.418 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 R-squared: 0.998 Adjusted R-squared: 0.993 > all.equal( residuals( estResult ), residuals( estResultOrder3 ) ) [1] TRUE > > > ## testing translogEst with dataLogged = TRUE > estResultLog <- translogEst( "qLogOutput", + xNames = c( "qLogLabor", "qLogLand", "qLogVarInput", "logTime" ), + data = germanFarms, dataLogged = TRUE ) > all.equal( estResult[ -c(1,6,12,13,16) ], estResultLog[ -c(1,6,12,13,16) ] ) [1] TRUE > all.equal( estResult$fitted, exp( estResultLog$fitted ) ) [1] TRUE > fitted( estResultLog ) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 6.85 6.88 6.97 7.04 7.08 7.10 7.12 7.16 7.09 7.16 7.22 7.34 7.36 7.44 7.40 7.39 17 18 19 20 7.43 7.46 7.54 7.60 > all.equal( fitted( estResultLog ), predict( estResultLog ) ) [1] TRUE > all.equal( exp( fitted( estResultLog ) ), + predict( estResultLog, dataLogged = FALSE ) ) [1] TRUE > all.equal( fitted( estResultLog ), + predict( estResultLog, newdata = germanFarms ) ) [1] TRUE > > > ## testing translogCalc > fitted <- translogCalc( c( "qLabor", "land", "qVarInput", "time" ), + germanFarms, estResult$coef ) > > all.equal( fitted, estResult$fitted ) [1] TRUE > > ## testing translogDeriv > margProducts <- translogDeriv( c( "qLabor", "land", "qVarInput", "time" ), + germanFarms, estResult$coef, estResult$coefCov ) > print( margProducts ) $deriv qLabor land qVarInput time 1 6137.0 163.8 -7.044 208.3 2 4381.9 123.6 -4.392 110.9 3 4012.4 107.0 -2.818 47.7 4 2675.9 105.7 -2.388 45.8 5 2202.7 98.9 -1.288 18.5 6 1859.8 82.1 -0.431 16.6 7 1804.0 60.3 0.228 23.3 8 1340.3 81.3 0.812 -17.6 9 727.9 68.1 1.775 -14.9 10 291.6 86.0 1.552 -33.3 11 -44.5 74.8 1.519 -21.3 12 -1280.4 126.4 -1.332 -47.8 13 -1527.4 115.0 -1.626 -38.3 14 -1105.0 103.1 -1.211 -39.1 15 -741.7 102.0 0.246 -53.7 16 -189.4 82.9 1.262 -51.0 17 453.4 87.7 1.438 -66.3 18 920.2 84.0 1.489 -70.9 19 1400.5 76.0 0.967 -69.9 20 1662.3 64.6 0.328 -63.2 attr(,"class") [1] "translogDeriv" > > margProductsObs <- translogDeriv( c( "qLabor", "land", "qVarInput", "time" ), + germanFarms, estResult$coef, estResult$coefCov, yName = "qOutput" ) > print( margProductsObs ) $deriv qLabor land qVarInput time 1 6151.1 164.2 -7.060 208.8 2 4322.4 121.9 -4.332 109.4 3 4046.2 107.9 -2.842 48.1 4 2737.5 108.1 -2.443 46.9 5 2184.1 98.1 -1.277 18.4 6 1828.2 80.7 -0.424 16.3 7 1808.1 60.4 0.229 23.4 8 1336.0 81.0 0.809 -17.5 9 734.5 68.8 1.791 -15.0 10 291.0 85.9 1.549 -33.3 11 -44.4 74.7 1.517 -21.3 12 -1278.8 126.2 -1.330 -47.8 13 -1526.8 114.9 -1.625 -38.3 14 -1102.6 102.9 -1.208 -39.0 15 -747.1 102.7 0.248 -54.1 16 -190.3 83.2 1.268 -51.3 17 447.1 86.4 1.418 -65.4 18 927.5 84.7 1.501 -71.5 19 1400.1 76.0 0.967 -69.9 20 1661.5 64.6 0.328 -63.2 attr(,"class") [1] "translogDeriv" > > germanFarms$fitted <- fitted > margProductsFitted <- translogDeriv( c( "qLabor", "land", "qVarInput", "time" ), + germanFarms, estResult$coef, estResult$coefCov, yName = "fitted" ) > all.equal( margProducts, margProductsFitted ) [1] TRUE > > > ## testing calculation of elasticities with translogEla > estEla <- translogEla( c( "qLabor", "land", "qVarInput", "time" ), + data = germanFarms, coef = coef( estResult ), coefCov = vcov( estResult ) ) > print( estEla ) qLabor land qVarInput time 1 9.362 4.06 -4.153 0.2206 2 6.510 3.06 -2.730 0.2273 3 5.448 2.49 -1.615 0.1349 4 3.457 2.30 -1.363 0.1600 5 2.744 2.07 -0.702 0.0780 6 2.266 1.72 -0.235 0.0827 7 2.115 1.26 0.124 0.1320 8 1.545 1.63 0.407 -0.1088 9 0.900 1.43 0.949 -0.1121 10 0.348 1.75 0.786 -0.2603 11 -0.050 1.47 0.761 -0.1722 12 -1.403 2.45 -0.657 -0.3720 13 -1.648 2.27 -0.827 -0.3159 14 -1.086 1.95 -0.568 -0.3222 15 -0.750 1.97 0.111 -0.4932 16 -0.188 1.63 0.561 -0.5044 17 0.438 1.75 0.600 -0.6717 18 0.856 1.69 0.600 -0.7329 19 1.202 1.50 0.375 -0.7037 20 1.351 1.28 0.127 -0.6345 > print( attributes( estEla )$variance ) qLabor land qVarInput time 1 4428 296 3036 28.1 2 4441 288 3061 27.9 3 4428 282 3056 27.7 4 4439 283 3075 27.7 5 4420 280 3066 27.5 6 4427 278 3072 27.4 7 4451 276 3087 27.5 8 4397 275 3053 27.3 9 4383 273 3047 27.1 10 4366 274 3037 27.2 11 4399 275 3061 27.3 12 4408 284 3071 28.0 13 4440 286 3093 28.2 14 4453 283 3097 28.4 15 4403 278 3060 28.0 16 4404 275 3056 28.0 17 4390 274 3039 28.2 18 4396 273 3039 28.4 19 4432 274 3058 28.8 20 4475 276 3083 29.2 > print( attributes( estEla )$stdDev ) qLabor land qVarInput time 1 66.5 17.2 55.1 5.30 2 66.6 17.0 55.3 5.28 3 66.5 16.8 55.3 5.26 4 66.6 16.8 55.5 5.26 5 66.5 16.7 55.4 5.24 6 66.5 16.7 55.4 5.24 7 66.7 16.6 55.6 5.25 8 66.3 16.6 55.3 5.23 9 66.2 16.5 55.2 5.20 10 66.1 16.5 55.1 5.21 11 66.3 16.6 55.3 5.23 12 66.4 16.8 55.4 5.29 13 66.6 16.9 55.6 5.31 14 66.7 16.8 55.6 5.33 15 66.4 16.7 55.3 5.29 16 66.4 16.6 55.3 5.29 17 66.3 16.5 55.1 5.31 18 66.3 16.5 55.1 5.33 19 66.6 16.6 55.3 5.37 20 66.9 16.6 55.5 5.40 > estElaMet <- elas( estResult ) > all.equal( estEla, estElaMet ) [1] TRUE > estElaLogMet <- elas( estResultLog ) > all.equal( estElaMet, estElaLogMet, check.attributes = FALSE ) [1] TRUE > > ## testing translogHessian > # compute the Hessian matrices > hessians <- translogHessian( c( "qLabor", "land", "qVarInput", "time" ), + germanFarms, estResult$coef ) > print( hessians ) [[1]] [,1] [,2] [,3] [,4] [1,] 27959.4 1467.13 -55.9124 -988.37 [2,] 1467.1 21.89 -1.4740 -10.78 [3,] -55.9 -1.47 0.0533 3.18 [4,] -988.4 -10.78 3.1836 -394.22 [[2]] [,1] [,2] [,3] [,4] [1,] 8823.3 953.938 -29.2495 -704.67 [2,] 953.9 10.984 -0.7867 -9.41 [3,] -29.2 -0.787 0.0166 1.75 [4,] -704.7 -9.414 1.7480 -102.79 [[3]] [,1] [,2] [,3] [,4] [1,] 3766.3 832.90 -2.11e+01 -696.8 [2,] 832.9 6.93 -5.30e-01 -11.8 [3,] -21.1 -0.53 9.04e-04 1.5 [4,] -696.8 -11.84 1.50e+00 -42.7 [[4]] [,1] [,2] [,3] [,4] [1,] -4376.0 692.742 -15.74627 -584.38 [2,] 692.7 6.001 -0.46429 -9.14 [3,] -15.7 -0.464 -0.00184 1.13 [4,] -584.4 -9.145 1.12765 -27.21 [[5]] [,1] [,2] [,3] [,4] [1,] -6553 645.712 -13.03733 -539.39 [2,] 646 4.767 -0.36265 -9.56 [3,] -13 -0.363 -0.00769 1.00 [4,] -539 -9.555 1.00485 -15.09 [[6]] [,1] [,2] [,3] [,4] [1,] -7812.2 593.234 -11.3954 -463.092 [2,] 593.2 2.836 -0.2818 -8.138 [3,] -11.4 -0.282 -0.0101 0.849 [4,] -463.1 -8.138 0.8488 -10.772 [[7]] [,1] [,2] [,3] [,4] [1,] -8531.0 560.140 -10.546 -401.326 [2,] 560.1 1.098 -0.235 -6.795 [3,] -10.5 -0.235 -0.011 0.737 [4,] -401.3 -6.795 0.737 -9.090 [[8]] [,1] [,2] [,3] [,4] [1,] -9329.9 563.569 -10.6627 -405.766 [2,] 563.6 2.487 -0.2155 -8.344 [3,] -10.7 -0.215 -0.0128 0.686 [4,] -405.8 -8.344 0.6856 -2.525 [[9]] [,1] [,2] [,3] [,4] [1,] -9265.20 502.272 -9.7777 -330.189 [2,] 502.27 1.672 -0.1566 -6.994 [3,] -9.78 -0.157 -0.0116 0.558 [4,] -330.19 -6.994 0.5584 -1.787 [[10]] [,1] [,2] [,3] [,4] [1,] -9353.3 480.371 -10.7392 -306.784 [2,] 480.4 2.977 -0.1586 -7.956 [3,] -10.7 -0.159 -0.0124 0.511 [4,] -306.8 -7.956 0.5114 1.055 [[11]] [,1] [,2] [,3] [,4] [1,] -9783.7 474.746 -11.259 -288.544 [2,] 474.7 1.818 -0.175 -6.553 [3,] -11.3 -0.175 -0.012 0.483 [4,] -288.5 -6.553 0.483 -0.493 [[12]] [,1] [,2] [,3] [,4] [1,] -7289.0 333.560 -9.20058 -232.139 [2,] 333.6 6.580 -0.34449 -8.924 [3,] -9.2 -0.344 -0.00752 0.513 [4,] -232.1 -8.924 0.51318 2.835 [[13]] [,1] [,2] [,3] [,4] [1,] -6815.72 315.976 -8.36177 -217.657 [2,] 315.98 5.126 -0.33789 -7.326 [3,] -8.36 -0.338 -0.00589 0.462 [4,] -217.66 -7.326 0.46204 1.585 [[14]] [,1] [,2] [,3] [,4] [1,] -8898.0 386.591 -10.17274 -234.344 [2,] 386.6 3.486 -0.30299 -6.761 [3,] -10.2 -0.303 -0.00806 0.453 [4,] -234.3 -6.761 0.45294 1.565 [[15]] [,1] [,2] [,3] [,4] [1,] -9327.5 404.076 -11.647 -211.345 [2,] 404.1 3.571 -0.228 -7.371 [3,] -11.6 -0.228 -0.012 0.404 [4,] -211.3 -7.371 0.404 3.561 [[16]] [,1] [,2] [,3] [,4] [1,] -10391.6 442.77 -12.165 -218.569 [2,] 442.8 2.06 -0.180 -6.304 [3,] -12.2 -0.18 -0.013 0.353 [4,] -218.6 -6.30 0.353 3.245 [[17]] [,1] [,2] [,3] [,4] [1,] -10942.8 466.859 -12.3142 -235.686 [2,] 466.9 2.360 -0.1726 -6.888 [3,] -12.3 -0.173 -0.0142 0.337 [4,] -235.7 -6.888 0.3368 5.094 [[18]] [,1] [,2] [,3] [,4] [1,] -11275.0 484.392 -12.3755 -250.918 [2,] 484.4 2.033 -0.1737 -6.633 [3,] -12.4 -0.174 -0.0147 0.325 [4,] -250.9 -6.633 0.3245 5.507 [[19]] [,1] [,2] [,3] [,4] [1,] -11958 504.538 -12.9742 -271.043 [2,] 505 1.383 -0.2011 -5.914 [3,] -13 -0.201 -0.0146 0.344 [4,] -271 -5.914 0.3438 4.985 [[20]] [,1] [,2] [,3] [,4] [1,] -12445.8 501.973 -13.4481 -272.531 [2,] 502.0 0.795 -0.2172 -4.993 [3,] -13.4 -0.217 -0.0135 0.351 [4,] -272.5 -4.993 0.3510 3.943 > > hessiansObs <- translogHessian( c( "qLabor", "land", "qVarInput", "time" ), + germanFarms, estResult$coef, yName = "qOutput" ) > print( hessiansObs ) [[1]] [,1] [,2] [,3] [,4] [1,] 28024 1470.50 -56.0407 -990.63 [2,] 1470 21.94 -1.4774 -10.80 [3,] -56 -1.48 0.0534 3.19 [4,] -991 -10.80 3.1909 -395.12 [[2]] [,1] [,2] [,3] [,4] [1,] 8703.4 940.983 -28.8523 -695.10 [2,] 941.0 10.835 -0.7760 -9.29 [3,] -28.9 -0.776 0.0164 1.72 [4,] -695.1 -9.286 1.7242 -101.39 [[3]] [,1] [,2] [,3] [,4] [1,] 3798.1 839.925 -2.12e+01 -702.72 [2,] 839.9 6.984 -5.34e-01 -11.94 [3,] -21.2 -0.534 9.12e-04 1.51 [4,] -702.7 -11.943 1.51e+00 -43.07 [[4]] [,1] [,2] [,3] [,4] [1,] -4476.6 708.674 -16.10842 -597.82 [2,] 708.7 6.139 -0.47497 -9.36 [3,] -16.1 -0.475 -0.00188 1.15 [4,] -597.8 -9.355 1.15359 -27.83 [[5]] [,1] [,2] [,3] [,4] [1,] -6497.5 640.26 -12.92717 -534.835 [2,] 640.3 4.73 -0.35958 -9.474 [3,] -12.9 -0.36 -0.00763 0.996 [4,] -534.8 -9.47 0.99636 -14.965 [[6]] [,1] [,2] [,3] [,4] [1,] -7679.7 583.171 -11.20205 -455.237 [2,] 583.2 2.788 -0.27699 -8.000 [3,] -11.2 -0.277 -0.00994 0.834 [4,] -455.2 -8.000 0.83444 -10.590 [[7]] [,1] [,2] [,3] [,4] [1,] -8550.4 561.411 -10.570 -402.236 [2,] 561.4 1.101 -0.235 -6.810 [3,] -10.6 -0.235 -0.011 0.739 [4,] -402.2 -6.810 0.739 -9.111 [[8]] [,1] [,2] [,3] [,4] [1,] -9299.9 561.754 -10.6284 -404.459 [2,] 561.8 2.478 -0.2148 -8.317 [3,] -10.6 -0.215 -0.0127 0.683 [4,] -404.5 -8.317 0.6834 -2.517 [[9]] [,1] [,2] [,3] [,4] [1,] -9348.19 506.771 -9.8653 -333.146 [2,] 506.77 1.687 -0.1580 -7.056 [3,] -9.87 -0.158 -0.0117 0.563 [4,] -333.15 -7.056 0.5634 -1.803 [[10]] [,1] [,2] [,3] [,4] [1,] -9334.1 479.383 -10.7171 -306.15 [2,] 479.4 2.971 -0.1582 -7.94 [3,] -10.7 -0.158 -0.0124 0.51 [4,] -306.2 -7.940 0.5104 1.05 [[11]] [,1] [,2] [,3] [,4] [1,] -9771.7 474.163 -11.246 -288.190 [2,] 474.2 1.815 -0.175 -6.545 [3,] -11.2 -0.175 -0.012 0.483 [4,] -288.2 -6.545 0.483 -0.493 [[12]] [,1] [,2] [,3] [,4] [1,] -7279.96 333.147 -9.18919 -231.852 [2,] 333.15 6.572 -0.34407 -8.913 [3,] -9.19 -0.344 -0.00751 0.513 [4,] -231.85 -8.913 0.51255 2.832 [[13]] [,1] [,2] [,3] [,4] [1,] -6813.05 315.853 -8.35851 -217.572 [2,] 315.85 5.124 -0.33776 -7.324 [3,] -8.36 -0.338 -0.00589 0.462 [4,] -217.57 -7.324 0.46186 1.585 [[14]] [,1] [,2] [,3] [,4] [1,] -8878.6 385.747 -10.15053 -233.832 [2,] 385.7 3.478 -0.30233 -6.746 [3,] -10.2 -0.302 -0.00804 0.452 [4,] -233.8 -6.746 0.45195 1.561 [[15]] [,1] [,2] [,3] [,4] [1,] -9395.9 407.04 -11.7322 -212.895 [2,] 407.0 3.60 -0.2301 -7.425 [3,] -11.7 -0.23 -0.0121 0.407 [4,] -212.9 -7.42 0.4074 3.587 [[16]] [,1] [,2] [,3] [,4] [1,] -10438.8 444.781 -12.2199 -219.562 [2,] 444.8 2.072 -0.1812 -6.332 [3,] -12.2 -0.181 -0.0131 0.355 [4,] -219.6 -6.332 0.3550 3.260 [[17]] [,1] [,2] [,3] [,4] [1,] -10790.7 460.37 -12.143 -232.410 [2,] 460.4 2.33 -0.170 -6.792 [3,] -12.1 -0.17 -0.014 0.332 [4,] -232.4 -6.79 0.332 5.023 [[18]] [,1] [,2] [,3] [,4] [1,] -11364.2 488.225 -12.4734 -252.903 [2,] 488.2 2.049 -0.1751 -6.685 [3,] -12.5 -0.175 -0.0148 0.327 [4,] -252.9 -6.685 0.3271 5.551 [[19]] [,1] [,2] [,3] [,4] [1,] -11954 504.405 -12.9707 -270.972 [2,] 504 1.382 -0.2010 -5.912 [3,] -13 -0.201 -0.0146 0.344 [4,] -271 -5.912 0.3437 4.983 [[20]] [,1] [,2] [,3] [,4] [1,] -12439.8 501.734 -13.4417 -272.401 [2,] 501.7 0.794 -0.2171 -4.991 [3,] -13.4 -0.217 -0.0135 0.351 [4,] -272.4 -4.991 0.3508 3.941 > > germanFarms$fitted <- fitted > hessiansFitted <- translogHessian( c( "qLabor", "land", "qVarInput", "time" ), + germanFarms, estResult$coef, yName = "fitted" ) > all.equal( hessians, hessiansFitted ) [1] TRUE > > # compute the bordered Hessian matrices > borderedHessians <- translogHessian( c( "qLabor", "land", "qVarInput", "time" ), + germanFarms, estResult$coef, bordered = TRUE ) > print( borderedHessians ) [[1]] [,1] [,2] [,3] [,4] [,5] [1,] 0.00 6137.0 163.84 -7.0437 208.28 [2,] 6137.01 27959.4 1467.13 -55.9124 -988.37 [3,] 163.84 1467.1 21.89 -1.4740 -10.78 [4,] -7.04 -55.9 -1.47 0.0533 3.18 [5,] 208.28 -988.4 -10.78 3.1836 -394.22 [[2]] [,1] [,2] [,3] [,4] [,5] [1,] 0.00 4381.9 123.589 -4.3916 110.91 [2,] 4381.95 8823.3 953.938 -29.2495 -704.67 [3,] 123.59 953.9 10.984 -0.7867 -9.41 [4,] -4.39 -29.2 -0.787 0.0166 1.75 [5,] 110.91 -704.7 -9.414 1.7480 -102.79 [[3]] [,1] [,2] [,3] [,4] [,5] [1,] 0.00 4012.4 107.03 -2.82e+00 47.7 [2,] 4012.41 3766.3 832.90 -2.11e+01 -696.8 [3,] 107.03 832.9 6.93 -5.30e-01 -11.8 [4,] -2.82 -21.1 -0.53 9.04e-04 1.5 [5,] 47.71 -696.8 -11.84 1.50e+00 -42.7 [[4]] [,1] [,2] [,3] [,4] [,5] [1,] 0.00 2675.9 105.718 -2.38803 45.82 [2,] 2675.94 -4376.0 692.742 -15.74627 -584.38 [3,] 105.72 692.7 6.001 -0.46429 -9.14 [4,] -2.39 -15.7 -0.464 -0.00184 1.13 [5,] 45.82 -584.4 -9.145 1.12765 -27.21 [[5]] [,1] [,2] [,3] [,4] [,5] [1,] 0.00 2203 98.887 -1.28793 18.53 [2,] 2202.67 -6553 645.712 -13.03733 -539.39 [3,] 98.89 646 4.767 -0.36265 -9.56 [4,] -1.29 -13 -0.363 -0.00769 1.00 [5,] 18.53 -539 -9.555 1.00485 -15.09 [[6]] [,1] [,2] [,3] [,4] [,5] [1,] 0.000 1859.8 82.112 -0.4312 16.622 [2,] 1859.767 -7812.2 593.234 -11.3954 -463.092 [3,] 82.112 593.2 2.836 -0.2818 -8.138 [4,] -0.431 -11.4 -0.282 -0.0101 0.849 [5,] 16.622 -463.1 -8.138 0.8488 -10.772 [[7]] [,1] [,2] [,3] [,4] [,5] [1,] 0.000 1804.0 60.263 0.228 23.315 [2,] 1804.011 -8531.0 560.140 -10.546 -401.326 [3,] 60.263 560.1 1.098 -0.235 -6.795 [4,] 0.228 -10.5 -0.235 -0.011 0.737 [5,] 23.315 -401.3 -6.795 0.737 -9.090 [[8]] [,1] [,2] [,3] [,4] [,5] [1,] 0.000 1340.3 81.266 0.8117 -17.583 [2,] 1340.312 -9329.9 563.569 -10.6627 -405.766 [3,] 81.266 563.6 2.487 -0.2155 -8.344 [4,] 0.812 -10.7 -0.215 -0.0128 0.686 [5,] -17.583 -405.8 -8.344 0.6856 -2.525 [[9]] [,1] [,2] [,3] [,4] [,5] [1,] 0.00 727.95 68.144 1.7748 -14.913 [2,] 727.95 -9265.20 502.272 -9.7777 -330.189 [3,] 68.14 502.27 1.672 -0.1566 -6.994 [4,] 1.77 -9.78 -0.157 -0.0116 0.558 [5,] -14.91 -330.19 -6.994 0.5584 -1.787 [[10]] [,1] [,2] [,3] [,4] [,5] [1,] 0.00 291.6 86.043 1.5522 -33.344 [2,] 291.56 -9353.3 480.371 -10.7392 -306.784 [3,] 86.04 480.4 2.977 -0.1586 -7.956 [4,] 1.55 -10.7 -0.159 -0.0124 0.511 [5,] -33.34 -306.8 -7.956 0.5114 1.055 [[11]] [,1] [,2] [,3] [,4] [,5] [1,] 0.00 -44.5 74.827 1.519 -21.324 [2,] -44.49 -9783.7 474.746 -11.259 -288.544 [3,] 74.83 474.7 1.818 -0.175 -6.553 [4,] 1.52 -11.3 -0.175 -0.012 0.483 [5,] -21.32 -288.5 -6.553 0.483 -0.493 [[12]] [,1] [,2] [,3] [,4] [,5] [1,] 0.00 -1280.4 126.385 -1.33154 -47.819 [2,] -1280.40 -7289.0 333.560 -9.20058 -232.139 [3,] 126.39 333.6 6.580 -0.34449 -8.924 [4,] -1.33 -9.2 -0.344 -0.00752 0.513 [5,] -47.82 -232.1 -8.924 0.51318 2.835 [[13]] [,1] [,2] [,3] [,4] [,5] [1,] 0.00 -1527.39 114.991 -1.62573 -38.287 [2,] -1527.39 -6815.72 315.976 -8.36177 -217.657 [3,] 114.99 315.98 5.126 -0.33789 -7.326 [4,] -1.63 -8.36 -0.338 -0.00589 0.462 [5,] -38.29 -217.66 -7.326 0.46204 1.585 [[14]] [,1] [,2] [,3] [,4] [,5] [1,] 0.00 -1105.0 103.109 -1.21057 -39.122 [2,] -1105.00 -8898.0 386.591 -10.17274 -234.344 [3,] 103.11 386.6 3.486 -0.30299 -6.761 [4,] -1.21 -10.2 -0.303 -0.00806 0.453 [5,] -39.12 -234.3 -6.761 0.45294 1.565 [[15]] [,1] [,2] [,3] [,4] [,5] [1,] 0.000 -741.7 102.000 0.246 -53.682 [2,] -741.701 -9327.5 404.076 -11.647 -211.345 [3,] 102.000 404.1 3.571 -0.228 -7.371 [4,] 0.246 -11.6 -0.228 -0.012 0.404 [5,] -53.682 -211.3 -7.371 0.404 3.561 [[16]] [,1] [,2] [,3] [,4] [,5] [1,] 0.00 -189.4 82.85 1.262 -51.033 [2,] -189.44 -10391.6 442.77 -12.165 -218.569 [3,] 82.85 442.8 2.06 -0.180 -6.304 [4,] 1.26 -12.2 -0.18 -0.013 0.353 [5,] -51.03 -218.6 -6.30 0.353 3.245 [[17]] [,1] [,2] [,3] [,4] [,5] [1,] 0.00 453.4 87.663 1.4377 -66.311 [2,] 453.38 -10942.8 466.859 -12.3142 -235.686 [3,] 87.66 466.9 2.360 -0.1726 -6.888 [4,] 1.44 -12.3 -0.173 -0.0142 0.337 [5,] -66.31 -235.7 -6.888 0.3368 5.094 [[18]] [,1] [,2] [,3] [,4] [,5] [1,] 0.00 920.2 84.043 1.4892 -70.921 [2,] 920.19 -11275.0 484.392 -12.3755 -250.918 [3,] 84.04 484.4 2.033 -0.1737 -6.633 [4,] 1.49 -12.4 -0.174 -0.0147 0.325 [5,] -70.92 -250.9 -6.633 0.3245 5.507 [[19]] [,1] [,2] [,3] [,4] [,5] [1,] 0.000 1400 76.030 0.9669 -69.918 [2,] 1400.466 -11958 504.538 -12.9742 -271.043 [3,] 76.030 505 1.383 -0.2011 -5.914 [4,] 0.967 -13 -0.201 -0.0146 0.344 [5,] -69.918 -271 -5.914 0.3438 4.985 [[20]] [,1] [,2] [,3] [,4] [,5] [1,] 0.000 1662.3 64.626 0.3284 -63.226 [2,] 1662.322 -12445.8 501.973 -13.4481 -272.531 [3,] 64.626 502.0 0.795 -0.2172 -4.993 [4,] 0.328 -13.4 -0.217 -0.0135 0.351 [5,] -63.226 -272.5 -4.993 0.3510 3.943 > > borderedHessiansObs <- translogHessian( c( "qLabor", "land", "qVarInput", "time" ), + germanFarms, estResult$coef, yName = "qOutput", bordered = TRUE ) > print( borderedHessiansObs ) [[1]] [,1] [,2] [,3] [,4] [,5] [1,] 0.00 6151 164.22 -7.0599 208.76 [2,] 6151.09 28024 1470.50 -56.0407 -990.63 [3,] 164.22 1470 21.94 -1.4774 -10.80 [4,] -7.06 -56 -1.48 0.0534 3.19 [5,] 208.76 -991 -10.80 3.1909 -395.12 [[2]] [,1] [,2] [,3] [,4] [,5] [1,] 0.00 4322.4 121.911 -4.3320 109.40 [2,] 4322.44 8703.4 940.983 -28.8523 -695.10 [3,] 121.91 941.0 10.835 -0.7760 -9.29 [4,] -4.33 -28.9 -0.776 0.0164 1.72 [5,] 109.40 -695.1 -9.286 1.7242 -101.39 [[3]] [,1] [,2] [,3] [,4] [,5] [1,] 0.00 4046.2 107.932 -2.84e+00 48.11 [2,] 4046.23 3798.1 839.925 -2.12e+01 -702.72 [3,] 107.93 839.9 6.984 -5.34e-01 -11.94 [4,] -2.84 -21.2 -0.534 9.12e-04 1.51 [5,] 48.11 -702.7 -11.943 1.51e+00 -43.07 [[4]] [,1] [,2] [,3] [,4] [,5] [1,] 0.00 2737.5 108.149 -2.44296 46.87 [2,] 2737.48 -4476.6 708.674 -16.10842 -597.82 [3,] 108.15 708.7 6.139 -0.47497 -9.36 [4,] -2.44 -16.1 -0.475 -0.00188 1.15 [5,] 46.87 -597.8 -9.355 1.15359 -27.83 [[5]] [,1] [,2] [,3] [,4] [,5] [1,] 0.00 2184.1 98.05 -1.27705 18.377 [2,] 2184.06 -6497.5 640.26 -12.92717 -534.835 [3,] 98.05 640.3 4.73 -0.35958 -9.474 [4,] -1.28 -12.9 -0.36 -0.00763 0.996 [5,] 18.38 -534.8 -9.47 0.99636 -14.965 [[6]] [,1] [,2] [,3] [,4] [,5] [1,] 0.000 1828.2 80.719 -0.42392 16.340 [2,] 1828.220 -7679.7 583.171 -11.20205 -455.237 [3,] 80.719 583.2 2.788 -0.27699 -8.000 [4,] -0.424 -11.2 -0.277 -0.00994 0.834 [5,] 16.340 -455.2 -8.000 0.83444 -10.590 [[7]] [,1] [,2] [,3] [,4] [,5] [1,] 0.000 1808.1 60.400 0.229 23.368 [2,] 1808.103 -8550.4 561.411 -10.570 -402.236 [3,] 60.400 561.4 1.101 -0.235 -6.810 [4,] 0.229 -10.6 -0.235 -0.011 0.739 [5,] 23.368 -402.2 -6.810 0.739 -9.111 [[8]] [,1] [,2] [,3] [,4] [,5] [1,] 0.000 1336.0 81.005 0.8090 -17.526 [2,] 1335.996 -9299.9 561.754 -10.6284 -404.459 [3,] 81.005 561.8 2.478 -0.2148 -8.317 [4,] 0.809 -10.6 -0.215 -0.0127 0.683 [5,] -17.526 -404.5 -8.317 0.6834 -2.517 [[9]] [,1] [,2] [,3] [,4] [,5] [1,] 0.00 734.47 68.754 1.7907 -15.047 [2,] 734.47 -9348.19 506.771 -9.8653 -333.146 [3,] 68.75 506.77 1.687 -0.1580 -7.056 [4,] 1.79 -9.87 -0.158 -0.0117 0.563 [5,] -15.05 -333.15 -7.056 0.5634 -1.803 [[10]] [,1] [,2] [,3] [,4] [,5] [1,] 0.00 291.0 85.866 1.5490 -33.28 [2,] 290.96 -9334.1 479.383 -10.7171 -306.15 [3,] 85.87 479.4 2.971 -0.1582 -7.94 [4,] 1.55 -10.7 -0.158 -0.0124 0.51 [5,] -33.28 -306.2 -7.940 0.5104 1.05 [[11]] [,1] [,2] [,3] [,4] [,5] [1,] 0.00 -44.4 74.735 1.517 -21.298 [2,] -44.44 -9771.7 474.163 -11.246 -288.190 [3,] 74.73 474.2 1.815 -0.175 -6.545 [4,] 1.52 -11.2 -0.175 -0.012 0.483 [5,] -21.30 -288.2 -6.545 0.483 -0.493 [[12]] [,1] [,2] [,3] [,4] [,5] [1,] 0.00 -1278.82 126.229 -1.32989 -47.760 [2,] -1278.82 -7279.96 333.147 -9.18919 -231.852 [3,] 126.23 333.15 6.572 -0.34407 -8.913 [4,] -1.33 -9.19 -0.344 -0.00751 0.513 [5,] -47.76 -231.85 -8.913 0.51255 2.832 [[13]] [,1] [,2] [,3] [,4] [,5] [1,] 0.00 -1526.79 114.946 -1.62510 -38.272 [2,] -1526.79 -6813.05 315.853 -8.35851 -217.572 [3,] 114.95 315.85 5.124 -0.33776 -7.324 [4,] -1.63 -8.36 -0.338 -0.00589 0.462 [5,] -38.27 -217.57 -7.324 0.46186 1.585 [[14]] [,1] [,2] [,3] [,4] [,5] [1,] 0.00 -1102.6 102.884 -1.20792 -39.037 [2,] -1102.59 -8878.6 385.747 -10.15053 -233.832 [3,] 102.88 385.7 3.478 -0.30233 -6.746 [4,] -1.21 -10.2 -0.302 -0.00804 0.452 [5,] -39.04 -233.8 -6.746 0.45195 1.561 [[15]] [,1] [,2] [,3] [,4] [,5] [1,] 0.000 -747.1 102.75 0.2477 -54.076 [2,] -747.141 -9395.9 407.04 -11.7322 -212.895 [3,] 102.748 407.0 3.60 -0.2301 -7.425 [4,] 0.248 -11.7 -0.23 -0.0121 0.407 [5,] -54.076 -212.9 -7.42 0.4074 3.587 [[16]] [,1] [,2] [,3] [,4] [,5] [1,] 0.00 -190.3 83.227 1.2680 -51.265 [2,] -190.30 -10438.8 444.781 -12.2199 -219.562 [3,] 83.23 444.8 2.072 -0.1812 -6.332 [4,] 1.27 -12.2 -0.181 -0.0131 0.355 [5,] -51.26 -219.6 -6.332 0.3550 3.260 [[17]] [,1] [,2] [,3] [,4] [,5] [1,] 0.00 447.1 86.44 1.418 -65.390 [2,] 447.07 -10790.7 460.37 -12.143 -232.410 [3,] 86.44 460.4 2.33 -0.170 -6.792 [4,] 1.42 -12.1 -0.17 -0.014 0.332 [5,] -65.39 -232.4 -6.79 0.332 5.023 [[18]] [,1] [,2] [,3] [,4] [,5] [1,] 0.0 927.5 84.707 1.5010 -71.482 [2,] 927.5 -11364.2 488.225 -12.4734 -252.903 [3,] 84.7 488.2 2.049 -0.1751 -6.685 [4,] 1.5 -12.5 -0.175 -0.0148 0.327 [5,] -71.5 -252.9 -6.685 0.3271 5.551 [[19]] [,1] [,2] [,3] [,4] [,5] [1,] 0.000 1400 76.010 0.9667 -69.900 [2,] 1400.098 -11954 504.405 -12.9707 -270.972 [3,] 76.010 504 1.382 -0.2010 -5.912 [4,] 0.967 -13 -0.201 -0.0146 0.344 [5,] -69.900 -271 -5.912 0.3437 4.983 [[20]] [,1] [,2] [,3] [,4] [,5] [1,] 0.000 1661.5 64.595 0.3282 -63.196 [2,] 1661.533 -12439.8 501.734 -13.4417 -272.401 [3,] 64.595 501.7 0.794 -0.2171 -4.991 [4,] 0.328 -13.4 -0.217 -0.0135 0.351 [5,] -63.196 -272.4 -4.991 0.3508 3.941 > > germanFarms$fitted <- fitted > borderedHessiansFitted <- translogHessian( c( "qLabor", "land", "qVarInput", "time" ), + germanFarms, estResult$coef, yName = "fitted", bordered = TRUE ) > all.equal( borderedHessians, borderedHessiansFitted ) [1] TRUE > > ## testing translogCheckMono > test <- translogCheckMono( c( "qLabor", "land", "qVarInput", "time" ), + germanFarms, coef( estResult ) ) > summary( test ) This translog function is monotonically increasing in qLabor, land, qVarInput, time at 1 out of 20 observations (5%) The monotonicity condition for the exogenous variable - 'qLabor' is fulfilled at 14 out of 20 observations (70%) - 'land' is fulfilled at 20 out of 20 observations (100%) - 'qVarInput' is fulfilled at 11 out of 20 observations (55%) - 'time' is fulfilled at 7 out of 20 observations (35%) > class( test ) <- NULL > print( test ) $exog qLabor land qVarInput time [1,] TRUE TRUE FALSE TRUE [2,] TRUE TRUE FALSE TRUE [3,] TRUE TRUE FALSE TRUE [4,] TRUE TRUE FALSE TRUE [5,] TRUE TRUE FALSE TRUE [6,] TRUE TRUE FALSE TRUE [7,] TRUE TRUE TRUE TRUE [8,] TRUE TRUE TRUE FALSE [9,] TRUE TRUE TRUE FALSE [10,] TRUE TRUE TRUE FALSE [11,] FALSE TRUE TRUE FALSE [12,] FALSE TRUE FALSE FALSE [13,] FALSE TRUE FALSE FALSE [14,] FALSE TRUE FALSE FALSE [15,] FALSE TRUE TRUE FALSE [16,] FALSE TRUE TRUE FALSE [17,] TRUE TRUE TRUE FALSE [18,] TRUE TRUE TRUE FALSE [19,] TRUE TRUE TRUE FALSE [20,] TRUE TRUE TRUE FALSE $obs [1] FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE [13] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE $increasing [1] TRUE TRUE TRUE TRUE $strict [1] FALSE > > test <- translogCheckMono( c( "qLabor", "land", "qVarInput", "time" ), + germanFarms, coef( estResult ), strict = TRUE ) > summary( test ) This translog function is strictly monotonically increasing in qLabor, land, qVarInput, time at 1 out of 20 observations (5%) The monotonicity condition for the exogenous variable - 'qLabor' is fulfilled at 14 out of 20 observations (70%) - 'land' is fulfilled at 20 out of 20 observations (100%) - 'qVarInput' is fulfilled at 11 out of 20 observations (55%) - 'time' is fulfilled at 7 out of 20 observations (35%) > class( test ) <- NULL > print( test ) $exog qLabor land qVarInput time [1,] TRUE TRUE FALSE TRUE [2,] TRUE TRUE FALSE TRUE [3,] TRUE TRUE FALSE TRUE [4,] TRUE TRUE FALSE TRUE [5,] TRUE TRUE FALSE TRUE [6,] TRUE TRUE FALSE TRUE [7,] TRUE TRUE TRUE TRUE [8,] TRUE TRUE TRUE FALSE [9,] TRUE TRUE TRUE FALSE [10,] TRUE TRUE TRUE FALSE [11,] FALSE TRUE TRUE FALSE [12,] FALSE TRUE FALSE FALSE [13,] FALSE TRUE FALSE FALSE [14,] FALSE TRUE FALSE FALSE [15,] FALSE TRUE TRUE FALSE [16,] FALSE TRUE TRUE FALSE [17,] TRUE TRUE TRUE FALSE [18,] TRUE TRUE TRUE FALSE [19,] TRUE TRUE TRUE FALSE [20,] TRUE TRUE TRUE FALSE $obs [1] FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE [13] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE $increasing [1] TRUE TRUE TRUE TRUE $strict [1] TRUE > > test <- translogCheckMono( c( "qLabor", "land", "qVarInput", "time" ), + germanFarms, coef( estResult ), increasing = FALSE ) > summary( test ) This translog function is monotonically decreasing in qLabor, land, qVarInput, time at 0 out of 20 observations (0%) The monotonicity condition for the exogenous variable - 'qLabor' is fulfilled at 6 out of 20 observations (30%) - 'land' is fulfilled at 0 out of 20 observations (0%) - 'qVarInput' is fulfilled at 9 out of 20 observations (45%) - 'time' is fulfilled at 13 out of 20 observations (65%) > class( test ) <- NULL > print( test ) $exog qLabor land qVarInput time [1,] FALSE FALSE TRUE FALSE [2,] FALSE FALSE TRUE FALSE [3,] FALSE FALSE TRUE FALSE [4,] FALSE FALSE TRUE FALSE [5,] FALSE FALSE TRUE FALSE [6,] FALSE FALSE TRUE FALSE [7,] FALSE FALSE FALSE FALSE [8,] FALSE FALSE FALSE TRUE [9,] FALSE FALSE FALSE TRUE [10,] FALSE FALSE FALSE TRUE [11,] TRUE FALSE FALSE TRUE [12,] TRUE FALSE TRUE TRUE [13,] TRUE FALSE TRUE TRUE [14,] TRUE FALSE TRUE TRUE [15,] TRUE FALSE FALSE TRUE [16,] TRUE FALSE FALSE TRUE [17,] FALSE FALSE FALSE TRUE [18,] FALSE FALSE FALSE TRUE [19,] FALSE FALSE FALSE TRUE [20,] FALSE FALSE FALSE TRUE $obs [1] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE [13] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE $increasing [1] FALSE FALSE FALSE FALSE $strict [1] FALSE > > test <- translogCheckMono( c( "qLabor", "land", "qVarInput", "time" ), + germanFarms, coef( estResult ), increasing = FALSE, strict = TRUE ) > summary( test ) This translog function is strictly monotonically decreasing in qLabor, land, qVarInput, time at 0 out of 20 observations (0%) The monotonicity condition for the exogenous variable - 'qLabor' is fulfilled at 6 out of 20 observations (30%) - 'land' is fulfilled at 0 out of 20 observations (0%) - 'qVarInput' is fulfilled at 9 out of 20 observations (45%) - 'time' is fulfilled at 13 out of 20 observations (65%) > class( test ) <- NULL > print( test ) $exog qLabor land qVarInput time [1,] FALSE FALSE TRUE FALSE [2,] FALSE FALSE TRUE FALSE [3,] FALSE FALSE TRUE FALSE [4,] FALSE FALSE TRUE FALSE [5,] FALSE FALSE TRUE FALSE [6,] FALSE FALSE TRUE FALSE [7,] FALSE FALSE FALSE FALSE [8,] FALSE FALSE FALSE TRUE [9,] FALSE FALSE FALSE TRUE [10,] FALSE FALSE FALSE TRUE [11,] TRUE FALSE FALSE TRUE [12,] TRUE FALSE TRUE TRUE [13,] TRUE FALSE TRUE TRUE [14,] TRUE FALSE TRUE TRUE [15,] TRUE FALSE FALSE TRUE [16,] TRUE FALSE FALSE TRUE [17,] FALSE FALSE FALSE TRUE [18,] FALSE FALSE FALSE TRUE [19,] FALSE FALSE FALSE TRUE [20,] FALSE FALSE FALSE TRUE $obs [1] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE [13] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE $increasing [1] FALSE FALSE FALSE FALSE $strict [1] TRUE > > test <- translogCheckMono( c( "qLabor", "land", "qVarInput", "time" ), + germanFarms, coef( estResult ), increasing = c( FALSE, TRUE, FALSE, FALSE ) ) > summary( test ) This translog function is monotonically increasing in land and monotonically decreasing in qLabor, qVarInput, time at 3 out of 20 observations (15%) The monotonicity condition for the exogenous variable - 'qLabor' is fulfilled at 6 out of 20 observations (30%) - 'land' is fulfilled at 20 out of 20 observations (100%) - 'qVarInput' is fulfilled at 9 out of 20 observations (45%) - 'time' is fulfilled at 13 out of 20 observations (65%) > print.default( test ) $exog qLabor land qVarInput time [1,] FALSE TRUE TRUE FALSE [2,] FALSE TRUE TRUE FALSE [3,] FALSE TRUE TRUE FALSE [4,] FALSE TRUE TRUE FALSE [5,] FALSE TRUE TRUE FALSE [6,] FALSE TRUE TRUE FALSE [7,] FALSE TRUE FALSE FALSE [8,] FALSE TRUE FALSE TRUE [9,] FALSE TRUE FALSE TRUE [10,] FALSE TRUE FALSE TRUE [11,] TRUE TRUE FALSE TRUE [12,] TRUE TRUE TRUE TRUE [13,] TRUE TRUE TRUE TRUE [14,] TRUE TRUE TRUE TRUE [15,] TRUE TRUE FALSE TRUE [16,] TRUE TRUE FALSE TRUE [17,] FALSE TRUE FALSE TRUE [18,] FALSE TRUE FALSE TRUE [19,] FALSE TRUE FALSE TRUE [20,] FALSE TRUE FALSE TRUE $obs [1] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE [13] TRUE TRUE FALSE FALSE FALSE FALSE FALSE FALSE $increasing [1] FALSE TRUE FALSE FALSE $strict [1] FALSE attr(,"class") [1] "translogCheckMono" > > test <- translogCheckMono( c( "qLabor", "land", "qVarInput", "time" ), + germanFarms, coef( estResult ), increasing = c( FALSE, TRUE, TRUE, FALSE ), + strict = TRUE ) > summary( test ) This translog function is strictly monotonically increasing in land, qVarInput and strictly monotonically decreasing in qLabor, time at 3 out of 20 observations (15%) The monotonicity condition for the exogenous variable - 'qLabor' is fulfilled at 6 out of 20 observations (30%) - 'land' is fulfilled at 20 out of 20 observations (100%) - 'qVarInput' is fulfilled at 11 out of 20 observations (55%) - 'time' is fulfilled at 13 out of 20 observations (65%) > print.default( test ) $exog qLabor land qVarInput time [1,] FALSE TRUE FALSE FALSE [2,] FALSE TRUE FALSE FALSE [3,] FALSE TRUE FALSE FALSE [4,] FALSE TRUE FALSE FALSE [5,] FALSE TRUE FALSE FALSE [6,] FALSE TRUE FALSE FALSE [7,] FALSE TRUE TRUE FALSE [8,] FALSE TRUE TRUE TRUE [9,] FALSE TRUE TRUE TRUE [10,] FALSE TRUE TRUE TRUE [11,] TRUE TRUE TRUE TRUE [12,] TRUE TRUE FALSE TRUE [13,] TRUE TRUE FALSE TRUE [14,] TRUE TRUE FALSE TRUE [15,] TRUE TRUE TRUE TRUE [16,] TRUE TRUE TRUE TRUE [17,] FALSE TRUE TRUE TRUE [18,] FALSE TRUE TRUE TRUE [19,] FALSE TRUE TRUE TRUE [20,] FALSE TRUE TRUE TRUE $obs [1] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE [13] FALSE FALSE TRUE TRUE FALSE FALSE FALSE FALSE $increasing [1] FALSE TRUE TRUE FALSE $strict [1] TRUE attr(,"class") [1] "translogCheckMono" > > test <- translogCheckMono( c( "qLabor", "land", "qVarInput", "time" ), + germanFarms, coef( estResult ), increasing = c( TRUE, TRUE, FALSE, TRUE ) ) > summary( test ) This translog function is monotonically increasing in qLabor, land, time and monotonically decreasing in qVarInput at 6 out of 20 observations (30%) The monotonicity condition for the exogenous variable - 'qLabor' is fulfilled at 14 out of 20 observations (70%) - 'land' is fulfilled at 20 out of 20 observations (100%) - 'qVarInput' is fulfilled at 9 out of 20 observations (45%) - 'time' is fulfilled at 7 out of 20 observations (35%) > print.default( test ) $exog qLabor land qVarInput time [1,] TRUE TRUE TRUE TRUE [2,] TRUE TRUE TRUE TRUE [3,] TRUE TRUE TRUE TRUE [4,] TRUE TRUE TRUE TRUE [5,] TRUE TRUE TRUE TRUE [6,] TRUE TRUE TRUE TRUE [7,] TRUE TRUE FALSE TRUE [8,] TRUE TRUE FALSE FALSE [9,] TRUE TRUE FALSE FALSE [10,] TRUE TRUE FALSE FALSE [11,] FALSE TRUE FALSE FALSE [12,] FALSE TRUE TRUE FALSE [13,] FALSE TRUE TRUE FALSE [14,] FALSE TRUE TRUE FALSE [15,] FALSE TRUE FALSE FALSE [16,] FALSE TRUE FALSE FALSE [17,] TRUE TRUE FALSE FALSE [18,] TRUE TRUE FALSE FALSE [19,] TRUE TRUE FALSE FALSE [20,] TRUE TRUE FALSE FALSE $obs [1] TRUE TRUE TRUE TRUE TRUE TRUE FALSE FALSE FALSE FALSE FALSE FALSE [13] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE $increasing [1] TRUE TRUE FALSE TRUE $strict [1] FALSE attr(,"class") [1] "translogCheckMono" > > > ## testing translogCheckCurvature > test <- translogCheckCurvature( c( "qLabor", "land", "qVarInput", "time" ), + germanFarms, coef( estResult ) ) > summary( test ) Length Class Mode obs 20 -none- logical convexity 1 -none- logical quasi 1 -none- logical > class( test ) <- NULL > print( test ) $obs [1] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE [13] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE $convexity [1] TRUE $quasi [1] FALSE > > test <- translogCheckCurvature( c( "qLabor", "land", "qVarInput", "time" ), + germanFarms, coef( estResult ), quasi = TRUE ) > summary( test ) Length Class Mode obs 20 -none- logical convexity 1 -none- logical quasi 1 -none- logical > class( test ) <- NULL > print( test ) $obs [1] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE [13] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE $convexity [1] TRUE $quasi [1] TRUE > > test <- translogCheckCurvature( c( "qLabor", "land", "qVarInput", "time" ), + germanFarms, coef( estResult ), convexity = FALSE ) > summary( test ) Length Class Mode obs 20 -none- logical convexity 1 -none- logical quasi 1 -none- logical > class( test ) <- NULL > print( test ) $obs [1] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE [13] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE $convexity [1] FALSE $quasi [1] FALSE > > test <- translogCheckCurvature( c( "qLabor", "land", "qVarInput", "time" ), + germanFarms, coef( estResult ), convexity = FALSE, quasi = TRUE ) > summary( test ) Length Class Mode obs 20 -none- logical convexity 1 -none- logical quasi 1 -none- logical > class( test ) <- NULL > print( test ) $obs [1] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE [13] FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE $convexity [1] FALSE $quasi [1] TRUE > > > ## testing translogProdFuncMargCost > # generate (artificial) prices > germanFarms$pLand <- 200 + 15 * germanFarms$time > germanFarms$pTime <- 1 > > # compute the marginal costs of producing the output > margCost <- translogProdFuncMargCost( yName = "qOutput", + xNames = c( "qLabor", "land", "qVarInput", "time" ), + wNames = c( "pLabor", "pLand", "pVarInput", "pTime" ), + data = germanFarms, coef = coef( estResult ) ) > print( margCost ) 1 2 3 4 5 6 7 8 9 10 11 72.1 46.5 29.5 27.9 27.0 27.7 28.9 29.5 27.9 28.8 29.0 12 13 14 15 16 17 18 19 20 18.2 13.0 26.2 34.3 39.9 57.6 79.6 604.2 -100.1 > > # compute the marginal costs again with different order of inputs > margCostOrder <- translogProdFuncMargCost( yName = "qOutput", + xNames = c( "qLabor", "qVarInput", "land", "time" ), + wNames = c( "pLabor", "pVarInput", "pLand", "pTime" ), + data = germanFarms, coef = coef( estResultOrder ) ) > all.equal( margCost, margCostOrder ) [1] TRUE > > # compute the marginal costs again with different order of inputs > margCostOrder2 <- translogProdFuncMargCost( yName = "qOutput", + xNames = c( "land", "qVarInput", "qLabor", "time" ), + wNames = c( "pLand", "pVarInput", "pLabor", "pTime" ), + data = germanFarms, coef = coef( estResultOrder2 ) ) > all.equal( margCost, margCostOrder2 ) [1] TRUE > > # compute the marginal costs again with different order of inputs > margCostOrder3 <- translogProdFuncMargCost( yName = "qOutput", + xNames = c( "land", "qVarInput", "time", "qLabor" ), + wNames = c( "pLand", "pVarInput", "pTime", "pLabor" ), + data = germanFarms, coef = coef( estResultOrder3 ) ) > all.equal( margCost, margCostOrder3 ) [1] TRUE > > > ## testing translogEst with one shifter > germanFarms$tech <- exp( germanFarms$time ) > estResultShifter <- translogEst( "qOutput", + c( "qLabor", "land", "qVarInput" ), + shifterNames = "tech", data = germanFarms ) > print( estResultShifter ) Estimated Translog function with 20 observations. a_0 a_1 a_2 a_3 b_1_1 b_1_2 b_1_3 b_2_2 73.52668 52.66212 9.24343 -29.64508 -3.65917 -5.35158 -5.09844 0.48539 b_2_3 b_3_3 d_1 -1.18143 5.58758 0.00798 > summary( estResultShifter ) Estimated Translog function with 20 observations. Estimate Std. Error t value Pr(>|t|) a_0 73.52668 122.80077 0.60 0.56 a_1 52.66212 75.15469 0.70 0.50 a_2 9.24343 20.77301 0.44 0.67 a_3 -29.64508 44.63654 -0.66 0.52 b_1_1 -3.65917 23.51973 -0.16 0.88 b_1_2 -5.35158 8.77016 -0.61 0.56 b_1_3 -5.09844 12.95490 -0.39 0.70 b_2_2 0.48539 2.89804 0.17 0.87 b_2_3 -1.18143 4.13951 -0.29 0.78 b_3_3 5.58758 8.34380 0.67 0.52 d_1 0.00798 0.00912 0.87 0.40 R-squared: 0.991 Adjusted R-squared: 0.981 > residuals( estResultShifter ) 1 2 3 4 5 6 7 8 0.01190 -0.06095 0.02074 0.01242 0.01717 -0.00263 -0.00786 0.03279 9 10 11 12 13 14 15 16 0.00673 -0.01403 -0.01549 0.00943 -0.01965 0.01033 0.02339 -0.01678 17 18 19 20 -0.01868 0.00363 0.01243 -0.00488 > print.default( estResultShifter ) $call translogEst(yName = "qOutput", xNames = c("qLabor", "land", "qVarInput"), data = germanFarms, shifterNames = "tech") $nExog [1] 3 $nShifter [1] 1 $est Call: lm(formula = as.formula(estFormula), data = estData) Coefficients: (Intercept) a_1 a_2 a_3 b_1_1 b_1_2 73.52668 52.66212 9.24343 -29.64508 -3.65917 -5.35158 b_1_3 b_2_2 b_2_3 b_3_3 d_1 -5.09844 0.48539 -1.18143 5.58758 0.00798 $residuals 1 2 3 4 5 6 7 8 0.01190 -0.06095 0.02074 0.01242 0.01717 -0.00263 -0.00786 0.03279 9 10 11 12 13 14 15 16 0.00673 -0.01403 -0.01549 0.00943 -0.01965 0.01033 0.02339 -0.01678 17 18 19 20 -0.01868 0.00363 0.01243 -0.00488 $fitted 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 935 1023 1048 1157 1158 1189 1249 1247 1200 1296 1382 1526 1606 1679 1607 1654 17 18 19 20 1686 1749 1864 2002 $coef a_0 a_1 a_2 a_3 b_1_1 b_1_2 b_1_3 b_2_2 73.52668 52.66212 9.24343 -29.64508 -3.65917 -5.35158 -5.09844 0.48539 b_2_3 b_3_3 d_1 -1.18143 5.58758 0.00798 $coefCov a_0 a_1 a_2 a_3 b_1_1 b_1_2 b_1_3 a_0 15080.030 7638.897 475.4563 -5.38e+03 1241.2236 -45.6529 -1.23e+03 a_1 7638.897 5648.228 -442.6042 -2.49e+03 1272.0678 -56.7700 -9.18e+02 a_2 475.456 -442.604 431.5181 -3.39e+02 -218.7282 -27.1063 9.54e+01 a_3 -5381.913 -2492.627 -338.8292 1.99e+03 -351.4677 32.0213 3.89e+02 b_1_1 1241.224 1272.068 -218.7282 -3.51e+02 553.1776 -44.9757 -2.08e+02 b_1_2 -45.653 -56.770 -27.1063 3.20e+01 -44.9757 76.9158 -2.72e+01 b_1_3 -1228.123 -918.315 95.3760 3.89e+02 -208.3786 -27.2045 1.68e+02 b_2_2 59.668 -19.572 34.3177 -3.45e+01 -1.6673 -5.7103 6.04e+00 b_2_3 -100.302 81.866 -81.4941 6.72e+01 37.2293 1.4329 -1.57e+01 b_3_3 959.065 401.296 87.4299 -3.66e+02 48.4467 -3.6809 -6.28e+01 d_1 -0.191 -0.188 -0.0299 8.77e-02 0.0208 0.0369 8.57e-03 b_2_2 b_2_3 b_3_3 d_1 a_0 59.66752 -1.00e+02 959.0647 -1.91e-01 a_1 -19.57188 8.19e+01 401.2962 -1.88e-01 a_2 34.31773 -8.15e+01 87.4299 -2.99e-02 a_3 -34.45950 6.72e+01 -366.0503 8.77e-02 b_1_1 -1.66734 3.72e+01 48.4467 2.08e-02 b_1_2 -5.71028 1.43e+00 -3.6809 3.69e-02 b_1_3 6.04264 -1.57e+01 -62.7992 8.57e-03 b_2_2 8.39863 -9.24e+00 9.6225 3.55e-03 b_2_3 -9.23966 1.71e+01 -18.0641 -2.96e-04 b_3_3 9.62251 -1.81e+01 69.6190 -1.38e-02 d_1 0.00355 -2.96e-04 -0.0138 8.31e-05 $r2 [1] 0.991 $r2bar [1] 0.981 $nObs [1] 20 $yName [1] "qOutput" $xNames [1] "qLabor" "land" "qVarInput" $shifterNames [1] "tech" $model.matrix (Intercept) a_1 a_2 a_3 b_1_1 b_1_2 b_1_3 b_2_2 b_2_3 b_3_3 d_1 1 1 0.365 3.15 6.32 0.0665 1.15 2.31 4.97 19.9 20.0 1 2 1 0.372 3.19 6.41 0.0690 1.18 2.38 5.08 20.4 20.5 2 3 1 0.365 3.21 6.41 0.0665 1.17 2.34 5.14 20.6 20.5 3 4 1 0.392 3.22 6.48 0.0768 1.26 2.54 5.17 20.8 21.0 4 5 1 0.392 3.22 6.47 0.0768 1.26 2.54 5.17 20.8 21.0 5 6 1 0.385 3.23 6.49 0.0742 1.24 2.50 5.21 20.9 21.0 6 7 1 0.372 3.25 6.51 0.0690 1.21 2.42 5.30 21.2 21.2 7 8 1 0.399 3.26 6.47 0.0795 1.30 2.58 5.30 21.1 21.0 8 9 1 0.392 3.23 6.46 0.0768 1.26 2.53 5.20 20.8 20.9 9 10 1 0.425 3.26 6.47 0.0904 1.39 2.75 5.32 21.1 21.0 10 11 1 0.425 3.29 6.53 0.0904 1.40 2.78 5.40 21.5 21.3 11 12 1 0.525 3.40 6.63 0.1377 1.78 3.48 5.77 22.5 22.0 12 13 1 0.531 3.44 6.69 0.1408 1.82 3.55 5.91 23.0 22.4 13 14 1 0.513 3.47 6.68 0.1315 1.78 3.43 6.03 23.2 22.3 14 15 1 0.501 3.45 6.60 0.1254 1.73 3.31 5.95 22.8 21.8 15 16 1 0.476 3.46 6.58 0.1134 1.65 3.13 5.99 22.8 21.6 16 17 1 0.482 3.51 6.55 0.1164 1.69 3.16 6.17 23.0 21.5 17 18 1 0.482 3.56 6.55 0.1164 1.72 3.16 6.33 23.3 21.5 18 19 1 0.482 3.62 6.59 0.1164 1.75 3.18 6.55 23.9 21.7 19 20 1 0.482 3.67 6.65 0.1164 1.77 3.21 6.75 24.4 22.1 20 attr(,"assign") [1] 0 1 2 3 4 5 6 7 8 9 10 $r2nonLog [,1] [1,] 0.993 $dataLogged [1] FALSE attr(,"class") [1] "translogEst" > # with dataLogged = TRUE > estResultShifterLog <- translogEst( "qLogOutput", + xNames = c( "qLogLabor", "qLogLand", "qLogVarInput" ), + data = germanFarms, shifterNames = "time", dataLogged = TRUE ) > all.equal( estResultShifter[ -c(1,6,12,13,14,17) ], + estResultShifterLog[ -c(1,6,12,13,14,17) ] ) [1] TRUE > all.equal( estResultShifter$fitted, exp( estResultShifterLog$fitted ) ) [1] TRUE > # testing translogCalc > fitted <- translogCalc( c( "qLabor", "land", "qVarInput" ), + shifterNames = "tech", data = germanFarms, coef = estResultShifter$coef ) > all.equal( fitted, estResultShifter$fitted ) [1] TRUE > # testing calculation of elasticities with translogEla > estElaShifter <- translogEla( c( "qLabor", "land", "qVarInput" ), + data = germanFarms, coef = coef( estResultShifter ), + coefCov = vcov( estResultShifter ) ) > print( estElaShifter ) qLabor land qVarInput 1 2.225 1.354 0.0944 2 1.580 1.231 0.5009 3 1.487 1.275 0.5243 4 0.967 1.047 0.7821 5 1.017 1.058 0.7277 6 0.900 1.084 0.8274 7 0.682 1.141 1.0041 8 0.767 1.042 0.6465 9 1.020 1.078 0.6486 10 0.645 0.901 0.5118 11 0.244 0.854 0.7653 12 -1.263 0.246 0.7378 13 -1.765 0.173 0.9480 14 -1.860 0.290 0.9743 15 -1.299 0.438 0.6175 16 -1.143 0.604 0.5894 17 -1.307 0.626 0.3555 18 -1.552 0.646 0.3119 19 -2.095 0.627 0.4682 20 -2.650 0.592 0.6938 > print( attributes( estElaShifter )$variance ) qLabor land qVarInput 1 5525 418 1961 2 5594 424 1987 3 5606 423 1989 4 5638 429 2005 5 5629 429 2001 6 5652 429 2008 7 5694 430 2021 8 5623 427 1996 9 5619 427 1996 10 5591 428 1986 11 5639 431 2003 12 5620 439 1997 13 5662 442 2011 14 5683 440 2014 15 5624 433 1991 16 5633 430 1990 17 5606 427 1975 18 5612 425 1973 19 5654 426 1984 20 5706 429 1999 > print( attributes( estElaShifter )$stdDev ) qLabor land qVarInput 1 74.3 20.5 44.3 2 74.8 20.6 44.6 3 74.9 20.6 44.6 4 75.1 20.7 44.8 5 75.0 20.7 44.7 6 75.2 20.7 44.8 7 75.5 20.7 45.0 8 75.0 20.7 44.7 9 75.0 20.7 44.7 10 74.8 20.7 44.6 11 75.1 20.8 44.8 12 75.0 20.9 44.7 13 75.2 21.0 44.8 14 75.4 21.0 44.9 15 75.0 20.8 44.6 16 75.1 20.7 44.6 17 74.9 20.7 44.4 18 74.9 20.6 44.4 19 75.2 20.7 44.5 20 75.5 20.7 44.7 > estElaShifterMet <- elas( estResultShifter ) > all.equal( estElaShifter, estElaShifterMet ) [1] TRUE > estElaShifterLogMet <- elas( estResultShifterLog ) > all.equal( estElaShifterMet, estElaShifterLogMet, check.attributes = FALSE ) [1] TRUE > > ## testing translogEst with two shifters > germanFarms$techSq <- exp( germanFarms$time^2 ) > estResultShifter2 <- translogEst( "qOutput", + c( "qLabor", "land", "qVarInput" ), + shifterNames = c( "tech", "techSq" ), data = germanFarms ) > print( estResultShifter2 ) Estimated Translog function with 20 observations. a_0 a_1 a_2 a_3 b_1_1 b_1_2 b_1_3 b_2_2 95.58953 67.47142 -6.60142 -29.17953 -9.63718 -0.05109 -9.60205 0.12943 b_2_3 b_3_3 d_1 d_2 1.22012 4.49207 0.03707 -0.00243 > summary( estResultShifter2 ) Estimated Translog function with 20 observations. Estimate Std. Error t value Pr(>|t|) a_0 95.58953 105.63575 0.90 0.392 a_1 67.47142 64.71631 1.04 0.328 a_2 -6.60142 19.35514 -0.34 0.742 a_3 -29.17953 38.20210 -0.76 0.467 b_1_1 -9.63718 20.33495 -0.47 0.648 b_1_2 -0.05109 7.93031 -0.01 0.995 b_1_3 -9.60205 11.29856 -0.85 0.420 b_2_2 0.12943 2.48619 0.05 0.960 b_2_3 1.22012 3.72775 0.33 0.752 b_3_3 4.49207 7.16048 0.63 0.548 d_1 0.03707 0.01607 2.31 0.050 * d_2 -0.00243 0.00117 -2.07 0.072 . --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 R-squared: 0.994 Adjusted R-squared: 0.986 > residuals( estResultShifter2 ) 1 2 3 4 5 6 7 8 0.01441 -0.04657 0.01685 0.02045 0.01142 -0.00695 -0.00561 0.00496 9 10 11 12 13 14 15 16 0.00637 -0.02698 0.00697 0.00616 -0.00863 -0.00731 0.02059 0.00813 17 18 19 20 -0.02289 0.00326 0.00885 -0.00348 > print.default( estResultShifter2 ) $call translogEst(yName = "qOutput", xNames = c("qLabor", "land", "qVarInput"), data = germanFarms, shifterNames = c("tech", "techSq")) $nExog [1] 3 $nShifter [1] 2 $est Call: lm(formula = as.formula(estFormula), data = estData) Coefficients: (Intercept) a_1 a_2 a_3 b_1_1 b_1_2 95.58953 67.47142 -6.60142 -29.17953 -9.63718 -0.05109 b_1_3 b_2_2 b_2_3 b_3_3 d_1 d_2 -9.60205 0.12943 1.22012 4.49207 0.03707 -0.00243 $residuals 1 2 3 4 5 6 7 8 0.01441 -0.04657 0.01685 0.02045 0.01142 -0.00695 -0.00561 0.00496 9 10 11 12 13 14 15 16 0.00637 -0.02698 0.00697 0.00616 -0.00863 -0.00731 0.02059 0.00813 17 18 19 20 -0.02289 0.00326 0.00885 -0.00348 $fitted 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 933 1009 1052 1148 1165 1194 1246 1282 1200 1313 1351 1531 1589 1708 1611 1613 17 18 19 20 1693 1750 1871 1999 $coef a_0 a_1 a_2 a_3 b_1_1 b_1_2 b_1_3 b_2_2 95.58953 67.47142 -6.60142 -29.17953 -9.63718 -0.05109 -9.60205 0.12943 b_2_3 b_3_3 d_1 d_2 1.22012 4.49207 0.03707 -0.00243 $coefCov a_0 a_1 a_2 a_3 b_1_1 b_1_2 b_1_3 a_0 1.12e+04 5.67e+03 2.67e+02 -3.94e+03 8.78e+02 -6.16300 -9.23e+02 a_1 5.67e+03 4.19e+03 -3.79e+02 -1.82e+03 9.11e+02 -23.27303 -6.88e+02 a_2 2.67e+02 -3.79e+02 3.75e+02 -2.50e+02 -1.38e+02 -39.44243 8.65e+01 a_3 -3.94e+03 -1.82e+03 -2.50e+02 1.46e+03 -2.58e+02 24.02958 2.84e+02 b_1_1 8.78e+02 9.11e+02 -1.38e+02 -2.58e+02 4.14e+02 -40.33289 -1.46e+02 b_1_2 -6.16e+00 -2.33e+01 -3.94e+01 2.40e+01 -4.03e+01 62.88984 -2.55e+01 b_1_3 -9.23e+02 -6.88e+02 8.65e+01 2.84e+02 -1.46e+02 -25.49360 1.28e+02 b_2_2 4.19e+01 -1.56e+01 2.65e+01 -2.53e+01 -7.25e-01 -4.62257 4.80e+00 b_2_3 -6.11e+01 6.83e+01 -6.86e+01 4.95e+01 2.39e+01 4.01848 -1.40e+01 b_3_3 6.97e+02 2.90e+02 6.81e+01 -2.68e+02 3.70e+01 -4.05044 -4.48e+01 d_1 9.70e-03 -3.72e-02 -1.29e-01 6.74e-02 -2.53e-02 0.06298 -2.43e-02 d_2 -1.25e-02 -8.40e-03 8.99e-03 -2.64e-04 3.39e-03 -0.00301 2.55e-03 b_2_2 b_2_3 b_3_3 d_1 d_2 a_0 4.19e+01 -61.10850 6.97e+02 9.70e-03 -1.25e-02 a_1 -1.56e+01 68.25813 2.90e+02 -3.72e-02 -8.40e-03 a_2 2.65e+01 -68.56555 6.81e+01 -1.29e-01 8.99e-03 a_3 -2.53e+01 49.46897 -2.68e+02 6.74e-02 -2.64e-04 b_1_1 -7.25e-01 23.92018 3.70e+01 -2.53e-02 3.39e-03 b_1_2 -4.62e+00 4.01848 -4.05e+00 6.30e-02 -3.01e-03 b_1_3 4.80e+00 -13.99477 -4.48e+01 -2.43e-02 2.55e-03 b_2_2 6.18e+00 -6.96699 7.14e+00 1.85e-04 2.02e-04 b_2_3 -6.97e+00 13.89612 -1.38e+01 1.61e-02 -1.36e-03 b_3_3 7.14e+00 -13.84468 5.13e+01 -1.75e-02 6.21e-04 d_1 1.85e-04 0.01608 -1.75e-02 2.58e-04 -1.65e-05 d_2 2.02e-04 -0.00136 6.21e-04 -1.65e-05 1.38e-06 $r2 [1] 0.994 $r2bar [1] 0.986 $nObs [1] 20 $yName [1] "qOutput" $xNames [1] "qLabor" "land" "qVarInput" $shifterNames [1] "tech" "techSq" $model.matrix (Intercept) a_1 a_2 a_3 b_1_1 b_1_2 b_1_3 b_2_2 b_2_3 b_3_3 d_1 d_2 1 1 0.365 3.15 6.32 0.0665 1.15 2.31 4.97 19.9 20.0 1 1 2 1 0.372 3.19 6.41 0.0690 1.18 2.38 5.08 20.4 20.5 2 4 3 1 0.365 3.21 6.41 0.0665 1.17 2.34 5.14 20.6 20.5 3 9 4 1 0.392 3.22 6.48 0.0768 1.26 2.54 5.17 20.8 21.0 4 16 5 1 0.392 3.22 6.47 0.0768 1.26 2.54 5.17 20.8 21.0 5 25 6 1 0.385 3.23 6.49 0.0742 1.24 2.50 5.21 20.9 21.0 6 36 7 1 0.372 3.25 6.51 0.0690 1.21 2.42 5.30 21.2 21.2 7 49 8 1 0.399 3.26 6.47 0.0795 1.30 2.58 5.30 21.1 21.0 8 64 9 1 0.392 3.23 6.46 0.0768 1.26 2.53 5.20 20.8 20.9 9 81 10 1 0.425 3.26 6.47 0.0904 1.39 2.75 5.32 21.1 21.0 10 100 11 1 0.425 3.29 6.53 0.0904 1.40 2.78 5.40 21.5 21.3 11 121 12 1 0.525 3.40 6.63 0.1377 1.78 3.48 5.77 22.5 22.0 12 144 13 1 0.531 3.44 6.69 0.1408 1.82 3.55 5.91 23.0 22.4 13 169 14 1 0.513 3.47 6.68 0.1315 1.78 3.43 6.03 23.2 22.3 14 196 15 1 0.501 3.45 6.60 0.1254 1.73 3.31 5.95 22.8 21.8 15 225 16 1 0.476 3.46 6.58 0.1134 1.65 3.13 5.99 22.8 21.6 16 256 17 1 0.482 3.51 6.55 0.1164 1.69 3.16 6.17 23.0 21.5 17 289 18 1 0.482 3.56 6.55 0.1164 1.72 3.16 6.33 23.3 21.5 18 324 19 1 0.482 3.62 6.59 0.1164 1.75 3.18 6.55 23.9 21.7 19 361 20 1 0.482 3.67 6.65 0.1164 1.77 3.21 6.75 24.4 22.1 20 400 attr(,"assign") [1] 0 1 2 3 4 5 6 7 8 9 10 11 $r2nonLog [,1] [1,] 0.995 $dataLogged [1] FALSE attr(,"class") [1] "translogEst" > # testing translogCalc > fitted <- translogCalc( c( "qLabor", "land", "qVarInput" ), + shifterNames = c( "tech", "techSq" ), data = germanFarms, + coef = estResultShifter2$coef ) > all.equal( fitted, estResultShifter2$fitted ) [1] TRUE > > ## testing translogEst with a logical variable as shifter > germanFarms$reUnif <- germanFarms$time >= 16 > estResultShifterLogi <- translogEst( "qOutput", + c( "qLabor", "land", "qVarInput" ), + shifterNames = "reUnif", data = germanFarms ) > print( estResultShifterLogi ) Estimated Translog function with 20 observations. a_0 a_1 a_2 a_3 b_1_1 b_1_2 b_1_3 b_2_2 85.3320 64.4796 19.4934 -39.3481 -8.9462 -9.1529 -4.6445 0.2614 b_2_3 b_3_3 d_1_TRUE -2.2745 7.5639 -0.0674 > summary( estResultShifterLogi ) Estimated Translog function with 20 observations. Estimate Std. Error t value Pr(>|t|) a_0 85.3320 112.1714 0.76 0.47 a_1 64.4796 67.0737 0.96 0.36 a_2 19.4934 19.5958 0.99 0.35 a_3 -39.3481 40.3884 -0.97 0.36 b_1_1 -8.9462 21.7900 -0.41 0.69 b_1_2 -9.1529 7.2109 -1.27 0.24 b_1_3 -4.6445 11.9982 -0.39 0.71 b_2_2 0.2614 2.6614 0.10 0.92 b_2_3 -2.2745 3.9030 -0.58 0.57 b_3_3 7.5639 7.6132 0.99 0.35 d_1_TRUE -0.0674 0.0437 -1.54 0.16 R-squared: 0.992 Adjusted R-squared: 0.983 > residuals( estResultShifterLogi ) 1 2 3 4 5 6 7 8 0.013460 -0.059786 0.012364 0.009952 0.020372 0.002762 -0.008802 0.018159 9 10 11 12 13 14 15 16 0.028258 -0.020858 -0.023040 0.010465 -0.011312 0.001630 0.006374 0.008557 17 18 19 20 -0.011357 -0.000908 0.006360 -0.002652 > print.default( estResultShifterLogi ) $call translogEst(yName = "qOutput", xNames = c("qLabor", "land", "qVarInput"), data = germanFarms, shifterNames = "reUnif") $nExog [1] 3 $nShifter [1] 1 $est Call: lm(formula = as.formula(estFormula), data = estData) Coefficients: (Intercept) a_1 a_2 a_3 b_1_1 b_1_2 85.3320 64.4796 19.4934 -39.3481 -8.9462 -9.1529 b_1_3 b_2_2 b_2_3 b_3_3 d_1_TRUE -4.6445 0.2614 -2.2745 7.5639 -0.0674 $residuals 1 2 3 4 5 6 7 8 0.013460 -0.059786 0.012364 0.009952 0.020372 0.002762 -0.008802 0.018159 9 10 11 12 13 14 15 16 0.028258 -0.020858 -0.023040 0.010465 -0.011312 0.001630 0.006374 0.008557 17 18 19 20 -0.011357 -0.000908 0.006360 -0.002652 $fitted 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 933 1022 1056 1160 1154 1183 1250 1265 1174 1305 1392 1525 1593 1693 1634 1612 17 18 19 20 1674 1757 1875 1997 $coef a_0 a_1 a_2 a_3 b_1_1 b_1_2 b_1_3 b_2_2 85.3320 64.4796 19.4934 -39.3481 -8.9462 -9.1529 -4.6445 0.2614 b_2_3 b_3_3 d_1_TRUE -2.2745 7.5639 -0.0674 $coefCov a_0 a_1 a_2 a_3 b_1_1 b_1_2 b_1_3 a_0 12582.431 6201.896 328.752 -4.44e+03 1115.3452 34.31397 -1.04e+03 a_1 6201.896 4498.877 -457.149 -1.97e+03 1140.6875 23.52100 -7.75e+02 a_2 328.752 -457.149 383.996 -2.68e+02 -191.4866 -12.69303 8.85e+01 a_3 -4442.188 -1965.674 -267.717 1.63e+03 -318.6963 -5.75821 3.25e+02 b_1_1 1115.345 1140.687 -191.487 -3.19e+02 474.8052 -46.16357 -1.82e+02 b_1_2 34.314 23.521 -12.693 -5.76e+00 -46.1636 51.99768 -2.68e+01 b_1_3 -1040.562 -774.797 88.459 3.25e+02 -182.4383 -26.75194 1.44e+02 b_2_2 57.893 -10.212 30.910 -3.29e+01 -2.3556 -6.26528 4.93e+00 b_2_3 -83.584 72.612 -73.509 5.85e+01 33.5644 1.46660 -1.40e+01 b_3_3 794.050 315.917 72.797 -3.02e+02 43.6411 2.02171 -5.23e+01 d_1_TRUE 0.185 0.176 -0.209 3.66e-02 0.0932 0.00746 -3.62e-02 b_2_2 b_2_3 b_3_3 d_1_TRUE a_0 57.8927 -83.5839 794.0501 0.18501 a_1 -10.2120 72.6123 315.9170 0.17598 a_2 30.9096 -73.5094 72.7972 -0.20906 a_3 -32.8504 58.5331 -302.0089 0.03658 b_1_1 -2.3556 33.5644 43.6411 0.09316 b_1_2 -6.2653 1.4666 2.0217 0.00746 b_1_3 4.9341 -14.0173 -52.3229 -0.03615 b_2_2 7.0833 -7.9736 8.7958 -0.00330 b_2_3 -7.9736 15.2335 -15.8524 0.03177 b_3_3 8.7958 -15.8524 57.9607 -0.01849 d_1_TRUE -0.0033 0.0318 -0.0185 0.00191 $r2 [1] 0.992 $r2bar [1] 0.983 $nObs [1] 20 $yName [1] "qOutput" $xNames [1] "qLabor" "land" "qVarInput" $shifterNames [1] "reUnif" $model.matrix (Intercept) a_1 a_2 a_3 b_1_1 b_1_2 b_1_3 b_2_2 b_2_3 b_3_3 d_1_TRUE 1 1 0.365 3.15 6.32 0.0665 1.15 2.31 4.97 19.9 20.0 0 2 1 0.372 3.19 6.41 0.0690 1.18 2.38 5.08 20.4 20.5 0 3 1 0.365 3.21 6.41 0.0665 1.17 2.34 5.14 20.6 20.5 0 4 1 0.392 3.22 6.48 0.0768 1.26 2.54 5.17 20.8 21.0 0 5 1 0.392 3.22 6.47 0.0768 1.26 2.54 5.17 20.8 21.0 0 6 1 0.385 3.23 6.49 0.0742 1.24 2.50 5.21 20.9 21.0 0 7 1 0.372 3.25 6.51 0.0690 1.21 2.42 5.30 21.2 21.2 0 8 1 0.399 3.26 6.47 0.0795 1.30 2.58 5.30 21.1 21.0 0 9 1 0.392 3.23 6.46 0.0768 1.26 2.53 5.20 20.8 20.9 0 10 1 0.425 3.26 6.47 0.0904 1.39 2.75 5.32 21.1 21.0 0 11 1 0.425 3.29 6.53 0.0904 1.40 2.78 5.40 21.5 21.3 0 12 1 0.525 3.40 6.63 0.1377 1.78 3.48 5.77 22.5 22.0 0 13 1 0.531 3.44 6.69 0.1408 1.82 3.55 5.91 23.0 22.4 0 14 1 0.513 3.47 6.68 0.1315 1.78 3.43 6.03 23.2 22.3 0 15 1 0.501 3.45 6.60 0.1254 1.73 3.31 5.95 22.8 21.8 0 16 1 0.476 3.46 6.58 0.1134 1.65 3.13 5.99 22.8 21.6 1 17 1 0.482 3.51 6.55 0.1164 1.69 3.16 6.17 23.0 21.5 1 18 1 0.482 3.56 6.55 0.1164 1.72 3.16 6.33 23.3 21.5 1 19 1 0.482 3.62 6.59 0.1164 1.75 3.18 6.55 23.9 21.7 1 20 1 0.482 3.67 6.65 0.1164 1.77 3.21 6.75 24.4 22.1 1 attr(,"assign") [1] 0 1 2 3 4 5 6 7 8 9 10 attr(,"contrasts") attr(,"contrasts")$d_1_ [1] "contr.treatment" $r2nonLog [,1] [1,] 0.995 $dataLogged [1] FALSE attr(,"class") [1] "translogEst" > # with dataLogged = TRUE > estResultShifterLogiLog <- translogEst( "qLogOutput", + xNames = c( "qLogLabor", "qLogLand", "qLogVarInput" ), + data = germanFarms, shifterNames = "reUnif", dataLogged = TRUE ) > all.equal( estResultShifterLogi[ -c(1,6,12,13,17) ], + estResultShifterLogiLog[ -c(1,6,12,13,17) ] ) [1] TRUE > all.equal( estResultShifterLogi$fitted, exp( estResultShifterLogiLog$fitted ) ) [1] TRUE > # testing translogCalc > fitted <- translogCalc( c( "qLabor", "land", "qVarInput" ), + shifterNames = c( "reUnif" ), data = germanFarms, + coef = estResultShifterLogi$coef ) > all.equal( fitted, estResultShifterLogi$fitted ) [1] TRUE > > ## testing translogEst with a factor as shifter > germanFarms$decade <- as.factor( c( rep( "70s", 5 ), rep( "80s", 10 ), + rep( "90s", 5 ) ) ) > estResultShifterFac <- translogEst( "qOutput", + c( "qLabor", "land", "qVarInput" ), + shifterNames = "decade", data = germanFarms ) > print( estResultShifterFac ) Estimated Translog function with 20 observations. a_0 a_1 a_2 a_3 b_1_1 b_1_2 b_1_3 b_2_2 79.19925 60.84800 18.74509 -36.83269 -9.81003 -8.53369 -4.34084 0.26040 b_2_3 b_3_3 d_1_80s d_1_90s -2.20612 7.12358 0.00441 -0.06082 > summary( estResultShifterFac ) Estimated Translog function with 20 observations. Estimate Std. Error t value Pr(>|t|) a_0 79.19925 127.31064 0.62 0.55 a_1 60.84800 76.03184 0.80 0.45 a_2 18.74509 21.49562 0.87 0.41 a_3 -36.83269 46.70874 -0.79 0.45 b_1_1 -9.81003 23.96482 -0.41 0.69 b_1_2 -8.53369 8.92287 -0.96 0.37 b_1_3 -4.34084 12.91117 -0.34 0.75 b_2_2 0.26040 2.81971 0.09 0.93 b_2_3 -2.20612 4.16633 -0.53 0.61 b_3_3 7.12358 8.70653 0.82 0.44 d_1_80s 0.00441 0.03285 0.13 0.90 d_1_90s -0.06082 0.06727 -0.90 0.39 R-squared: 0.992 Adjusted R-squared: 0.981 > residuals( estResultShifterFac ) 1 2 3 4 5 6 7 8 0.013405 -0.060079 0.013564 0.011335 0.021775 0.000580 -0.008497 0.017839 9 10 11 12 13 14 15 16 0.026051 -0.020887 -0.022241 0.010516 -0.011606 0.001766 0.006479 0.008618 17 18 19 20 -0.011422 -0.000781 0.006188 -0.002602 > print.default( estResultShifterFac ) $call translogEst(yName = "qOutput", xNames = c("qLabor", "land", "qVarInput"), data = germanFarms, shifterNames = "decade") $nExog [1] 3 $nShifter [1] 1 $est Call: lm(formula = as.formula(estFormula), data = estData) Coefficients: (Intercept) a_1 a_2 a_3 b_1_1 b_1_2 79.19925 60.84800 18.74509 -36.83269 -9.81003 -8.53369 b_1_3 b_2_2 b_2_3 b_3_3 d_1_80s d_1_90s -4.34084 0.26040 -2.20612 7.12358 0.00441 -0.06082 $residuals 1 2 3 4 5 6 7 8 0.013405 -0.060079 0.013564 0.011335 0.021775 0.000580 -0.008497 0.017839 9 10 11 12 13 14 15 16 0.026051 -0.020887 -0.022241 0.010516 -0.011606 0.001766 0.006479 0.008618 17 18 19 20 -0.011422 -0.000781 0.006188 -0.002602 $fitted 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 934 1022 1055 1159 1153 1185 1250 1266 1177 1305 1391 1525 1593 1693 1634 1612 17 18 19 20 1674 1757 1876 1997 $coef a_0 a_1 a_2 a_3 b_1_1 b_1_2 b_1_3 b_2_2 79.19925 60.84800 18.74509 -36.83269 -9.81003 -8.53369 -4.34084 0.26040 b_2_3 b_3_3 d_1_80s d_1_90s -2.20612 7.12358 0.00441 -0.06082 $coefCov a_0 a_1 a_2 a_3 b_1_1 b_1_2 b_1_3 a_0 16208.00 8195.872 623.384 -5841.253 1545.568 -171.964 -1.27e+03 a_1 8195.87 5780.841 -362.506 -2712.732 1454.262 -98.238 -9.31e+02 a_2 623.38 -362.506 462.062 -404.838 -179.109 -39.931 8.67e+01 a_3 -5841.25 -2712.732 -404.838 2181.706 -478.163 79.868 4.07e+02 b_1_1 1545.57 1454.262 -179.109 -478.163 574.313 -81.464 -2.19e+02 b_1_2 -171.96 -98.238 -39.931 79.868 -81.464 79.618 -1.96e+01 b_1_3 -1271.22 -930.809 86.697 407.307 -219.320 -19.606 1.67e+02 b_2_2 65.31 -11.267 34.735 -37.009 -2.598 -7.066 5.52e+00 b_2_3 -117.06 67.742 -85.348 75.234 34.401 3.993 -1.46e+01 b_3_3 1040.96 443.231 99.975 -400.381 70.066 -12.842 -6.61e+01 d_1_80s -1.50 -0.888 -0.183 0.615 -0.211 0.151 7.43e-02 d_1_90s -2.02 -1.122 -0.507 0.955 -0.209 0.233 6.98e-02 b_2_2 b_2_3 b_3_3 d_1_80s d_1_90s a_0 6.53e+01 -117.0614 1040.957 -1.499828 -2.02143 a_1 -1.13e+01 67.7424 443.231 -0.888147 -1.12247 a_2 3.47e+01 -85.3479 99.975 -0.183012 -0.50667 a_3 -3.70e+01 75.2343 -400.381 0.615178 0.95536 b_1_1 -2.60e+00 34.4014 70.066 -0.211258 -0.20941 b_1_2 -7.07e+00 3.9928 -12.842 0.151435 0.23344 b_1_3 5.52e+00 -14.5832 -66.141 0.074264 0.06979 b_2_2 7.95e+00 -8.9538 9.897 -0.000238 -0.00406 b_2_3 -8.95e+00 17.3583 -19.462 0.016721 0.06051 b_3_3 9.90e+00 -19.4624 75.804 -0.107677 -0.18078 d_1_80s -2.38e-04 0.0167 -0.108 0.001079 0.00160 d_1_90s -4.06e-03 0.0605 -0.181 0.001604 0.00453 $r2 [1] 0.992 $r2bar [1] 0.981 $nObs [1] 20 $yName [1] "qOutput" $xNames [1] "qLabor" "land" "qVarInput" $shifterNames [1] "decade" $model.matrix (Intercept) a_1 a_2 a_3 b_1_1 b_1_2 b_1_3 b_2_2 b_2_3 b_3_3 d_1_80s 1 1 0.365 3.15 6.32 0.0665 1.15 2.31 4.97 19.9 20.0 0 2 1 0.372 3.19 6.41 0.0690 1.18 2.38 5.08 20.4 20.5 0 3 1 0.365 3.21 6.41 0.0665 1.17 2.34 5.14 20.6 20.5 0 4 1 0.392 3.22 6.48 0.0768 1.26 2.54 5.17 20.8 21.0 0 5 1 0.392 3.22 6.47 0.0768 1.26 2.54 5.17 20.8 21.0 0 6 1 0.385 3.23 6.49 0.0742 1.24 2.50 5.21 20.9 21.0 1 7 1 0.372 3.25 6.51 0.0690 1.21 2.42 5.30 21.2 21.2 1 8 1 0.399 3.26 6.47 0.0795 1.30 2.58 5.30 21.1 21.0 1 9 1 0.392 3.23 6.46 0.0768 1.26 2.53 5.20 20.8 20.9 1 10 1 0.425 3.26 6.47 0.0904 1.39 2.75 5.32 21.1 21.0 1 11 1 0.425 3.29 6.53 0.0904 1.40 2.78 5.40 21.5 21.3 1 12 1 0.525 3.40 6.63 0.1377 1.78 3.48 5.77 22.5 22.0 1 13 1 0.531 3.44 6.69 0.1408 1.82 3.55 5.91 23.0 22.4 1 14 1 0.513 3.47 6.68 0.1315 1.78 3.43 6.03 23.2 22.3 1 15 1 0.501 3.45 6.60 0.1254 1.73 3.31 5.95 22.8 21.8 1 16 1 0.476 3.46 6.58 0.1134 1.65 3.13 5.99 22.8 21.6 0 17 1 0.482 3.51 6.55 0.1164 1.69 3.16 6.17 23.0 21.5 0 18 1 0.482 3.56 6.55 0.1164 1.72 3.16 6.33 23.3 21.5 0 19 1 0.482 3.62 6.59 0.1164 1.75 3.18 6.55 23.9 21.7 0 20 1 0.482 3.67 6.65 0.1164 1.77 3.21 6.75 24.4 22.1 0 d_1_90s 1 0 2 0 3 0 4 0 5 0 6 0 7 0 8 0 9 0 10 0 11 0 12 0 13 0 14 0 15 0 16 1 17 1 18 1 19 1 20 1 attr(,"assign") [1] 0 1 2 3 4 5 6 7 8 9 10 10 attr(,"contrasts") attr(,"contrasts")$d_1_ [1] "contr.treatment" $r2nonLog [,1] [1,] 0.995 $dataLogged [1] FALSE attr(,"class") [1] "translogEst" > # with dataLogged = TRUE > estResultShifterFacLog <- translogEst( "qLogOutput", + xNames = c( "qLogLabor", "qLogLand", "qLogVarInput" ), + data = germanFarms, shifterNames = "decade", dataLogged = TRUE ) > all.equal( estResultShifterFac[ -c(1,6,12,13,17) ], + estResultShifterFacLog[ -c(1,6,12,13,17) ] ) [1] TRUE > all.equal( estResultShifterFac$fitted, exp( estResultShifterFacLog$fitted ) ) [1] TRUE > # testing translogCalc > fitted <- translogCalc( c( "qLabor", "land", "qVarInput" ), + shifterNames = c( "decade" ), data = germanFarms, + coef = estResultShifterFac$coef ) > all.equal( fitted, estResultShifterFac$fitted ) [1] TRUE > > ## testing translogEst with some shifters and one is logical > estResultShifterLogi2 <- translogEst( "qOutput", + c( "qLabor", "land", "qVarInput" ), + shifterNames = c( "tech", "reUnif" ), data = germanFarms ) > print( estResultShifterLogi2 ) Estimated Translog function with 20 observations. a_0 a_1 a_2 a_3 b_1_1 b_1_2 b_1_3 b_2_2 73.44737 52.77497 16.88108 -33.51222 -7.29280 -6.72337 -4.19956 0.48257 b_2_3 b_3_3 d_1 d_2_TRUE -2.19335 6.60528 0.00542 -0.06134 > summary( estResultShifterLogi2 ) Estimated Translog function with 20 observations. Estimate Std. Error t value Pr(>|t|) a_0 73.44737 117.99704 0.62 0.55 a_1 52.77497 72.21483 0.73 0.49 a_2 16.88108 20.77968 0.81 0.44 a_3 -33.51222 42.99007 -0.78 0.46 b_1_1 -7.29280 22.76620 -0.32 0.76 b_1_2 -6.72337 8.49074 -0.79 0.45 b_1_3 -4.19956 12.46668 -0.34 0.74 b_2_2 0.48257 2.78467 0.17 0.87 b_2_3 -2.19335 4.05056 -0.54 0.60 b_3_3 6.60528 8.05428 0.82 0.44 d_1 0.00542 0.00897 0.60 0.56 d_2_TRUE -0.06134 0.04640 -1.32 0.22 R-squared: 0.992 Adjusted R-squared: 0.982 > residuals( estResultShifterLogi2 ) 1 2 3 4 5 6 7 8 0.013203 -0.058151 0.014861 0.016117 0.021710 0.000943 -0.009290 0.022381 9 10 11 12 13 14 15 16 0.013313 -0.020181 -0.022158 0.012285 -0.014199 0.003718 0.005448 0.008631 17 18 19 20 -0.011395 -0.000845 0.006402 -0.002794 > print.default( estResultShifterLogi2 ) $call translogEst(yName = "qOutput", xNames = c("qLabor", "land", "qVarInput"), data = germanFarms, shifterNames = c("tech", "reUnif")) $nExog [1] 3 $nShifter [1] 2 $est Call: lm(formula = as.formula(estFormula), data = estData) Coefficients: (Intercept) a_1 a_2 a_3 b_1_1 b_1_2 73.44737 52.77497 16.88108 -33.51222 -7.29280 -6.72337 b_1_3 b_2_2 b_2_3 b_3_3 d_1 d_2_TRUE -4.19956 0.48257 -2.19335 6.60528 0.00542 -0.06134 $residuals 1 2 3 4 5 6 7 8 0.013203 -0.058151 0.014861 0.016117 0.021710 0.000943 -0.009290 0.022381 9 10 11 12 13 14 15 16 0.013313 -0.020181 -0.022158 0.012285 -0.014199 0.003718 0.005448 0.008631 17 18 19 20 -0.011395 -0.000845 0.006402 -0.002794 $fitted 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 934 1020 1054 1153 1153 1185 1251 1260 1192 1304 1391 1522 1598 1690 1636 1612 17 18 19 20 1674 1757 1875 1997 $coef a_0 a_1 a_2 a_3 b_1_1 b_1_2 b_1_3 b_2_2 73.44737 52.77497 16.88108 -33.51222 -7.29280 -6.72337 -4.19956 0.48257 b_2_3 b_3_3 d_1 d_2_TRUE -2.19335 6.60528 0.00542 -0.06134 $coefCov a_0 a_1 a_2 a_3 b_1_1 b_1_2 b_1_3 a_0 1.39e+04 7.05e+03 438.6393 -4.97e+03 1146.1789 -42.0888 -1.13e+03 a_1 7.05e+03 5.21e+03 -408.1605 -2.30e+03 1174.2577 -52.5039 -8.48e+02 a_2 4.39e+02 -4.08e+02 431.7952 -3.30e+02 -217.8297 -31.0219 9.20e+01 a_3 -4.97e+03 -2.30e+03 -329.7387 1.85e+03 -316.4678 32.6004 3.57e+02 b_1_1 1.15e+03 1.17e+03 -217.8297 -3.16e+02 518.3001 -38.6738 -1.94e+02 b_1_2 -4.21e+01 -5.25e+01 -31.0219 3.26e+01 -38.6738 72.0926 -2.58e+01 b_1_3 -1.13e+03 -8.48e+02 91.9882 3.57e+02 -194.2635 -25.8233 1.55e+02 b_2_2 5.51e+01 -1.81e+01 31.6730 -3.18e+01 -1.5336 -5.2700 5.58e+00 b_2_3 -9.26e+01 7.55e+01 -79.6652 6.43e+01 36.4774 2.1173 -1.50e+01 b_3_3 8.85e+02 3.71e+02 85.1710 -3.40e+02 42.6146 -4.1974 -5.75e+01 d_1 -1.76e-01 -1.74e-01 -0.0388 8.66e-02 0.0245 0.0361 6.60e-03 d_2_TRUE 2.78e-03 -3.96e-03 -0.2681 1.36e-01 0.1275 0.0481 -3.15e-02 b_2_2 b_2_3 b_3_3 d_1 d_2_TRUE a_0 5.51e+01 -92.5626 885.4523 -1.76e-01 2.78e-03 a_1 -1.81e+01 75.5213 370.5800 -1.74e-01 -3.96e-03 a_2 3.17e+01 -79.6652 85.1710 -3.88e-02 -2.68e-01 a_3 -3.18e+01 64.2687 -340.2238 8.66e-02 1.36e-01 b_1_1 -1.53e+00 36.4774 42.6146 2.45e-02 1.28e-01 b_1_2 -5.27e+00 2.1173 -4.1974 3.61e-02 4.81e-02 b_1_3 5.58e+00 -14.9818 -57.4587 6.60e-03 -3.15e-02 b_2_2 7.75e+00 -8.5293 8.8828 3.28e-03 9.91e-05 b_2_3 -8.53e+00 16.4071 -17.2677 1.20e-03 3.55e-02 b_3_3 8.88e+00 -17.2677 64.8714 -1.42e-02 -3.57e-02 d_1 3.28e-03 0.0012 -0.0142 8.05e-05 8.96e-05 d_2_TRUE 9.91e-05 0.0355 -0.0357 8.96e-05 2.15e-03 $r2 [1] 0.992 $r2bar [1] 0.982 $nObs [1] 20 $yName [1] "qOutput" $xNames [1] "qLabor" "land" "qVarInput" $shifterNames [1] "tech" "reUnif" $model.matrix (Intercept) a_1 a_2 a_3 b_1_1 b_1_2 b_1_3 b_2_2 b_2_3 b_3_3 d_1 1 1 0.365 3.15 6.32 0.0665 1.15 2.31 4.97 19.9 20.0 1 2 1 0.372 3.19 6.41 0.0690 1.18 2.38 5.08 20.4 20.5 2 3 1 0.365 3.21 6.41 0.0665 1.17 2.34 5.14 20.6 20.5 3 4 1 0.392 3.22 6.48 0.0768 1.26 2.54 5.17 20.8 21.0 4 5 1 0.392 3.22 6.47 0.0768 1.26 2.54 5.17 20.8 21.0 5 6 1 0.385 3.23 6.49 0.0742 1.24 2.50 5.21 20.9 21.0 6 7 1 0.372 3.25 6.51 0.0690 1.21 2.42 5.30 21.2 21.2 7 8 1 0.399 3.26 6.47 0.0795 1.30 2.58 5.30 21.1 21.0 8 9 1 0.392 3.23 6.46 0.0768 1.26 2.53 5.20 20.8 20.9 9 10 1 0.425 3.26 6.47 0.0904 1.39 2.75 5.32 21.1 21.0 10 11 1 0.425 3.29 6.53 0.0904 1.40 2.78 5.40 21.5 21.3 11 12 1 0.525 3.40 6.63 0.1377 1.78 3.48 5.77 22.5 22.0 12 13 1 0.531 3.44 6.69 0.1408 1.82 3.55 5.91 23.0 22.4 13 14 1 0.513 3.47 6.68 0.1315 1.78 3.43 6.03 23.2 22.3 14 15 1 0.501 3.45 6.60 0.1254 1.73 3.31 5.95 22.8 21.8 15 16 1 0.476 3.46 6.58 0.1134 1.65 3.13 5.99 22.8 21.6 16 17 1 0.482 3.51 6.55 0.1164 1.69 3.16 6.17 23.0 21.5 17 18 1 0.482 3.56 6.55 0.1164 1.72 3.16 6.33 23.3 21.5 18 19 1 0.482 3.62 6.59 0.1164 1.75 3.18 6.55 23.9 21.7 19 20 1 0.482 3.67 6.65 0.1164 1.77 3.21 6.75 24.4 22.1 20 d_2_TRUE 1 0 2 0 3 0 4 0 5 0 6 0 7 0 8 0 9 0 10 0 11 0 12 0 13 0 14 0 15 0 16 1 17 1 18 1 19 1 20 1 attr(,"assign") [1] 0 1 2 3 4 5 6 7 8 9 10 11 attr(,"contrasts") attr(,"contrasts")$d_2_ [1] "contr.treatment" $r2nonLog [,1] [1,] 0.995 $dataLogged [1] FALSE attr(,"class") [1] "translogEst" > # testing translogCalc > fitted <- translogCalc( c( "qLabor", "land", "qVarInput" ), + shifterNames = c( "tech", "reUnif" ), data = germanFarms, + coef = estResultShifterLogi2$coef ) > all.equal( fitted, estResultShifterLogi2$fitted ) [1] TRUE > > ## testing translogEst with some shifters and one is a factor > estResultShifterFac2 <- translogEst( "qOutput", + c( "qLabor", "land", "qVarInput" ), + shifterNames = c( "tech", "decade" ), data = germanFarms ) > print( estResultShifterFac2 ) Estimated Translog function with 20 observations. a_0 a_1 a_2 a_3 b_1_1 b_1_2 b_1_3 b_2_2 91.53512 60.26224 18.28544 -40.26722 -2.44666 -7.70035 -5.19432 0.63953 b_2_3 b_3_3 d_1 d_2_80s d_2_90s -2.43048 7.83108 0.00917 -0.01892 -0.08529 > summary( estResultShifterFac2 ) Estimated Translog function with 20 observations. Estimate Std. Error t value Pr(>|t|) a_0 91.53512 133.04629 0.69 0.51 a_1 60.26224 78.72169 0.77 0.47 a_2 18.28544 22.26500 0.82 0.44 a_3 -40.26722 48.62072 -0.83 0.43 b_1_1 -2.44666 27.06594 -0.09 0.93 b_1_2 -7.70035 9.31872 -0.83 0.44 b_1_3 -5.19432 13.42579 -0.39 0.71 b_2_2 0.63953 2.97193 0.22 0.84 b_2_3 -2.43048 4.32604 -0.56 0.59 b_3_3 7.83108 9.07372 0.86 0.42 d_1 0.00917 0.01347 0.68 0.52 d_2_80s -0.01892 0.04828 -0.39 0.71 d_2_90s -0.08529 0.07838 -1.09 0.31 R-squared: 0.993 Adjusted R-squared: 0.98 > residuals( estResultShifterFac2 ) 1 2 3 4 5 6 7 8 0.01326 -0.05577 0.01144 0.01444 0.01662 0.00904 -0.01093 0.02667 9 10 11 12 13 14 15 16 0.01245 -0.01959 -0.02497 0.01332 -0.01493 0.00458 0.00436 0.00842 17 18 19 20 -0.01114 -0.00135 0.00717 -0.00310 > print.default( estResultShifterFac2 ) $call translogEst(yName = "qOutput", xNames = c("qLabor", "land", "qVarInput"), data = germanFarms, shifterNames = c("tech", "decade")) $nExog [1] 3 $nShifter [1] 2 $est Call: lm(formula = as.formula(estFormula), data = estData) Coefficients: (Intercept) a_1 a_2 a_3 b_1_1 b_1_2 91.53512 60.26224 18.28544 -40.26722 -2.44666 -7.70035 b_1_3 b_2_2 b_2_3 b_3_3 d_1 d_2_80s -5.19432 0.63953 -2.43048 7.83108 0.00917 -0.01892 d_2_90s -0.08529 $residuals 1 2 3 4 5 6 7 8 0.01326 -0.05577 0.01144 0.01444 0.01662 0.00904 -0.01093 0.02667 9 10 11 12 13 14 15 16 0.01245 -0.01959 -0.02497 0.01332 -0.01493 0.00458 0.00436 0.00842 17 18 19 20 -0.01114 -0.00135 0.00717 -0.00310 $fitted 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 934 1018 1057 1155 1159 1175 1253 1255 1193 1304 1395 1520 1599 1688 1638 1612 17 18 19 20 1674 1758 1874 1998 $coef a_0 a_1 a_2 a_3 b_1_1 b_1_2 b_1_3 b_2_2 91.53512 60.26224 18.28544 -40.26722 -2.44666 -7.70035 -5.19432 0.63953 b_2_3 b_3_3 d_1 d_2_80s d_2_90s -2.43048 7.83108 0.00917 -0.01892 -0.08529 $coefCov a_0 a_1 a_2 a_3 b_1_1 b_1_2 b_1_3 a_0 17701.316 8.77e+03 6.56e+02 -6.35e+03 1852.625 -162.1467 -1.39e+03 a_1 8769.398 6.20e+03 -3.88e+02 -2.90e+03 1549.489 -106.3519 -9.97e+02 a_2 655.959 -3.88e+02 4.96e+02 -4.31e+02 -199.285 -43.6274 9.38e+01 a_3 -6352.523 -2.90e+03 -4.31e+02 2.36e+03 -567.092 79.4344 4.43e+02 b_1_1 1852.625 1.55e+03 -1.99e+02 -5.67e+02 732.565 -74.0819 -2.49e+02 b_1_2 -162.147 -1.06e+02 -4.36e+01 7.94e+01 -74.082 86.8386 -2.25e+01 b_1_3 -1385.306 -9.97e+02 9.38e+01 4.43e+02 -248.643 -22.5500 1.80e+02 b_2_2 80.098 -1.26e+01 3.69e+01 -4.25e+01 3.239 -6.8923 5.22e+00 b_2_3 -131.447 7.29e+01 -9.13e+01 8.23e+01 33.310 3.8765 -1.52e+01 b_3_3 1134.610 4.74e+02 1.06e+02 -4.34e+02 86.342 -12.4928 -7.22e+01 d_1 0.244 -1.16e-02 -9.09e-03 -6.79e-02 0.146 0.0165 -1.69e-02 d_2_80s -2.229 -9.23e-01 -1.73e-01 8.32e-01 -0.597 0.1204 1.23e-01 d_2_90s -2.818 -1.17e+00 -5.19e-01 1.21e+00 -0.613 0.2062 1.20e-01 b_2_2 b_2_3 b_3_3 d_1 d_2_80s d_2_90s a_0 80.0981 -1.31e+02 1134.610 0.244054 -2.228581 -2.818044 a_1 -12.5557 7.29e+01 474.196 -0.011589 -0.922502 -1.172223 a_2 36.8562 -9.13e+01 106.459 -0.009094 -0.173030 -0.518819 a_3 -42.4786 8.23e+01 -434.403 -0.067949 0.832279 1.205367 b_1_1 3.2385 3.33e+01 86.342 0.145677 -0.597090 -0.613234 b_1_2 -6.8923 3.88e+00 -12.493 0.016487 0.120373 0.206223 b_1_3 5.2209 -1.52e+01 -72.198 -0.016885 0.122563 0.119871 b_2_2 8.8324 -9.78e+00 11.187 0.007501 -0.019339 -0.024371 b_2_3 -9.7809 1.87e+01 -21.204 -0.004439 0.029217 0.076704 b_3_3 11.1868 -2.12e+01 82.332 0.013997 -0.151030 -0.231134 d_1 0.0075 -4.44e-03 0.014 0.000181 -0.000462 -0.000484 d_2_80s -0.0193 2.92e-02 -0.151 -0.000462 0.002331 0.002951 d_2_90s -0.0244 7.67e-02 -0.231 -0.000484 0.002951 0.006143 $r2 [1] 0.993 $r2bar [1] 0.98 $nObs [1] 20 $yName [1] "qOutput" $xNames [1] "qLabor" "land" "qVarInput" $shifterNames [1] "tech" "decade" $model.matrix (Intercept) a_1 a_2 a_3 b_1_1 b_1_2 b_1_3 b_2_2 b_2_3 b_3_3 d_1 d_2_80s 1 1 0.365 3.15 6.32 0.0665 1.15 2.31 4.97 19.9 20.0 1 0 2 1 0.372 3.19 6.41 0.0690 1.18 2.38 5.08 20.4 20.5 2 0 3 1 0.365 3.21 6.41 0.0665 1.17 2.34 5.14 20.6 20.5 3 0 4 1 0.392 3.22 6.48 0.0768 1.26 2.54 5.17 20.8 21.0 4 0 5 1 0.392 3.22 6.47 0.0768 1.26 2.54 5.17 20.8 21.0 5 0 6 1 0.385 3.23 6.49 0.0742 1.24 2.50 5.21 20.9 21.0 6 1 7 1 0.372 3.25 6.51 0.0690 1.21 2.42 5.30 21.2 21.2 7 1 8 1 0.399 3.26 6.47 0.0795 1.30 2.58 5.30 21.1 21.0 8 1 9 1 0.392 3.23 6.46 0.0768 1.26 2.53 5.20 20.8 20.9 9 1 10 1 0.425 3.26 6.47 0.0904 1.39 2.75 5.32 21.1 21.0 10 1 11 1 0.425 3.29 6.53 0.0904 1.40 2.78 5.40 21.5 21.3 11 1 12 1 0.525 3.40 6.63 0.1377 1.78 3.48 5.77 22.5 22.0 12 1 13 1 0.531 3.44 6.69 0.1408 1.82 3.55 5.91 23.0 22.4 13 1 14 1 0.513 3.47 6.68 0.1315 1.78 3.43 6.03 23.2 22.3 14 1 15 1 0.501 3.45 6.60 0.1254 1.73 3.31 5.95 22.8 21.8 15 1 16 1 0.476 3.46 6.58 0.1134 1.65 3.13 5.99 22.8 21.6 16 0 17 1 0.482 3.51 6.55 0.1164 1.69 3.16 6.17 23.0 21.5 17 0 18 1 0.482 3.56 6.55 0.1164 1.72 3.16 6.33 23.3 21.5 18 0 19 1 0.482 3.62 6.59 0.1164 1.75 3.18 6.55 23.9 21.7 19 0 20 1 0.482 3.67 6.65 0.1164 1.77 3.21 6.75 24.4 22.1 20 0 d_2_90s 1 0 2 0 3 0 4 0 5 0 6 0 7 0 8 0 9 0 10 0 11 0 12 0 13 0 14 0 15 0 16 1 17 1 18 1 19 1 20 1 attr(,"assign") [1] 0 1 2 3 4 5 6 7 8 9 10 11 11 attr(,"contrasts") attr(,"contrasts")$d_2_ [1] "contr.treatment" $r2nonLog [,1] [1,] 0.995 $dataLogged [1] FALSE attr(,"class") [1] "translogEst" > # testing translogCalc > fitted <- translogCalc( c( "qLabor", "land", "qVarInput" ), + shifterNames = c( "tech", "decade" ), data = germanFarms, + coef = estResultShifterFac2$coef ) > all.equal( fitted, estResultShifterFac2$fitted ) [1] TRUE > > > ## checking monotonicity of models with shifter variables > test <- translogCheckMono( c( "qLabor", "land", "qVarInput" ), + germanFarms, coef( estResultShifter ) ) > summary( test ) This translog function is monotonically increasing in qLabor, land, qVarInput at 11 out of 20 observations (55%) The monotonicity condition for the exogenous variable - 'qLabor' is fulfilled at 11 out of 20 observations (55%) - 'land' is fulfilled at 20 out of 20 observations (100%) - 'qVarInput' is fulfilled at 20 out of 20 observations (100%) > print.default( test ) $exog qLabor land qVarInput [1,] TRUE TRUE TRUE [2,] TRUE TRUE TRUE [3,] TRUE TRUE TRUE [4,] TRUE TRUE TRUE [5,] TRUE TRUE TRUE [6,] TRUE TRUE TRUE [7,] TRUE TRUE TRUE [8,] TRUE TRUE TRUE [9,] TRUE TRUE TRUE [10,] TRUE TRUE TRUE [11,] TRUE TRUE TRUE [12,] FALSE TRUE TRUE [13,] FALSE TRUE TRUE [14,] FALSE TRUE TRUE [15,] FALSE TRUE TRUE [16,] FALSE TRUE TRUE [17,] FALSE TRUE TRUE [18,] FALSE TRUE TRUE [19,] FALSE TRUE TRUE [20,] FALSE TRUE TRUE $obs [1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE FALSE [13] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE $increasing [1] TRUE TRUE TRUE $strict [1] FALSE attr(,"class") [1] "translogCheckMono" > > # with logarithmized data > test2 <- translogCheckMono( c( "qLogLabor", "qLogLand", "qLogVarInput" ), + germanFarms, coef( estResultShifterLog ), dataLogged = TRUE ) > all.equal( test, test2, check.attributes = FALSE ) [1] TRUE > > # with two shifter variables > test <- translogCheckMono( c( "qLabor", "land", "qVarInput" ), + germanFarms, coef( estResultShifter2 ) ) > summary( test ) This translog function is monotonically increasing in qLabor, land, qVarInput at 8 out of 20 observations (40%) The monotonicity condition for the exogenous variable - 'qLabor' is fulfilled at 11 out of 20 observations (55%) - 'land' is fulfilled at 20 out of 20 observations (100%) - 'qVarInput' is fulfilled at 12 out of 20 observations (60%) > print.default( test ) $exog qLabor land qVarInput [1,] TRUE TRUE FALSE [2,] TRUE TRUE FALSE [3,] TRUE TRUE TRUE [4,] TRUE TRUE TRUE [5,] TRUE TRUE TRUE [6,] TRUE TRUE TRUE [7,] TRUE TRUE TRUE [8,] TRUE TRUE TRUE [9,] TRUE TRUE TRUE [10,] TRUE TRUE FALSE [11,] TRUE TRUE TRUE [12,] FALSE TRUE FALSE [13,] FALSE TRUE FALSE [14,] FALSE TRUE TRUE [15,] FALSE TRUE FALSE [16,] FALSE TRUE TRUE [17,] FALSE TRUE FALSE [18,] FALSE TRUE FALSE [19,] FALSE TRUE TRUE [20,] FALSE TRUE TRUE $obs [1] FALSE FALSE TRUE TRUE TRUE TRUE TRUE TRUE TRUE FALSE TRUE FALSE [13] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE $increasing [1] TRUE TRUE TRUE $strict [1] FALSE attr(,"class") [1] "translogCheckMono" > > # with a logical variable as shifter > test <- translogCheckMono( c( "qLabor", "land", "qVarInput" ), + germanFarms, coef( estResultShifterLogi ) ) > summary( test ) This translog function is monotonically increasing in qLabor, land, qVarInput at 10 out of 20 observations (50%) The monotonicity condition for the exogenous variable - 'qLabor' is fulfilled at 11 out of 20 observations (55%) - 'land' is fulfilled at 20 out of 20 observations (100%) - 'qVarInput' is fulfilled at 17 out of 20 observations (85%) > print.default( test ) $exog qLabor land qVarInput [1,] TRUE TRUE FALSE [2,] TRUE TRUE TRUE [3,] TRUE TRUE TRUE [4,] TRUE TRUE TRUE [5,] TRUE TRUE TRUE [6,] TRUE TRUE TRUE [7,] TRUE TRUE TRUE [8,] TRUE TRUE TRUE [9,] TRUE TRUE TRUE [10,] TRUE TRUE TRUE [11,] TRUE TRUE TRUE [12,] FALSE TRUE TRUE [13,] FALSE TRUE TRUE [14,] FALSE TRUE TRUE [15,] FALSE TRUE TRUE [16,] FALSE TRUE TRUE [17,] FALSE TRUE FALSE [18,] FALSE TRUE FALSE [19,] FALSE TRUE TRUE [20,] FALSE TRUE TRUE $obs [1] FALSE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE FALSE [13] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE $increasing [1] TRUE TRUE TRUE $strict [1] FALSE attr(,"class") [1] "translogCheckMono" > > # with a factor as shifter > test <- translogCheckMono( c( "qLabor", "land", "qVarInput" ), + germanFarms, coef( estResultShifterFac ) ) > summary( test ) This translog function is monotonically increasing in qLabor, land, qVarInput at 10 out of 20 observations (50%) The monotonicity condition for the exogenous variable - 'qLabor' is fulfilled at 11 out of 20 observations (55%) - 'land' is fulfilled at 20 out of 20 observations (100%) - 'qVarInput' is fulfilled at 17 out of 20 observations (85%) > print.default( test ) $exog qLabor land qVarInput [1,] TRUE TRUE FALSE [2,] TRUE TRUE TRUE [3,] TRUE TRUE TRUE [4,] TRUE TRUE TRUE [5,] TRUE TRUE TRUE [6,] TRUE TRUE TRUE [7,] TRUE TRUE TRUE [8,] TRUE TRUE TRUE [9,] TRUE TRUE TRUE [10,] TRUE TRUE TRUE [11,] TRUE TRUE TRUE [12,] FALSE TRUE TRUE [13,] FALSE TRUE TRUE [14,] FALSE TRUE TRUE [15,] FALSE TRUE TRUE [16,] FALSE TRUE TRUE [17,] FALSE TRUE FALSE [18,] FALSE TRUE FALSE [19,] FALSE TRUE TRUE [20,] FALSE TRUE TRUE $obs [1] FALSE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE FALSE [13] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE $increasing [1] TRUE TRUE TRUE $strict [1] FALSE attr(,"class") [1] "translogCheckMono" > > # with two shifters and one is logical > test <- translogCheckMono( c( "qLabor", "land", "qVarInput" ), + germanFarms, coef( estResultShifterLogi2 ) ) > summary( test ) This translog function is monotonically increasing in qLabor, land, qVarInput at 10 out of 20 observations (50%) The monotonicity condition for the exogenous variable - 'qLabor' is fulfilled at 11 out of 20 observations (55%) - 'land' is fulfilled at 20 out of 20 observations (100%) - 'qVarInput' is fulfilled at 18 out of 20 observations (90%) > print.default( test ) $exog qLabor land qVarInput [1,] TRUE TRUE FALSE [2,] TRUE TRUE TRUE [3,] TRUE TRUE TRUE [4,] TRUE TRUE TRUE [5,] TRUE TRUE TRUE [6,] TRUE TRUE TRUE [7,] TRUE TRUE TRUE [8,] TRUE TRUE TRUE [9,] TRUE TRUE TRUE [10,] TRUE TRUE TRUE [11,] TRUE TRUE TRUE [12,] FALSE TRUE TRUE [13,] FALSE TRUE TRUE [14,] FALSE TRUE TRUE [15,] FALSE TRUE TRUE [16,] FALSE TRUE TRUE [17,] FALSE TRUE TRUE [18,] FALSE TRUE FALSE [19,] FALSE TRUE TRUE [20,] FALSE TRUE TRUE $obs [1] FALSE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE FALSE [13] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE $increasing [1] TRUE TRUE TRUE $strict [1] FALSE attr(,"class") [1] "translogCheckMono" > > # with two shifters and one is a factor > test <- translogCheckMono( c( "qLabor", "land", "qVarInput" ), + germanFarms, coef( estResultShifterFac2 ) ) > summary( test ) This translog function is monotonically increasing in qLabor, land, qVarInput at 10 out of 20 observations (50%) The monotonicity condition for the exogenous variable - 'qLabor' is fulfilled at 11 out of 20 observations (55%) - 'land' is fulfilled at 20 out of 20 observations (100%) - 'qVarInput' is fulfilled at 17 out of 20 observations (85%) > print.default( test ) $exog qLabor land qVarInput [1,] TRUE TRUE FALSE [2,] TRUE TRUE TRUE [3,] TRUE TRUE TRUE [4,] TRUE TRUE TRUE [5,] TRUE TRUE TRUE [6,] TRUE TRUE TRUE [7,] TRUE TRUE TRUE [8,] TRUE TRUE TRUE [9,] TRUE TRUE TRUE [10,] TRUE TRUE TRUE [11,] TRUE TRUE TRUE [12,] FALSE TRUE TRUE [13,] FALSE TRUE TRUE [14,] FALSE TRUE TRUE [15,] FALSE TRUE TRUE [16,] FALSE TRUE TRUE [17,] FALSE TRUE FALSE [18,] FALSE TRUE FALSE [19,] FALSE TRUE TRUE [20,] FALSE TRUE TRUE $obs [1] FALSE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE FALSE [13] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE $increasing [1] TRUE TRUE TRUE $strict [1] FALSE attr(,"class") [1] "translogCheckMono" > > > ## estimate with further argument passed to lm() > estResult2 <- translogEst( yName = "qOutput", + xNames = c( "qLabor", "land", "qVarInput", "time" ), + germanFarms, x = TRUE, y = TRUE ) > print( estResult2 ) Estimated Translog function with 20 observations. a_0 a_1 a_2 a_3 a_4 b_1_1 b_1_2 b_1_3 -133.485 24.589 19.923 34.631 -12.467 -16.865 14.347 -8.591 b_1_4 b_2_2 b_2_3 b_2_4 b_3_3 b_3_4 b_4_4 -3.573 0.264 -3.468 -1.163 -3.910 2.793 -0.246 > summary( estResult2 ) Estimated Translog function with 20 observations. Estimate Std. Error t value Pr(>|t|) a_0 -133.485 165.548 -0.81 0.457 a_1 24.589 66.497 0.37 0.727 a_2 19.923 16.500 1.21 0.281 a_3 34.631 55.323 0.63 0.559 a_4 -12.467 5.228 -2.38 0.063 . b_1_1 -16.865 19.101 -0.88 0.418 b_1_2 14.347 8.770 1.64 0.163 b_1_3 -8.591 10.551 -0.81 0.453 b_1_4 -3.573 1.900 -1.88 0.119 b_2_2 0.264 4.822 0.05 0.958 b_2_3 -3.468 3.490 -0.99 0.366 b_2_4 -1.163 1.542 -0.75 0.485 b_3_3 -3.910 9.323 -0.42 0.692 b_3_4 2.793 0.750 3.72 0.014 * b_4_4 -0.246 0.160 -1.54 0.185 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 R-squared: 0.998 Adjusted R-squared: 0.993 > print.default( estResult2 ) $call translogEst(yName = "qOutput", xNames = c("qLabor", "land", "qVarInput", "time"), data = germanFarms, x = TRUE, y = TRUE) $nExog [1] 4 $nShifter [1] 0 $est Call: lm(formula = as.formula(estFormula), data = estData, x = TRUE, y = TRUE) Coefficients: (Intercept) a_1 a_2 a_3 a_4 b_1_1 -133.485 24.589 19.923 34.631 -12.467 -16.865 b_1_2 b_1_3 b_1_4 b_2_2 b_2_3 b_2_4 14.347 -8.591 -3.573 0.264 -3.468 -1.163 b_3_3 b_3_4 b_4_4 -3.910 2.793 -0.246 $residuals 1 2 3 4 5 6 7 8 0.002292 -0.013674 0.008394 0.022739 -0.008485 -0.017108 0.002266 -0.003225 9 10 11 12 13 14 15 16 0.008918 -0.002060 -0.001227 -0.001239 -0.000391 -0.002186 0.007307 0.004534 17 18 19 20 -0.013997 0.007881 -0.000263 -0.000475 $fitted 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 944 976 1061 1145 1188 1206 1237 1293 1197 1281 1362 1543 1576 1700 1633 1619 17 18 19 20 1678 1742 1888 1993 $coef a_0 a_1 a_2 a_3 a_4 b_1_1 b_1_2 b_1_3 -133.485 24.589 19.923 34.631 -12.467 -16.865 14.347 -8.591 b_1_4 b_2_2 b_2_3 b_2_4 b_3_3 b_3_4 b_4_4 -3.573 0.264 -3.468 -1.163 -3.910 2.793 -0.246 $coefCov a_0 a_1 a_2 a_3 a_4 b_1_1 b_1_2 b_1_3 a_0 27405.99 9712.33 17.69 -9083.87 143.477 1775.85 -623.173 -1333.833 a_1 9712.33 4421.91 -133.02 -3202.91 18.862 775.11 -174.763 -656.263 a_2 17.69 -133.02 272.23 -117.76 -53.119 -70.62 -45.788 46.233 a_3 -9083.87 -3202.91 -117.76 3060.62 -27.798 -553.94 222.167 430.516 a_4 143.48 18.86 -53.12 -27.80 27.334 -8.21 9.313 -7.382 b_1_1 1775.85 775.11 -70.62 -553.94 -8.208 364.84 -79.338 -101.467 b_1_2 -623.17 -174.76 -45.79 222.17 9.313 -79.34 76.906 -4.733 b_1_3 -1333.83 -656.26 46.23 430.52 -7.382 -101.47 -4.733 111.316 b_1_4 138.95 53.86 5.31 -49.19 0.917 -3.56 -6.106 -6.116 b_2_2 -77.18 2.72 2.44 18.50 9.162 -50.20 12.688 -5.016 b_2_3 44.60 22.99 -43.90 5.93 4.681 35.82 -1.026 -4.401 b_2_4 81.28 17.02 9.80 -29.22 -4.695 16.08 -9.146 0.943 b_3_3 1480.84 527.13 36.56 -507.78 3.046 75.19 -34.433 -71.365 b_3_4 -68.98 -13.76 3.43 20.98 -2.147 -6.28 3.316 0.968 b_4_4 -7.58 -3.43 -1.52 3.06 0.728 -0.88 0.602 0.293 b_1_4 b_2_2 b_2_3 b_2_4 b_3_3 b_3_4 b_4_4 a_0 138.9469 -77.18 44.605 81.2783 1480.837 -68.9803 -7.5838 a_1 53.8560 2.72 22.994 17.0231 527.126 -13.7558 -3.4281 a_2 5.3118 2.44 -43.897 9.8010 36.560 3.4335 -1.5210 a_3 -49.1889 18.50 5.926 -29.2154 -507.777 20.9840 3.0597 a_4 0.9168 9.16 4.681 -4.6948 3.046 -2.1473 0.7278 b_1_1 -3.5626 -50.20 35.823 16.0775 75.187 -6.2751 -0.8797 b_1_2 -6.1059 12.69 -1.026 -9.1463 -34.433 3.3158 0.6018 b_1_3 -6.1163 -5.02 -4.401 0.9429 -71.365 0.9681 0.2932 b_1_4 3.6094 4.74 -2.943 -0.0203 9.613 -0.3327 -0.0490 b_2_2 4.7394 23.25 -11.100 -5.6859 2.878 1.0467 0.3004 b_2_3 -2.9430 -11.10 12.177 1.0946 -6.539 -1.1226 0.1081 b_2_4 -0.0203 -5.69 1.095 2.3774 4.005 -0.4070 -0.1735 b_3_3 9.6127 2.88 -6.539 4.0047 86.920 -2.8993 -0.5340 b_3_4 -0.3327 1.05 -1.123 -0.4070 -2.899 0.5624 -0.0302 b_4_4 -0.0490 0.30 0.108 -0.1735 -0.534 -0.0302 0.0255 $r2 [1] 0.998 $r2bar [1] 0.993 $nObs [1] 20 $yName [1] "qOutput" $xNames [1] "qLabor" "land" "qVarInput" "time" $model.matrix (Intercept) a_1 a_2 a_3 a_4 b_1_1 b_1_2 b_1_3 b_1_4 b_2_2 b_2_3 b_2_4 1 1 0.365 3.15 6.32 0.000 0.0665 1.15 2.31 0.000 4.97 19.9 0.00 2 1 0.372 3.19 6.41 0.693 0.0690 1.18 2.38 0.258 5.08 20.4 2.21 3 1 0.365 3.21 6.41 1.099 0.0665 1.17 2.34 0.401 5.14 20.6 3.52 4 1 0.392 3.22 6.48 1.386 0.0768 1.26 2.54 0.543 5.17 20.8 4.46 5 1 0.392 3.22 6.47 1.609 0.0768 1.26 2.54 0.631 5.17 20.8 5.17 6 1 0.385 3.23 6.49 1.792 0.0742 1.24 2.50 0.690 5.21 20.9 5.78 7 1 0.372 3.25 6.51 1.946 0.0690 1.21 2.42 0.723 5.30 21.2 6.33 8 1 0.399 3.26 6.47 2.079 0.0795 1.30 2.58 0.829 5.30 21.1 6.77 9 1 0.392 3.23 6.46 2.197 0.0768 1.26 2.53 0.861 5.20 20.8 7.09 10 1 0.425 3.26 6.47 2.303 0.0904 1.39 2.75 0.979 5.32 21.1 7.51 11 1 0.425 3.29 6.53 2.398 0.0904 1.40 2.78 1.020 5.40 21.5 7.88 12 1 0.525 3.40 6.63 2.485 0.1377 1.78 3.48 1.304 5.77 22.5 8.44 13 1 0.531 3.44 6.69 2.565 0.1408 1.82 3.55 1.361 5.91 23.0 8.82 14 1 0.513 3.47 6.68 2.639 0.1315 1.78 3.43 1.353 6.03 23.2 9.16 15 1 0.501 3.45 6.60 2.708 0.1254 1.73 3.31 1.356 5.95 22.8 9.34 16 1 0.476 3.46 6.58 2.773 0.1134 1.65 3.13 1.320 5.99 22.8 9.60 17 1 0.482 3.51 6.55 2.833 0.1164 1.69 3.16 1.367 6.17 23.0 9.95 18 1 0.482 3.56 6.55 2.890 0.1164 1.72 3.16 1.394 6.33 23.3 10.28 19 1 0.482 3.62 6.59 2.944 0.1164 1.75 3.18 1.420 6.55 23.9 10.66 20 1 0.482 3.67 6.65 2.996 0.1164 1.77 3.21 1.445 6.75 24.4 11.00 b_3_3 b_3_4 b_4_4 1 20.0 0.00 0.000 2 20.5 4.44 0.240 3 20.5 7.04 0.603 4 21.0 8.99 0.961 5 21.0 10.42 1.295 6 21.0 11.62 1.605 7 21.2 12.67 1.893 8 21.0 13.46 2.162 9 20.9 14.20 2.414 10 21.0 14.91 2.651 11 21.3 15.65 2.875 12 22.0 16.49 3.087 13 22.4 17.15 3.289 14 22.3 17.63 3.482 15 21.8 17.88 3.667 16 21.6 18.24 3.844 17 21.5 18.56 4.014 18 21.5 18.94 4.177 19 21.7 19.42 4.335 20 22.1 19.91 4.487 attr(,"assign") [1] 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 $r2nonLog [,1] [1,] 0.999 $dataLogged [1] FALSE attr(,"class") [1] "translogEst" > > ## panel data > data( "GrunfeldGreene", package = "systemfit" ) Error in find.package(package, lib.loc, verbose = verbose) : there is no package called 'systemfit' Calls: data -> find.package Execution halted Flavor: r-devel-linux-x86_64-debian-gcc

Version: 0.6-18
Check: Rd cross-references
Result: NOTE Undeclared packages ‘micEconAids’, ‘micEconSNQP’ in Rd xrefs Flavor: r-devel-linux-x86_64-fedora-clang