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=γexp(λt)(δx1−ρ+(1−δ)x2−ρ)−ρν
and the non-nested CES function with N
explanatory variables is
y=γexp(λt)(∑i=1Nδixi−ρ)−ρν
where in the latter case
∑i=1Nδi=1
.
In both cases, the elesticity of substitution is
s=1+ρ1
.
The nested CES function with 3 explanatory variables
proposed by Sato (1967) is
y=γexp(λt)[δ(δ1x1−ρ1+(1−δ1)x2−ρ1)ρ1ρ+(1−δ)x3−ρ]−ρν
and the nested CES function with 4 explanatory variables
(a generalisation of the version proposed by Sato, 1967) is
y=γexp(λt)[δ⋅(δ1x1−ρ1+(1−δ1)x2−ρ1)ρ1ρ+(1−δ)⋅(δ2x3−ρ2+(1−δ2)x4−ρ2)ρ2ρ]−ρν
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
γ , eventuelly λ ,
δ , ρ ,
and eventually ν
in case of two expanatory variables,
γ , eventuelly λ ,
δ1 , ...,
δN , ρ , and eventually ν
in case of the non-nested CES with N>2 explanatory variables,
γ , eventuelly λ ,
δ1 , δ ,
ρ1 , ρ , and eventually ν
in case of the nested CES with 3 explanatory variables,
and γ , eventuelly λ ,
δ1 , δ2 ,
δ , ρ1 , ρ2 ,
ρ , and eventually ν
in case of the nested CES with 4 explanatory variables,
where in all cases the ν is only required if the model
has variable returns to scale.
If the vector is named, the names must be "gamma" ,
"delta" , "rho" , and eventually "nu"
in case of two expanatory variables,
"gamma" , "delta_1" , ..., "delta_N" ,
"rho" , and eventually "nu"
in case of the non-nested CES with N>2 explanatory variables,
and "gamma" , "delta_1" , "delta_2" ,
"rho_1" , "rho_2" , "rho" , and eventually "nu"
in case of the nested CES with 4 explanatory variables,
where the order is irrelevant in all cases.
|
tName |
optional character string specifying the name of the
time variable (t ).
|
nested |
logical. ;
if FALSE (the default), the original CES for n inputs
proposed by Kmenta (1967) is used;
if TRUE , the nested version of the CES
for 3 or 4 inputs proposed by Sato (1967) is used.
|
rhoApprox |
if the absolute value of the coefficient ρ ,
ρ1 , or ρ2
is smaller than or equal to this argument,
the endogenous variable is calculated
using a first-order Taylor series approximation
at the point ρ = 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 ρ , ρ1 , or ρ2
have very small values (in absolute terms).
|
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
cesEst
.
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 ) )
[Package
micEconCES version 1.0-2
Index]