Description Usage Arguments Value Author(s) References See Also Examples
Calculate the endogenous variable of a ‘Constant Elasticity of Substitution’ (CES) function.
The original CES function with two explanatory variables is
y = gamma * exp( lambda * t ) * ( delta * x1^(-rho) + ( 1 - delta ) * x2^(-rho) )^(-nu/rho)
and the non-nested CES function with N explanatory variables is
y = gamma * exp( lambda * t ) * ( sum(i=1 to N) delta_i * x_i^(-rho) )^(-nu/rho)
where in the latter case sum(i=1 to N) delta_i = 1.
In both cases, the elesticity of substitution is s = 1 / ( 1 + rho ).
The nested CES function with 3 explanatory variables proposed by Sato (1967) is
y = gamma * exp( lambda * t ) * [ delta * ( delta_1 * x_1^(-rho_1) + ( 1 - delta_1 ) * x_2^(-rho_1) )^(rho / rho_1) + ( 1 - delta ) * x_3^(-rho) ]^(-nu / rho)
and the nested CES function with 4 explanatory variables (a generalisation of the version proposed by Sato, 1967) is
y = gamma * exp( lambda * t ) * [ delta ( delta_1 * x_1^(-rho_1) + ( 1 - delta_1 ) * x_2^(-rho_1) )^(rho / rho_1) + ( 1 - delta ) ( delta_2 * x_3^(-ρ_2) + ( 1 - delta_2 ) * x_4^(-rho_2) )^(rho / rho_2) ]^(-nu / rho)
1 |
xNames |
a vector of strings containing the names of the explanatory variables. |
data |
data frame containing the explanatory variables. |
coef |
numeric vector containing the coefficients of the CES:
if the vector is unnamed,
the order of the coefficients must be
gamma, eventuelly lambda,
delta, rho,
and eventually nu
in case of two expanatory variables,
gamma, eventuelly lambda,
delta_1, ...,
delta_N, rho, and eventually nu
in case of the non-nested CES with N>2 explanatory variables,
gamma, eventuelly lambda,
delta_1, delta,
rho_1, rho, and eventually nu
in case of the nested CES with 3 explanatory variables,
and gamma, eventuelly lambda,
delta_1, delta_2,
delta, rho_1, rho_2,
rho, and eventually nu
in case of the nested CES with 4 explanatory variables,
where in all cases the nu is only required if the model
has variable returns to scale.
If the vector is named, the names must be |
tName |
optional character string specifying the name of the time variable (t). |
nested |
logical. ;
if |
rhoApprox |
if the absolute value of the coefficient rho, rho_1, or rho_2 is smaller than or equal to this argument, the endogenous variable is calculated using a first-order Taylor series approximation at the point rho = 0 (for non-nested CES functions) or a linear interpolation (for nested CES functions), because this avoids large numerical inaccuracies that frequently occur in calculations with non-linear CES functions if rho, rho_1, or rho_2 have very small values (in absolute terms). |
A numeric vector with length equal to the number of rows of the data set
specified in argument data
.
Arne Henningsen and Geraldine Henningsen
Kmenta, J. (1967): On Estimation of the CES Production Function. International Economic Review 8, p. 180-189.
Sato, K. (1967): A Two-Level Constant-Elasticity-of-Substitution Production Function. Review of Economic Studies 43, p. 201-218.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | data( germanFarms, package = "micEcon" )
# output quantity:
germanFarms$qOutput <- germanFarms$vOutput / germanFarms$pOutput
# quantity of intermediate inputs
germanFarms$qVarInput <- germanFarms$vVarInput / germanFarms$pVarInput
## Estimate CES: Land & Labor with fixed returns to scale
cesLandLabor <- cesEst( "qOutput", c( "land", "qLabor" ), germanFarms )
## Calculate fitted values
cesCalc( c( "land", "qLabor" ), germanFarms, coef( cesLandLabor ) )
# variable returns to scale
cesLandLaborVrs <- cesEst( "qOutput", c( "land", "qLabor" ), germanFarms,
vrs = TRUE )
## Calculate fitted values
cesCalc( c( "land", "qLabor" ), germanFarms, coef( cesLandLaborVrs ) )
|
Loading required package: minpack.lm
Loading required package: DEoptim
Loading required package: parallel
DEoptim package
Differential Evolution algorithm in R
Authors: D. Ardia, K. Mullen, B. Peterson and J. Ulrich
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/
Warning message:
In nls.lm(par = start, fn = residFun, data = data, jac = jac, yName = yName, :
lmder: info = -1. Number of iterations has reached `maxiter' == 50.
[1] 1150.129 1189.522 1213.680 1224.445 1224.445 1240.227 1273.760 1276.645
[9] 1237.746 1281.499 1315.982 1468.405 1529.469 1582.718 1549.750 1567.549
[17] 1649.292 1724.152 1834.960 1937.390
Warning message:
In nls.lm(par = start, fn = residFun, data = data, jac = jac, yName = yName, :
lmder: info = -1. Number of iterations has reached `maxiter' == 50.
[1] 1056.404 1101.576 1119.665 1154.728 1154.728 1164.593 1185.412 1214.062
[9] 1168.251 1244.544 1280.481 1556.668 1633.060 1668.616 1616.492 1603.359
[17] 1698.034 1776.320 1890.527 1994.320
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.