Description Usage Arguments Value Author(s) See Also Examples
Calculate elasticities from a nonparametric regression with homogeneity of degree zero imposed on some variables.
1 2 |
object |
object of class |
data |
dataframe or a vector with named elements containing the data; if it is not specified, the data frame that was used for the nonparametric estimation is used for calculating elasticities. |
yObs |
logical. Use observed values of the andogenous variable.
If |
... |
currently ignored. |
A data.frame, where each column corresponds to one of the continuous independent variables.
Arne Henningsen
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | 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)
# weights to impose
weights <- c(
pOutput = mean( germanFarms$qOutput ),
pVarInput = mean( germanFarms$qVarInput ),
pLabor = mean( germanFarms$qLabor ) )
weights <- weights / sum( weights )
# estimate an input demand function
estResult <- npregHom( "qVarInput",
xNames = c( "pOutput", "pVarInput", "pLabor", "land" ),
data = germanFarms, homWeights = weights )
# calculate elasticities
elas( estResult )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.