# NOT RUN {
# just a stupid simple example
snqProfitHessianDeriv( c(1,2,3),c(0.4,0.3,0.3) )
# now with real data
if( requireNamespace( 'micEcon', quietly = TRUE ) ) {
data( germanFarms, package = "micEcon" )
germanFarms$qOutput <- germanFarms$vOutput / germanFarms$pOutput
germanFarms$qVarInput <- -germanFarms$vVarInput / germanFarms$pVarInput
germanFarms$qLabor <- -germanFarms$qLabor
germanFarms$time <- c( 0:19 )
priceNames <- c( "pOutput", "pVarInput", "pLabor" )
quantNames <- c( "qOutput", "qVarInput", "qLabor" )
estResult <- snqProfitEst( priceNames, quantNames, c("land","time"), data=germanFarms )
snqProfitHessianDeriv( estResult$pMean, estResult$weights, 2 )
}
# }
Run the code above in your browser using DataLab