cesCalc {micEconCES} | R Documentation |
Calculate CES function
Description
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 \: x_1^{-\rho} + ( 1 - \delta ) \: x_2^{-\rho} )
^{-\frac{\nu}{\rho}}
and the non-nested CES function with N
explanatory variables is
y = \gamma \: \exp ( \lambda \: t ) \:
\left( \sum_{i=1}^N \delta_i \: x_i^{-\rho} \right)
^{-\frac{\nu}{\rho}}
where in the latter case
\sum_{i=1}^N \delta_i = 1
.
In both cases, the elesticity of substitution is
s = \frac{1}{ 1 + \rho }
.
The nested CES function with 3 explanatory variables proposed by Sato (1967) is
y = \gamma \: \exp ( \lambda \: t ) \: \left[
\delta \:
\left( \delta_1 \: x_1^{-\rho_1} +
( 1 - \delta_1 ) x_2^{-\rho_1} \right)^{\frac{\rho}{\rho_1}} +
( 1 - \delta ) x_3^{-\rho}
\right]^{-\frac{\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 ) \: \left[ \delta \cdot
\left( \delta_1 \: x_1^{-\rho_1} +
( 1 - \delta_1 ) x_2^{-\rho_1} \right)^{\frac{\rho}{\rho_1}} +
( 1 - \delta ) \cdot
\left( \delta_2 \: x_3^{-\rho_2} +
( 1 - \delta_2 ) x_4^{-\rho_2} \right)^{\frac{\rho}{\rho_2}}
\right]^{-\frac{\nu}{\rho}}
Usage
cesCalc( xNames, data, coef, tName = NULL, nested = FALSE, rhoApprox = 5e-6 )
Arguments
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
|
tName |
optional character string specifying the name of the
time variable ( |
nested |
logical. ;
if |
rhoApprox |
if the absolute value of the coefficient |
Value
A numeric vector with length equal to the number of rows of the data set
specified in argument data
.
Author(s)
Arne Henningsen and Geraldine Henningsen
References
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.
See Also
Examples
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 ) )