Learn R Programming

frontier (version 0.9-6)

frontier: Stochastic Frontier Analysis

Description

Maximum Likelihood Estimation of Stochastic Frontier Production and Cost Functions. Two specifications are available: the error components specification with time-varying efficiencies (Battese and Coelli 1992) and a model specification in which the firm effects are directly influenced by a number of variables (Battese and Coelli 1995). This R package uses the Fortran source code of Frontier 4.1 (Coelli 1996).

Usage

frontier( data, crossSectionName, timePeriodName = NULL,
   yName, xNames = NULL, qxNames = NULL, zNames = NULL, quadHalf = TRUE,
   modelType = ifelse( is.null( zNames ), 1, 2 ),
   functionType = 1, logDepVar = TRUE, mu = FALSE, eta = FALSE,
   iprint = 0, indic = 1, tol = 0.00001, tol2 = 0.001, bignum = 1.0E+16,
   step1 = 0.00001, igrid2 = 1, gridno = 0.1, maxit = 100,
   startVal = NULL )
## S3 method for class 'frontier':
print( x, ... )

Arguments

data
data frame that contains the data.
crossSectionName
string: name of the cross section identifier.
timePeriodName
string: name of the time period identifier or NULL in case of cross-section data.
yName
string: name of the endogenous variable.
xNames
a vector of strings containing the names of the X variables (exogenous variables of the production or cost function).
qxNames
a vector of strings containing the names of the variables to construct quadratic and interaction terms. As a shortcut, this argument can be set to "all" for using all variables specified in argument xNames
zNames
a vector of strings containing the names of the Z variables (variables explaining the efficiency level).
quadHalf
logical. Multiply the quadratic terms by one half?
modelType
model type: either 1 for an 'Error Components Frontier' or 2 for an 'Efficiency Effects Frontier'.
functionType
function type: either 1 for 'production function' or 2 for 'cost function'.
logDepVar
logical. Is the dependent variable logged.
mu
logical. Should a 'mu' (in case of an 'Error Components Frontier', i.e. modelType = 1) or a delta0 (in case of an 'Efficiency Effects Frontier', i.e. modelType = 2) be included in the estimation.
eta
logical. Should an 'eta' be included in the estimation (only in case of an 'Error Components Frontier', i.e. modelType = 1).
iprint
numeric. Print info every iprint iterations; if this argument is 0, do not print.
indic
numeric. Use in unidimensional search procedure: indic = 2 says do not scale step length in unidimensional search; indic = 1 says scale (to length of last step) only if last step was smaller; indic = any other number says scale (to lengt
tol
numeric. Convergence tolerance (proportional).
tol2
numeric. Tolerance used in uni-dimensional search procedure.
bignum
numeric. Used to set bounds on densities and distributions.
step1
numeric. Size of 1st step in search procedure.
igrid2
numeric. 1 = double accuracy, 0 = single accuracy.
gridno
numeric. Steps taken in single accuracy grid search on gamma.
maxit
numeric. Maximum number of iterations permitted.
startVal
numeric vector. Optional starting values for the ML estimation.
x
an object of class frontier (returned by the function frontier).
...
currently unused.

Value

  • frontier returns a list of class frontier containing following elements:
  • modelTypemodel type (see above).
  • functionTypefunction type (see above).
  • logDepVarlogical. Is the dependent variable logged?
  • nnnumber of cross-sections.
  • ntnumber of time periods.
  • nobnumber of observations in total.
  • nbnumber of regressor variables (Xs).
  • mulogical. Indicates if a 'mu'/'delta0' is included in the estimation (see above).
  • etaIn case of an error component model: logical, indicates if an 'eta' is included in the estimation. In case of an efficiency effects model: numeric, the number of efficiency effects regressors (Zs).
  • iprintnumeric. Printing of information on the iterations (see above).
  • indicnumeric. Scaling of unidimensional search procedure (see above).
  • tolnumeric. Convergence tolerance.
  • tol2numeric. Tolerance used in uni-dimensional search procedure.
  • bignumnumeric. Used to set bounds on densities and distributions.
  • step1numeric. Size of 1st step in search procedure.
  • igrid2numeric. 1 = double accuracy, 0 = single accuracy.
  • gridnonumeric. Steps taken in single accuracy grid search on gamma.
  • maxitnumeric. Maximum number of iterations permitted.
  • startValnumeric vector. Starting values for the ML estimation (if specified by user).
  • dataTablematrix. Data matrix sent to Frontier 4.1.
  • olsParamnumeric vector. OLS estimates.
  • olsStdErnumeric vector. Standard errors of OLS estimates.
  • olsLoglnumeric. Log likelihood value of OLS estimation.
  • gridParamnumeric vector. Parameters obtained from the grid search (if no starting values were specified).
  • mleParamnumeric vector. Parameters obtained from ML estimation.
  • mleCovmatrix. Covariance matrix of the parameters obtained from the OLS estimation.
  • mleLoglnumeric. Log likelihood value of the ML estimation.
  • lrTestValLR test of the one-sided error (this statistic has a mixed chi-square distribution with lrTestDf degrees of freedom.
  • lrTestDfnumeric. Degrees of freedom of the LR test.
  • nIternumeric. Number of iterations of the ML estimation.
  • efficmatrix. Efficiency estimates: each row corresponds to a cross-section; each column corresponds to a time period.

References

Battese, G.E. and T. Coelli (1992), Frontier production functions, technical efficiency and panel data: with application to paddy farmers in India. Journal of Productivity Analysis, 3, 153-169.

Battese, G.E. and T. Coelli (1995), A model for technical inefficiency effects in a stochastic frontier production function for panel data. Empirical Economics, 20, 325-332.

Coelli, T. (1996) A Guide to FRONTIER Version 4.1: A Computer Program for Stochastic Frontier Production and Cost Function Estimation, CEPA Working Paper 96/08, http://www.uq.edu.au/economics/cepa/frontier.htm, University of New England.

Examples

Run this code
# example included in FRONTIER 4.1
   data( front41Data )
   front41Data$logOutput  <- log( front41Data$output )
   front41Data$logCapital <- log( front41Data$capital )
   front41Data$logLabour  <- log( front41Data$labour )

   # Cobb-Douglas production frontier
   cobbDouglas <- frontier( front41Data, "firm", "time", "logOutput",
      c( "logCapital", "logLabour" ) )
   cobbDouglas

   # Translog production frontier
   translog <- frontier( front41Data, "firm", "time", "logOutput",
      c( "logCapital", "logLabour" ), qxNames = "all" )
   translog

   # rice producers in the Phillipines
   data( riceProdPhil )
   riceProdPhil$lPROD  <- log( riceProdPhil$PROD )
   riceProdPhil$lAREA  <- log( riceProdPhil$AREA )
   riceProdPhil$lLABOR <- log( riceProdPhil$LABOR )
   riceProdPhil$lNPK   <- log( riceProdPhil$NPK )

   rice <- frontier( riceProdPhil,
      crossSectionName = "FMERCODE", timePeriodName = "YEARDUM",
      yName = "lPROD", xNames = c( "lAREA", "lLABOR", "lNPK" ) )
   rice

   rice2 <- frontier( riceProdPhil,
      crossSectionName = "FMERCODE", timePeriodName = "YEARDUM",
      yName = "lPROD", xNames = c( "lAREA", "lLABOR", "lNPK" ),
      zNames = c( "EDYRS", "BANRAT" ) )
   rice

Run the code above in your browser using DataLab