fitted.frontier {frontier}R Documentation

Fitted and Predicted (Frontier) Values

Description

This method returns the fitted and predicted “frontier” values from stochastic frontier models estimated with the frontier package (e.g. function sfa).

Usage

## S3 method for class 'frontier'
fitted( object, asInData = FALSE, ... )

## S3 method for class 'frontier'
predict( object, newdata = NULL, asInData = TRUE, ... )

Arguments

object

a stochastic frontier model estimated with the frontier package (e.g. function sfa).

newdata

an optional data frame from which the explanatory variables are used to calculate the predicted “frontier” values. If this argument is NULL, the fitted values are returned.

asInData

logical. If TRUE, the fitted values are returned in the same order as the corresponding observations in the data set used for the estimation (see section ‘value’ below).

...

currently ignored.

Value

If argument asInData is FALSE, a matrix of the fitted or predicted values is returned, where each row corresponds to a firm (cross-section unit) and each column corresponds to a time period.

If argument asInData is TRUE, a vector of fitted or predicted values is returned, where the fitted values are in the same order as the corresponding observations in the data set used for the estimation or the data set specified by argument newdata.

Author(s)

Arne Henningsen

See Also

sfa, fitted, predict.

Examples

   # rice producers in the Philippines (panel data)
   data( "riceProdPhil" )
   library( "plm" )
   riceProdPhil <- pdata.frame( riceProdPhil, c( "FMERCODE", "YEARDUM" ) )

   # Error Components Frontier (Battese & Coelli 1992), no time effect
   rice <- sfa( log( PROD ) ~ log( AREA ) + log( LABOR ) + log( NPK ),
      data = riceProdPhil )
   fitted( rice )
   riceProdPhil$fitted <- fitted( rice, asInData = TRUE )

   # Error Components Frontier (Battese & Coelli 1992), with time effect
   riceTime <- sfa( log( PROD ) ~ log( AREA ) + log( LABOR ) + log( NPK ),
      data = riceProdPhil, timeEffect = TRUE )
   fitted( riceTime )
   riceProdPhil$fittedTime <- fitted( riceTime, asInData = TRUE )

[Package frontier version 1.1-8 Index]