Learn R Programming

micEcon (version 0.1-3)

snqProfitHessian: SNQ Profit function: Hessian matrix

Description

Returns the Hessian (substitution) matrix of a Symmetric Normalized Quadratic (SNQ) Profit Function.

Usage

snqProfitHessian( beta, prices, weights )

Arguments

beta
matrix of the $beta$ coefficients.
prices
vector of netput prices at which the Hessian should be calculated.
weights
vector of weights of prices for normalization.

See Also

snqProfitEst, snqProfitEla and snqProfitHessianDeriv.

Examples

Run this code
# just a stupid simple example
   snqProfitHessian( matrix(101:109,3,3), c(1,1,1), c(0.4,0.3,0.3) )

   # now with real data
   data( germanFarms )
   germanFarms$qOutput   <- germanFarms$vOutput   / germanFarms$pOutput
   germanFarms$qVarInput <- -germanFarms$vVarInput / germanFarms$pVarInput
   germanFarms$qLabor    <- -germanFarms$qLabor
   germanFarms$time <- c( 0:19 )
   pNames <- c( "pOutput", "pVarInput", "pLabor" )
   qNames <- c( "qOutput", "qVarInput", "qLabor" )

   estResult <- snqProfitEst( pNames, qNames, c("land","time"), data=germanFarms )

   estResult$hessian  # the Hessian at mean prices and mean quantities

   # Hessian at the last observation (1994/95)
   snqProfitHessian( estResult$coef$beta, estResult$estData[ 20, pNames ],
      estResult$weights )

Run the code above in your browser using DataLab