cobbDouglasOpt {micEcon} | R Documentation |
Optimal Values of Independent Variables of a Cobb-Douglas Function
Description
Calculate the optimal values of the variable independent variables of a Cobb-Douglas function.
Usage
cobbDouglasOpt( pyName, pxNames, data, coef,
zNames = NULL, zCoef = NULL, xNames = NULL, dataLogged = FALSE )
Arguments
pyName |
character string containing the name of the price of the dependent variable. |
pxNames |
a vector of strings containing the names of the prices of the variable independent variables. |
data |
data frame containing the data. |
coef |
vector containing the intercept and the coefficients
of the variable independent variables:
if the elements of the vector have no names,
the first element is taken as intercept of the logged equation
and the following elements are taken as coefficients of
the variable independent variables with corresponding prices
defined in argument |
zNames |
optional vector of strings containing the names of the fixed independent variables. |
zCoef |
vector containing the coefficients
of the fixed independent variables:
if the elements of the vector have no names,
they are taken as coefficients of the fixed independent variables
defined in argument |
xNames |
optional vector of strings containing the names that should be assigned to the returned variable independent variables. |
dataLogged |
logical. Are the prices and fixed independent variables
in |
Value
A data frame containing the optimal values of the variable
independent variables.
If the prices and fixed independent variables are provided
as logarithmic values
(argument dataLogged
is TRUE
),
the optimal values of the variable independent variables are returned
as logarithms, too;
non-logarithmic values are returned otherwise.
Author(s)
Arne Henningsen
See Also
Examples
data( germanFarms )
# output quantity:
germanFarms$qOutput <- germanFarms$vOutput / germanFarms$pOutput
# quantity of variable inputs
germanFarms$qVarInput <- germanFarms$vVarInput / germanFarms$pVarInput
# a time trend to account for technical progress:
germanFarms$time <- c(1:20)
# estimate a Cobb-Douglas production function
estResult <- translogEst( yName = "qOutput",
xNames = c( "qLabor", "qVarInput", "land", "time" ),
data = germanFarms, linear = TRUE )
# calculate optimal quantities of variable inputs
xCoef <- coef( estResult )[ 1:3 ]
zCoef <- coef( estResult )[ 4:5 ]
names( zCoef ) <- c( "d_1", "d_2" )
optInput <- cobbDouglasOpt( pyName = "pOutput",
pxNames = c( "pLabor", "pVarInput" ), coef = xCoef,
data = germanFarms, xNames = c( "qLabor", "qVarInput" ),
zNames = c( "land", "time" ), zCoef = zCoef )
# compare observed with optimal input quantities
plot( germanFarms$qLabor, optInput$qLabor )
plot( germanFarms$qVarInput, optInput$qVarInput )