frontier {frontier} | R Documentation |
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).
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, ... )
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
to get a full quadratic or translog model. |
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 length of last step). |
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. |
The frontier
function uses the Fortran source code of
Tim Coelli's software FRONTIER 4.1
(http://www.uq.edu.au/economics/cepa/frontier.htm)
and hence, provides the same features as FRONTIER 4.1.
A comprehensive documentation of FRONTIER 4.1 is available
in the file Front41.pdf
that is included in the archive FRONT41-xp1.zip
,
which is available at
http://www.uq.edu.au/economics/cepa/frontier.htm.
It is recommended to read this documentation,
because the frontier
function is based on the FRONTIER 4.1 software.
frontier
returns a list of class frontier
containing following elements:
modelType |
model type (see above). |
functionType |
function type (see above). |
logDepVar |
logical. Is the dependent variable logged? |
nn |
number of cross-sections. |
nt |
number of time periods. |
nob |
number of observations in total. |
nb |
number of regressor variables (Xs). |
mu |
logical. Indicates if a 'mu'/'delta0' is included in the estimation (see above). |
eta |
In 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). |
iprint |
numeric. Printing of information on the iterations (see above). |
indic |
numeric. Scaling of unidimensional search procedure (see above). |
tol |
numeric. Convergence tolerance. |
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. Starting values for the ML estimation (if specified by user). |
dataTable |
matrix. Data matrix sent to Frontier 4.1. |
olsParam |
numeric vector. OLS estimates. |
olsStdEr |
numeric vector. Standard errors of OLS estimates. |
olsLogl |
numeric. Log likelihood value of OLS estimation. |
gridParam |
numeric vector. Parameters obtained from the grid search (if no starting values were specified). |
mleParam |
numeric vector. Parameters obtained from ML estimation. |
mleCov |
matrix. Covariance matrix of the parameters obtained from the OLS estimation. |
mleLogl |
numeric. Log likelihood value of the ML estimation. |
lrTestVal |
LR test of the one-sided error
(this statistic has a mixed chi-square distribution
with lrTestDf degrees of freedom. |
lrTestDf |
numeric. Degrees of freedom of the LR test. |
nIter |
numeric. Number of iterations of the ML estimation. |
effic |
matrix. Efficiency estimates: each row corresponds to a cross-section; each column corresponds to a time period. |
Tim Coelli and Arne Henningsen
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.
# 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 ) # Error Components Frontier (Battese & Coelli 1992) rice <- frontier( riceProdPhil, crossSectionName = "FMERCODE", timePeriodName = "YEARDUM", yName = "lPROD", xNames = c( "lAREA", "lLABOR", "lNPK" ) ) rice # Technical Efficiency Effects Frontier (Battese & Coelli 1995) rice2 <- frontier( riceProdPhil, crossSectionName = "FMERCODE", timePeriodName = "YEARDUM", yName = "lPROD", xNames = c( "lAREA", "lLABOR", "lNPK" ), zNames = c( "EDYRS", "BANRAT" ) ) rice2