Learn R Programming

micEcon (version 0.5-22)

elas.npregHom: Elasticities of a Homogeneous Nonparametric Function

Description

Calculate elasticities from a nonparametric regression with homogeneity of degree zero imposed on some variables.

Usage

## S3 method for class 'npregHom':
elas( object, data = NULL, yObs = FALSE, ... )

Arguments

object
object of class npregHom (returned by npregHom).
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 FALSE (default) fitted values are used.
...
currently ignored.

Value

  • A data.frame, where each column corresponds to one of the continuous independent variables.

See Also

npregHom.

Examples

Run this code
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 )

Run the code above in your browser using DataLab