Description Usage Arguments Value Author(s) See Also Examples
View source: R/cobbDouglasOpt.R
Calculate the optimal values of the variable independent variables of a Cobb-Douglas function.
1 2 |
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 |
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.
Arne Henningsen
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | 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 )
|
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/
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.