View source: R/residuals.snqProfitEst.R
residuals.snqProfitEst | R Documentation |
Extract the residuals from the estimation of a Symmetric Normalized Quadratic (SNQ) profit function.
## S3 method for class 'snqProfitEst' residuals( object, scaled = TRUE, ... ) ## S3 method for class 'snqProfitImposeConvexity' residuals( object, scaled = TRUE, ... )
object |
an object of type |
scaled |
logical. Return scaled quantities? |
... |
currently not used. |
residuals.snqProfitEst
and residuals.snqProfitEst
return a
dataframe that contains the residuals for each netput and the profit.
Arne Henningsen
snqProfitEst
, snqProfitImposeConvexity
and residuals
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 ) residuals( estResult ) residuals( estResult, scaled = FALSE ) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.