Title: | Spatial Stochastic Frontier Analysis |
---|---|
Description: | Spatial Stochastic Frontier Analysis (SSFA) is an original method for controlling the spatial heterogeneity in Stochastic Frontier Analysis (SFA) models, for cross-sectional data, by splitting the inefficiency term into three terms: the first one related to spatial peculiarities of the territory in which each single unit operates, the second one related to the specific production features and the third one representing the error term. |
Authors: | Elisa Fusco, Francesco Vidoli |
Maintainer: | Elisa Fusco <[email protected]> |
License: | GPL-3 |
Version: | 1.2.2 |
Built: | 2024-12-24 06:55:50 UTC |
Source: | CRAN |
The package implements the Spatial Stochastic Frontier model for cross-sectional data introduced by Fusco and Vidoli (2013). The method controls spatial heterogeneity in SFA models by splitting the inefficiency term into three parts: the first one related to spatial peculiarities of the territory in which each single unit operates, the second one related to the specific production features and the third one representing the error term.
Elisa Fusco, Francesco Vidoli
Maintainer: Elisa Fusco <[email protected]>
Fusco, E. and Vidoli, F. (2013). Spatial stochastic frontier models: controlling spatial global and local heterogeneity, International Review of Applied Economics, 27(5) 679-694.
Fusco, E. (2020). Spatial Dependence in Efficiency Parametric Models: A Generalization and Simulation Studies, "Scienze Regionali, Italian Journal of Regional Science" Speciale/2021, 595-618.
This function returns the technical efficiency of each producer (without local spatial effects) calculated by the Battese and Coelli (1988) formulation modified by using an autoregressive specification in the inefficiency term .
eff.ssfa(object, ...)
eff.ssfa(object, ...)
object |
an object of class |
... |
further arguments for methods. |
Technical efficiency of each producer (without local spatial effects).
Battese, G. E., and T. J. Coelli (1988). Prediction of Firm-level Technical Efficiencies with a Generalized Frontier Production Function and Panel Data. Journal of Econometrics 38(3): 387-399.
Fusco, E. and Vidoli, F. (2013). Spatial stochastic frontier models: controlling spatial global and local heterogeneity, International Review of Applied Economics, 27(5) 679-694.
Fusco, E. (2020). Spatial Dependence in Efficiency Parametric Models: A Generalization and Simulation Studies, "Scienze Regionali, Italian Journal of Regional Science" Speciale/2021, 595-618.
Kumbhakar, S. C., and C. A. K. Lovell (2000). Stochastic Frontier Analysis, Cambridge University Press.
library(ssfa) data(SSFA_example_data) data(Italian_W) ssfa <- ssfa(log_y ~ log_x, data = SSFA_example_data, data_w=Italian_W, form = "production", par_rho=TRUE) eff <- eff.ssfa(ssfa)
library(ssfa) data(SSFA_example_data) data(Italian_W) ssfa <- ssfa(log_y ~ log_x, data = SSFA_example_data, data_w=Italian_W, form = "production", par_rho=TRUE) eff <- eff.ssfa(ssfa)
This function returns the fitted values of the original data used to estimate the SSFA model.
## S3 method for class 'ssfa' fitted(object, ...)
## S3 method for class 'ssfa' fitted(object, ...)
object |
an object of class |
... |
further arguments for methods. |
library(ssfa) data(SSFA_example_data) data(Italian_W) ssfa <- ssfa(log_y ~ log_x, data = SSFA_example_data, data_w=Italian_W, form = "production", par_rho=TRUE) fitted.ssfa(ssfa)
library(ssfa) data(SSFA_example_data) data(Italian_W) ssfa <- ssfa(log_y ~ log_x, data = SSFA_example_data, data_w=Italian_W, form = "production", par_rho=TRUE) fitted.ssfa(ssfa)
This is an example dataset that contains the 107 Italian provinces contiguity matrix (year 2008).
data(Italian_W)
data(Italian_W)
A data frame with 107 x 107 row-standardized distances between observations (Italian provinces).
http://www.istat.it/it/archivio/104317#confini.
data(Italian_W)
data(Italian_W)
This function is used to estimate the parameters of the classical SFA model where half-normal distribution of inefficiency term is assumed.
L_hNV(p, y = y, X = X, sc = sc)
L_hNV(p, y = y, X = X, sc = sc)
p |
a vector with the parameters to be estimated. |
y |
the dependent variable. |
X |
the model matrix. |
sc |
specifies the form of the frontier model (-1 = cost, 1 = production). |
Value of the SFA log likelihood function.
This function is used to estimate the parameters of the SSFA model where half-normal distribution of inefficiency term is assumed.
L_hNV_rho(p, y = y, X = X, sc = sc, w = w, sigmau2_sar = sigmau2_sar)
L_hNV_rho(p, y = y, X = X, sc = sc, w = w, sigmau2_sar = sigmau2_sar)
p |
a vector with the parameters to be estimated. |
y |
the dependent variable. |
X |
the model matrix. |
sc |
specifies the form of the frontier model (-1 = cost, 1 = production). |
w |
the spatial weight matrix. |
sigmau2_sar |
is the variance of the spatial correlated part of the inefficiency term estimated into |
Value of the SSFA log likelihood function.
Please note that sigmau2_sar
is not a free parameter because it is estimated into the ssfa.fit
function.
This function allows to plot the data and the fitted values obtained by SSFA model.
plot_fitted(x, y, object, xlab, ylab, main, ...)
plot_fitted(x, y, object, xlab, ylab, main, ...)
x |
the x coordinates of points in the plot. |
y |
the y coordinates of points in the plot. |
object |
an object of class |
xlab |
a title for the x axis. |
ylab |
a title for the y axis. |
main |
an overall title for the plot. |
... |
arguments to be passed to methods, such as graphical parameters (see par). |
library(ssfa) data(SSFA_example_data) data(Italian_W) #### SFA and SSFA comparison sfa <- ssfa(log_y ~ log_x, data = SSFA_example_data, data_w=Italian_W, form = "production", par_rho=FALSE) ssfa <- ssfa(log_y ~ log_x, data = SSFA_example_data, data_w=Italian_W, form = "production", par_rho=TRUE) sfa_fitted <- fitted.ssfa(sfa) plot_fitted(SSFA_example_data$log_x, SSFA_example_data$log_y, ssfa) lines(sort(SSFA_example_data$log_x), sfa_fitted[order(SSFA_example_data$log_x)],col="red")
library(ssfa) data(SSFA_example_data) data(Italian_W) #### SFA and SSFA comparison sfa <- ssfa(log_y ~ log_x, data = SSFA_example_data, data_w=Italian_W, form = "production", par_rho=FALSE) ssfa <- ssfa(log_y ~ log_x, data = SSFA_example_data, data_w=Italian_W, form = "production", par_rho=TRUE) sfa_fitted <- fitted.ssfa(sfa) plot_fitted(SSFA_example_data$log_x, SSFA_example_data$log_y, ssfa) lines(sort(SSFA_example_data$log_x), sfa_fitted[order(SSFA_example_data$log_x)],col="red")
This function allows to plot the residuals of the object against their spatially lagged values, augmented by reporting the summary of influence measures for the linear relationship between the data and the lag.
plot_moran(x, main, xlab, ylab, labels, listw, ...)
plot_moran(x, main, xlab, ylab, labels, listw, ...)
x |
an object of class |
main |
an overall title for the plot. |
xlab |
a label for the x axis. |
ylab |
a label for the y axis. |
labels |
character labels for points with high influence measures, if set to FALSE, no labels are plotted for points with large influence. |
listw |
a listw object from |
... |
arguments to be passed to methods, such as graphical parameters (see par). |
Anselin, L. (1995). Local indicators of spatial association, Geographical Analysis, 27, 93-115.
Anselin, L. (1996). The Moran scatterplot as an ESDA tool to assess local instability in spatial association. pp. 111-125 in M. M. Fischer, H. J. Scholten and D. Unwin (eds) Spatial analytical perspectives on GIS, London, Taylor and Francis.
library(ssfa) data(SSFA_example_data) data(Italian_W) #### SFA and SSFA comparison ### sfa <- ssfa(log_y ~ log_x, data = SSFA_example_data, data_w=Italian_W, form = "production", par_rho=FALSE) ssfa <- ssfa(log_y ~ log_x, data = SSFA_example_data, data_w=Italian_W, form = "production", par_rho=TRUE) moran.test(residuals.ssfa(sfa), sfa$list_w) moran.test(residuals.ssfa(ssfa), ssfa$list_w) plot_moran(sfa, listw=sfa$list_w) plot_moran(ssfa, listw=ssfa$list_w)
library(ssfa) data(SSFA_example_data) data(Italian_W) #### SFA and SSFA comparison ### sfa <- ssfa(log_y ~ log_x, data = SSFA_example_data, data_w=Italian_W, form = "production", par_rho=FALSE) ssfa <- ssfa(log_y ~ log_x, data = SSFA_example_data, data_w=Italian_W, form = "production", par_rho=TRUE) moran.test(residuals.ssfa(sfa), sfa$list_w) moran.test(residuals.ssfa(ssfa), ssfa$list_w) plot_moran(sfa, listw=sfa$list_w) plot_moran(ssfa, listw=ssfa$list_w)
This function returns the residuals of the fitted SSFA model.
## S3 method for class 'ssfa' residuals(object, ...)
## S3 method for class 'ssfa' residuals(object, ...)
object |
an object of class |
... |
further arguments for methods. |
library(ssfa) data(SSFA_example_data) data(Italian_W) ssfa <- ssfa(log_y ~ log_x, data = SSFA_example_data, data_w=Italian_W, form = "production", par_rho=TRUE) residuals.ssfa(ssfa)
library(ssfa) data(SSFA_example_data) data(Italian_W) ssfa <- ssfa(log_y ~ log_x, data = SSFA_example_data, data_w=Italian_W, form = "production", par_rho=TRUE) residuals.ssfa(ssfa)
This function estimates the Spatial Stochastic Frontier model introduced by Fusco and Vidoli (2013) in the following form:
where are the outputs,
the inputs,
the stochastic noise,
the inefficiency term,
the spatial lag,
a standardized row of the spatial weights matrix and
the stochastic noise of the inefficiency term.
ssfa(formula, data = NULL, data_w = NULL, intercept = TRUE, pars = NULL, par_rho = TRUE, form = "cost")
ssfa(formula, data = NULL, data_w = NULL, intercept = TRUE, pars = NULL, par_rho = TRUE, form = "cost")
formula |
an object of class |
data |
an optional data frame containing the variables in the model. |
data_w |
a data frame containing the spatial weight matrix. |
intercept |
logical. If true the model includes intercept. |
pars |
initial values for the parameters to be estimated. |
par_rho |
logical. If true the function estimates the Spatial Stochastic Frontier (SSFA) otherwise the classical Stochastic Frontier (SFA). |
form |
specifies the form of the frontier model as "cost" or "production". |
ssfa
returns the following objects of class ssfa
:
y |
the dependent variable. |
x |
the covariates. |
X |
the model matrix. |
coef |
the estimated coefficients. |
sc |
the form of the frontier model estimated (-1 = cost, 1 = production). |
hess |
a symmetric matrix giving an estimate of the Hessian at the solution found. |
logLik |
the value of the log likelihood function. |
ols |
the linear model for the LR-test. |
sigmau2 |
the estimation of sigmau2 (only if par_rho=FALSE): value of inefficiency variance. |
sigmau2_dmu |
the estimation of sigmau2_dmu (only if par_rho=TRUE): value of the part of the inefficiency variance due to DMU's specificities. |
sigmau2_sar |
the estimation of sigmau2_sar: value of the part of the inefficiency variance due to the spatial correlation. |
sigmav2 |
the estimation of sigmav2: value of the stochastic error variance. |
sigma2 |
the estimation of sigma2: value of the total variance. |
rho |
the estimation of the spatial lag parameter rho. |
fun |
the distribution of the inefficiency term u. |
list_w |
a listw object from |
NOTE 1: In this version the distribution of the inefficiency term is only "half-normal".
NOTE 2: The method used to maximize the log likelihood function is the Newton-Raphson. Please see the R function maxNR
of the maxLik
package for details (Henningsen and Toomet (2011)).
NOTE 3: Please note that the classical SFA inefficiency variance sigmau2
, in the SSFA, is decomposed into sigmau2_dmu
and sigmau2_sar
, respectively the part of inefficiency variance due to DMU's specificities and to the spatial dependence, i.e. sigmau2 = sigmau2_dmu + sigmau2_sar
and consequently the total variance is given by sigma2 = sigmau2_dmu + sigmau2_sar + sigmav2
.
Fusco E. and Vidoli F.
Battese, G. E., and T. J. Coelli (1995). A Model for Technical Inefficiency Effects in a Stochastic Frontier Production Function for Panel Data. Empirical Economics 20(2): 325-332.
Fusco, E. and Vidoli, F. (2013). Spatial stochastic frontier models: controlling spatial global and local heterogeneity, International Review of Applied Economics, 27(5) 679-694.
Fusco, E. (2020). Spatial Dependence in Efficiency Parametric Models: A Generalization and Simulation Studies, "Scienze Regionali, Italian Journal of Regional Science" Speciale/2021, 595-618.
Kumbhakar, S. C., and C. A. K. Lovell (2000). Stochastic Frontier Analysis, Cambridge University Press.
Henningsen, A. and Toomet, O. (2011). maxLik: A package for maximum likelihood estimation in R. Computational Statistics 26(3), 443-458.
library(ssfa) data(SSFA_example_data) data(Italian_W) ssfa <- ssfa(log_y ~ log_x, data = SSFA_example_data, data_w=Italian_W, form = "production", par_rho=TRUE) ### SSFA total variance decomposition sigma2 = ssfa$sigmau2_dmu + ssfa$sigmau2_sar + ssfa$sigmav2 sigma2 ssfa$sigma2
library(ssfa) data(SSFA_example_data) data(Italian_W) ssfa <- ssfa(log_y ~ log_x, data = SSFA_example_data, data_w=Italian_W, form = "production", par_rho=TRUE) ### SSFA total variance decomposition sigma2 = ssfa$sigmau2_dmu + ssfa$sigmau2_sar + ssfa$sigmav2 sigma2 ssfa$sigma2
The dataset contains the simulated data used by Fusco and Vidoli (2013) to test the model. Data Generating Process (DGP) follows the construction criteria proposed by Banker and Natarajan (2008), also used by Johnson and Kuosmanen (2011), with the addition of a strong spatial correlation in the inefficiency term through a spatial lag parameter and a contiguity matrix (107 Italian provinces contiguity matrix, year 2008).
data(SSFA_example_data)
data(SSFA_example_data)
A data frame with 107 observations (Italian provinces) and 2 variables:
DMU
the Decision Making Unit name.
log_x
the input vector (already in logarithmic form).
log_y
the output vector (already in logarithmic form).
Banker, R., and R. Natarajan (2008). Evaluating Contextual Variables Affecting Productivity using Data Envelopment Analysis. Operations Research 56 (1): 48-58.
Johnson, A., and T. Kuosmanen (2011). One-stage Estimation of the Effects of Operational Conditions and Practices on Productive Performance: Asymptotically Normal and Efficient, Root-n Consistent StoNEZD Method. Journal of Productivity Analysis 36:219-230.
data(SSFA_example_data)
data(SSFA_example_data)
The function print.ssfa
is used to display the values of SFA and SSFA estimated coefficients. In particular:
- for SFA the function displays the Intercept
, the regressors beta coefficients, the inefficiency variance sigmau2
, the stochastic error variance sigmav2
and the total variance sigma2
;
- for SSFA the function displays, in addition, the decomposition of the inefficiency variance into sigmau2_dmu
and sigmau2_sar
, respectively the part of inefficiency variance due to DMU's specificities and to the spatial dependence, and finally, the spatial lag parameter rho
.
The function summary.ssfa
is used to display the summary results of SFA and SSFA. In particular:
- for SFA the summary shows the estimation of SFA coefficients (Intercept
, beta coefficients, sigmau2
and sigmav2
) and others useful information as the total variance sigma2
, the inefficiency parameter Lambda
(sigmau/sigmav)
, the Moran I
statistic, the mean of efficiency, the LR-test and the AIC values;
- for SSFA the summary shows, in addition, the decomposition of the inefficiency variance into sigmau2_dmu
and sigmau2_sar
and the spatial lag parameter rho
.
## S3 method for class 'ssfa' print(x, ...) ## S3 method for class 'ssfa' summary(object, ...)
## S3 method for class 'ssfa' print(x, ...) ## S3 method for class 'ssfa' summary(object, ...)
x |
an object of class |
object |
an object of class |
... |
further arguments for methods. |
Please note that the classical SFA inefficiency variance sigmau2
, in the SSFA, is decomposed into sigmau2_dmu
and sigmau2_sar
, respectively the part of inefficiency variance due to DMU's specificities and to the spatial dependence, i.e. sigmau2 = sigmau2_dmu + sigmau2_sar
and consequently the total variance is given by sigma2 = sigmau2_dmu + sigmau2_sar + sigmav2
.
Anselin, L. (1995). Local indicators of spatial association, Geographical Analysis, 27, 93-115.
Fusco, E. and Vidoli, F. (2013). Spatial stochastic frontier models: controlling spatial global and local heterogeneity, International Review of Applied Economics, 27(5) 679-694.
Fusco, E. (2020). Spatial Dependence in Efficiency Parametric Models: A Generalization and Simulation Studies, "Scienze Regionali, Italian Journal of Regional Science" Speciale/2021, 595-618.
Kumbhakar, S. C., and C. A. K. Lovell (2000). Stochastic Frontier Analysis, Cambridge University Press.
library(ssfa) data(SSFA_example_data) data(Italian_W) ssfa <- ssfa(log_y ~ log_x, data = SSFA_example_data, data_w=Italian_W, form = "production", par_rho=TRUE) print(ssfa) summary(ssfa)
library(ssfa) data(SSFA_example_data) data(Italian_W) ssfa <- ssfa(log_y ~ log_x, data = SSFA_example_data, data_w=Italian_W, form = "production", par_rho=TRUE) print(ssfa) summary(ssfa)
This function returns the specific inefficiency of each producer (without local spatial effects) calculated by the Jondrow et al. (JLMS) (1982) formulation modified by using an autoregressive specification in the inefficiency term.
u.ssfa(object, ...)
u.ssfa(object, ...)
object |
an object of class |
... |
further arguments for methods. |
Inefficiency of each producer (without local spatial effects).
Fusco, E. and Vidoli, F. (2013) Spatial stochastic frontier models: controlling spatial global and local heterogeneity , International Review of Applied Economics, 27(5) 679-694.
Fusco, E. (2020). Spatial Dependence in Efficiency Parametric Models: A Generalization and Simulation Studies, "Scienze Regionali, Italian Journal of Regional Science" Speciale/2021, 595-618.
Kumbhakar, S. C., and C. A. K. Lovell. (2000) Stochastic Frontier Analysis, Cambridge University Press.
Jondrow, J., C. A. Knox Lovell, I. S. Materov, and P. Schmidt. (1982). On the Estimation of Technical Inefficiency in the Stochastic Frontier Production Function Model. Journal of Econometrics 19 (2-3): 233-238.
library(ssfa) data(SSFA_example_data) data(Italian_W) ssfa <- ssfa(log_y ~ log_x, data = SSFA_example_data, data_w=Italian_W, form = "production", par_rho=TRUE) ineff <- u.ssfa(ssfa)
library(ssfa) data(SSFA_example_data) data(Italian_W) ssfa <- ssfa(log_y ~ log_x, data = SSFA_example_data, data_w=Italian_W, form = "production", par_rho=TRUE) ineff <- u.ssfa(ssfa)