Package semsfa. April 21, 2018

Similar documents
Pseudolikelihood estimation of the stochastic frontier model SFB 823. Discussion Paper. Mark Andor, Christopher Parmeter

The Stochastic Approach for Estimating Technical Efficiency: The Case of the Greek Public Power Corporation ( )

On the Distributional Assumptions in the StoNED model

Package ald. February 1, 2018

FS January, A CROSS-COUNTRY COMPARISON OF EFFICIENCY OF FIRMS IN THE FOOD INDUSTRY. Yvonne J. Acheampong Michael E.

Package mle.tools. February 21, 2017

Package dng. November 22, 2017

2. Efficiency of a Financial Institution

The quantile regression approach to efficiency measurement: insights from Monte Carlo Simulations

Published: 14 October 2014

Package ELMSO. September 3, 2018

**BEGINNING OF EXAMINATION** A random sample of five observations from a population is:

FINITE SAMPLE DISTRIBUTIONS OF RISK-RETURN RATIOS

Package uqr. April 18, 2017

Package ensemblemos. March 22, 2018

Applying regression quantiles to farm efficiency estimation

Market Risk Analysis Volume I

POOLING CROSS-SECTION AND TIME SERIES DATA IN THE ESTil~TION OF STOCHASTIC FRONTIER PRODUCTION FUNCTION MODELS. Lung-Fei Lee and Mark M.

Package QRank. January 12, 2017

A Monte Carlo Study of Ranked Efficiency Estimates from Frontier Models

Efficiency Measurement with the Weibull Stochastic Frontier*

Package GenOrd. September 12, 2015

LTCI: a multi-state semi-markov model to describe the dependency process for elderly people

Research of the impact of agricultural policies on the efficiency of farms

Statistical Models and Methods for Financial Markets

Volume 37, Issue 2. Handling Endogeneity in Stochastic Frontier Analysis

Package scenario. February 17, 2016

The ghosts of frontiers past: Non homogeneity of inefficiency measures (input-biased inefficiency effects)

1. You are given the following information about a stationary AR(2) model:

Calibration of Interest Rates

Package FADA. May 20, 2016

Package LNIRT. R topics documented: November 14, 2018

A case study on using generalized additive models to fit credit rating scores

Package conf. November 2, 2018

A Normal Truncated Skewed-Laplace Model in Stochastic Frontier Analysis

Package cbinom. June 10, 2018

Semiparametric Modeling, Penalized Splines, and Mixed Models

MEASURING TECHNICAL EFFICIENCY OF KUWAITI BANKS. Imed Limam. Deputy Director, Arab Planning Institute, Kuwait.

On the Distribution of Stock Market Data

Nonparametric Estimation of a Hedonic Price Function

Idiosyncratic risk, insurance, and aggregate consumption dynamics: a likelihood perspective

Portfolio Optimization. Prof. Daniel P. Palomar

Package smam. October 1, 2016

Package PortRisk. R topics documented: November 1, Type Package Title Portfolio Risk Analysis Version Date

Semiparametric Modeling, Penalized Splines, and Mixed Models David Ruppert Cornell University

Computational Statistics Handbook with MATLAB

Package SimCorMultRes

Package optimstrat. September 10, 2018

yuimagui: A graphical user interface for the yuima package. User Guide yuimagui v1.0

PASS Sample Size Software

SYLLABUS OF BASIC EDUCATION SPRING 2018 Construction and Evaluation of Actuarial Models Exam 4

Financial Mathematics III Theory summary

Introductory Econometrics for Finance

PARAMETRIC AND NON-PARAMETRIC BOOTSTRAP: A SIMULATION STUDY FOR A LINEAR REGRESSION WITH RESIDUALS FROM A MIXTURE OF LAPLACE DISTRIBUTIONS

mfx: Marginal Effects, Odds Ratios and Incidence Rate Ratios for GLMs

Efficiency Analysis on Iran s Industries

Random Variables and Probability Distributions

Time Invariant and Time Varying Inefficiency: Airlines Panel Data

Package ProjectManagement

Course information FN3142 Quantitative finance

M.I.T Fall Practice Problems

The University of Chicago, Booth School of Business Business 41202, Spring Quarter 2011, Mr. Ruey S. Tsay. Solutions to Final Exam.

The actuar Package. March 24, bstraub... 1 hachemeister... 3 panjer... 4 rearrangepf... 5 simpf Index 8. Buhlmann-Straub Credibility Model

Loss Simulation Model Testing and Enhancement

Extend the ideas of Kan and Zhou paper on Optimal Portfolio Construction under parameter uncertainty

Monitoring Processes with Highly Censored Data

A Two-Step Estimator for Missing Values in Probit Model Covariates

STAT 509: Statistics for Engineers Dr. Dewei Wang. Copyright 2014 John Wiley & Sons, Inc. All rights reserved.

Intro to GLM Day 2: GLM and Maximum Likelihood

Continuous random variables

Package GCPM. December 30, 2016

Package MixedPoisson

Package MultiSkew. June 24, 2017

Generalized Additive Modelling for Sample Extremes: An Environmental Example

Chapter 5 Univariate time-series analysis. () Chapter 5 Univariate time-series analysis 1 / 29

Package bunchr. January 30, 2017

Modelling Returns: the CER and the CAPM

Statistical Analysis of Data from the Stock Markets. UiO-STK4510 Autumn 2015

Gain or Loss: An analysis of bank efficiency of the bail-out recipient banks during

FAV i R This paper is produced mechanically as part of FAViR. See for more information.

Wrong Skewness and Finite Sample Correction in Parametric Stochastic Frontier Models

Gamma Distribution Fitting

Missing Data. EM Algorithm and Multiple Imputation. Aaron Molstad, Dootika Vats, Li Zhong. University of Minnesota School of Statistics

Package gmediation. R topics documented: June 27, Type Package

Week 1 Quantitative Analysis of Financial Markets Distributions B

International Journal of Applied Econometrics and Quantitative Studies. Vol.2-4(2005)

The Economic and Social BOOTSTRAPPING Review, Vol. 31, No. THE 4, R/S October, STATISTIC 2000, pp

Measuring Cost Efficiency in European Banking A Comparison of Frontier Techniques

Package eesim. June 3, 2017

Wrong Skewness and Finite Sample Correction in Parametric Stochastic Frontier Models

The Lmoments Package

Package ratesci. April 21, 2017

Duration Models: Parametric Models

STAT 825 Notes Random Number Generation

Lecture 5: Fundamentals of Statistical Analysis and Distributions Derived from Normal Distributions

Practice Exam 1. Loss Amount Number of Losses

Bloomberg. Portfolio Value-at-Risk. Sridhar Gollamudi & Bryan Weber. September 22, Version 1.0

Pricing Implied Volatility

Management efficiency in minority- and womenowned

An Investigation of Life Insurer Efficiency in Canada

Transcription:

Type Package Package semsfa April 21, 2018 Title Semiparametric Estimation of Stochastic Frontier Models Version 1.1 Date 2018-04-18 Author Giancarlo Ferrara and Francesco Vidoli Maintainer Giancarlo Ferrara <giancarlo.ferrara@gmail.com> Description Semiparametric Estimation of Stochastic Frontier Models following a two step procedure: in the first step semiparametric or nonparametric regression techniques are used to relax parametric restrictions of the functional form representing technology and in the second step variance parameters are obtained by pseudolikelihood estimators or by method of moments. Depends R (>= 3.1.2), mgcv, np, gamlss Imports moments, doparallel, foreach, iterators License GPL NeedsCompilation no Repository CRAN Date/Publication 2018-04-20 22:10:24 UTC R topics documented: semsfa-package....................................... 2 efficiencies.semsfa..................................... 2 fan.............................................. 4 plot.semsfa......................................... 5 semsfa............................................ 6 summary.semsfa....................................... 10 Index 13 1

2 efficiencies.semsfa semsfa-package Semiparametric Stochastic Frontier Models Description Semiparametric Estimation of Stochastic Frontier Models following the two step procedure proposed by Fan et al (1996) and further developed by Vidoli and Ferrara (2015) and Ferrara and Vidoli (2017). In the first step semiparametric or nonparametric regression techniques are used to relax parametric restrictions regards the functional form of the frontier and in the second step variance parameters are obtained by pseudolikelihood or method of moments estimators. Monotonicity restrinctions can be imposed by means of P-splines. Author(s) Giancarlo Ferrara, Francesco Vidoli Maintainer: Giancarlo Ferrara <giancarlo.ferrara@gmail.com> References Aigner., D., Lovell, C.A.K., Schmidt, P., 1977. Formulation and estimation of stochastic frontier production function models. Journal of Econometrics 6:21-37 Fan, Y., Li, Q., Weersink, A., 1996. Semiparametric estimation of stochastic production frontier models. Journal of Business & Economic Statistics 14:460-468 Ferrara, G., Vidoli, F., 2017. Semiparametric stochastic frontier models: A generalized additive model approach. European Journal of Operational Research, 258:761-777. Hastie, T., Tibshirani, R., 1990. Generalized additive models. Chapman & Hall Kumbhakar, S.C., Lovell, C.A.K, 2000. Stochastic Frontier Analysis. Cambridge University Press, U.K Meeusen, W., van den Broeck, J., 1977. Efficiency estimation from Cobb-Douglas production functions with composed error. International Economic Review, 18:435-444 Vidoli, F., Ferrara, G., 2015. Analyzing Italian citrus sector by semi-nonparametric frontier efficiency models. Empirical Economics, 49:641-658 efficiencies.semsfa Prediction of the individual efficiency score Description Usage This function calculates and returns efficiency estimates from semiparametric stochastic frontier models estimated with semsfa(). efficiencies.semsfa(semobj, log.output = TRUE,...)

efficiencies.semsfa 3 Arguments semobj a stochastic frontier model object returned by semsfa() log.output logical. Is the dependent variable logged?... further arguments to the summary method are currently ignored Details The estimation of the individual efficiency score for a particular point (x, y) on a production frontier might be obtained from the Jondrow et al. (1982) procedure. Defining: it can be shown that: σ 2 = σ 2 u + σ 2 v, u (x) = σ 2 uɛ/σ 2, σ 2 = σ 2 uσ 2 v/σ 2 u ɛ N + (µ (x), σ 2 (x)). We can use this distribution to obtain point previsions of u trought the mean of the conditional distribution: E(u ɛ) = µ + σ f( µ /σ )/(1 F (µ /σ )) where f and F represent the standard Normal density and cumulative distribution function, respectively; alternative formulas for cost frontier models are easy to get (please see Kumbhakar and Lovell, 2000). If the response variable is measured in logs, a point estimate of the efficiency is then provided by exp( u) (0, 1); otherwise, (fitt-u)/fitt where fitt is the estimated output evaluated at the frontier, given the inputs. Value An object of class semsfa containing the following additional results: u efficiencies the prediction of the individual efficiency score point estimate of the efficiency Author(s) Giancarlo Ferrara and Francesco Vidoli References Jondrow, J., Lovell, C.A.K., Materov, I.S., Schmidt, P., 1982. On the estimation of technical inefficiency in stochastic frontier production models. Journal of Econometrics 19, 233-238. Kumbhakar, S.C., Lovell, C.A.K., 2000. Stochastic Frontier Analysis. Cambridge University Press, New York. See Also semsfa, summary.semsfa, plot.semsfa.

4 fan Examples set.seed(0) n<-200 #generate data x<- runif(n, 1, 2) fy<- 2+30*x-5*x^2 v<- rnorm(n, 0, 1) u<- abs(rnorm(n,0,2.5)) #production frontier y <- fy + v - u dati<-data.frame(y,x) #first-step: gam, second-step: fan (default) o<-semsfa(y~s(x),dati,sem.method="gam") #calculate efficiencies a<-efficiencies.semsfa(o) fan Pseudolikelihood estimator of the λ parameter Description Pseudolikelihood estimator of the λ parameter Usage fan(lambda_fan, resp, Ey, ineffd) Arguments lambda_fan resp Ey ineffd the λ = σ u /σ v parameter to be estimated the single response variable Y observed the conditional expectation estimate obtained in the first step of the algorithm logical: TRUE for estimating a production function, FALSE for estimating a cost function; this is done for usage compatibility with frontier package Value Estimated λ parameter Note Internal usage only

plot.semsfa 5 Author(s) Giancarlo Ferrara and Francesco Vidoli References Fan, Y., Li, Q., Weersink, A., 1996. Semiparametric estimation of stochastic production frontier models. Journal of Business & Economic Statistics 14:460-468 plot.semsfa Default SEMSFA plotting Description This function plots the semiparametric/nonparametric intermediate model object estimated in the first step of the algorithm and, if efficiencies.semsfa() is esecuted, individual point estimate of the efficiency. Usage ## S3 method for class 'semsfa' plot(x, g.type, mod,...) Arguments x a semsfa object as returned from semsfa() or efficiencies.semsfa() g.type a character string indicating the type of plot. Possible values are: "reg" to plot the semiparametric/nonparametric model object estimated in the first step from semsfa(), "eff" to draw point estimate of the efficiency obtained from efficiencies.semsfa() mod a character string indicating the plot style for g.type="eff": "hist" for histogram and "dens" for density plot... further arguments passed to plot.default. Value The function simply generates plots. Author(s) Giancarlo Ferrara and Francesco Vidoli See Also semsfa, efficiencies.semsfa.

6 semsfa Examples set.seed(0) n<-200 #generate data x<- runif(n, 1, 2) fy<- 2+30*x-5*x^2 v<- rnorm(n, 0, 1) u<- abs(rnorm(n,0,2.5)) #production frontier y <- fy + v - u dati<-data.frame(y,x) #first-step: gam, second-step: fan (default) o<-semsfa(y~s(x),dati,sem.method="gam") #the following plot will be like that generated by plot.gam plot(o,g.type="reg") #adding a covariate z<- runif(n, 1, 2) dati$z<-z #first-step: kernel, second-step: fan (default) o<-semsfa(y~x+z,dati,sem.method="kernel") #the plot will be like that generated by a plot.npreg ## Not run: plot(o,g.type="reg") #calculate efficiencies... a<-efficiencies.semsfa(o) plot(a,g.type="eff",mod="dens") #adding further parameters as for plot.default: col, main, xlim,... plot(a,g.type="eff",mod="dens",col=2,main="density Efficiency",xlim=c(0,1),xlab="Efficiency") semsfa Semiparametric Estimation of Stochastic Frontier Models Description Usage Semiparametric Estimation of Stochastic Frontier Models following the two step procedure proposed by Fan et al (1996) and further developed by Vidoli and Ferrara (2015) and Ferrara and Vidoli (2017). In the first step semiparametric or nonparametric regression techniques are used to relax parametric restrictions regards the functional form of the frontier and in the second step variance parameters are obtained by pseudolikelihood or method of moments estimators. Monotonicity restrinctions can be imposed by means of P-splines. semsfa(formula, data = list(), sem.method = "gam", var.method = "fan", ineffdecrease=true, tol = 1e-05, n.boot=0,...)

semsfa 7 Arguments formula data sem.method var.method ineffdecrease tol Details n.boot an object of class "formula": a symbolic description of the model to be fitted. The details of model specification are given under Details a data frame containing the variables in the model a character string indicating the type of estimation method to be used in the first step for the semiparametric or nonparametric regression; possible values are "gam" (default), "gam.mono" for monotone gam, "kernel" or "loess" the type of estimation method to be used in the second step for the variance components: "fan" (default) for Fan et al. (1996) approach and "mm" for method of moments logical: TRUE (default) for estimating a production function, FALSE for estimating a cost function; this is done for usage compatibility with frontier package numeric. Convergence tolerance for pseudolikelihood estimators of variance parameters of the composed error term numeric. Number of bootstrap replicates to calculate standard error for the variance components, by default bootstrap standard errors will not be calculated (n.boot=0)... further arguments accepted by mgcv::gam, gamlss::gamlss, np::npreg or loess Parametric stochastic production frontier models, introduced by Aigner et al. (1977) and Meeusen and van den Broeck (1977), specify output in terms of a response function and a composite error term. The composite error term consists of a two-sided error representing random effects and a one-sided term representing technical inefficiency. The production stochastic frontier model can be written, in general terms, as: y i = f(x i ) + v i u i, i = 1,..., n, where Y i R + is the single output of unit i, X i R + p is the vector of inputs, f(.) defines a production frontier relationship between inputs X and the single output Y. In following common practice, we assume that v and u are each identically independently distributed (iid) with v N(0, σ v ) and u distributed half-normally on the non-negative part of the real number line: u N + (0, σ u ); furthermore, the probability density function of the composite disturbance can be rewritten in terms of λ = σ u /σ v and σ 2 = σ 2 v + σ 2 u for the estimation algorithm. To overcome drawbacks due to the specification of a particular production function f( ) we consider the estimation of a Semiparametric Stochastic Production Frontier Models through a two step procedure originally proposed by Fan et al (1996): in the first step a semiparametric or nonparametric regression technique is used to estimate the conditional expectation, while in the second step λ and σ parameters are estimated by pseudolikelihood (via optimize) or by method of moments estimators (var.method argument). In the case of a cost function frontier (ineffdecrease=false) the composite error term is ɛ = v + u. Vidoli and Ferrara (2015) suggest a Generalized Additive Model (GAM) framework in the first step even if any semiparametric or nonparametric tecnique may be used (Fan et al., 1996). The avalaible methods for the first step are: sem.method="gam" invokes gam() from mgcv;

8 semsfa sem.method="gam.mono" invokes gamlss() from gamlss to impose monotonicity restrictions on inputs; sem.method="kernel" invokes npreg() from np; sem.method="loess" invokes loess() from stats. Since in the first step different estimation procedure may be invoked from different packages, the formula argument has to be compatible with the corresponding function. The avalaible methods for the second step are: var.method="fan" pseudolikelihood; var.method="mm" Method of Moments. Value semsfa() returns an object of class semsfa. An semsfa object is a list containing the following components: formula y data call sem.method var.method ineffdecrease reg reg.fitted regkewness lambda sigma fitted tol residual.df bic n.boot boot.mat b.se the formula used the response variable used as specified in formula the data frame used the matched call the type of semiparametric or nonparametric regression as given by sem.method ("gam", "gam.mono", "kernel", "loess") the type of error component estimator ("fan", "mm") logical, as given by ineffdecrease an object of class "gam", "gamlss" (monotone gam), "np"(kernel) or "loess" depending on sem.method fitted values on the "mean" frontier (semiparametric/non parametric regression) asymmetry index calculated on residuals obtained in the first step λ estimate σ estimate fitted values on the frontier convergence tolerance for pseudolikelihood estimators used in optimize residual degree of freedom of the model Bayesian Information Criterion according to the formula -2*log-likelihood+ log(n)*npar where npar represents the number of parameters in the fitted model and n the number of observations number of bootstrap replicates used (default n.boot=0) a matrix containing λ and σ values from each bootstrap replicate (if n.boot>0) boostrapped standard errors for λ and σ (if n.boot>0)

semsfa 9 Note The function summary (i.e. summary.semsfa) can be used to obtain a summary of the results, efficiencies.semsfa to calculate efficiency scores and plot (i.e. plot.semsfa) to graph efficiency previsions and regression components (i.e. the first step). You must take the natural logarithm of the response variable before fitting a stochastic frontier production or cost model. Author(s) Giancarlo Ferrara References Aigner., D., Lovell, C.A.K., Schmidt, P., 1977. Formulation and estimation of stochastic frontier production function models. Journal of Econometrics 6:21-37 Fan, Y., Li, Q., Weersink, A., 1996. Semiparametric estimation of stochastic production frontier models. Journal of Business & Economic Statistics 14:460-468 Ferrara, G., Vidoli, F., 2017. Semiparametric stochastic frontier models: A generalized additive model approach. European Journal of Operational Research, 258:761-777. Hastie, T., Tibshirani, R., 1990. Generalized additive models. Chapman & Hall Kumbhakar, S.C., Lovell, C.A.K, 2000. Stochastic Frontier Analysis. Cambridge University Press, U.K Meeusen, W., van den Broeck, J., 1977. Efficiency estimation from Cobb-Douglas production functions with composed error. International Economic Review, 18:435-444 Vidoli, F., Ferrara, G., 2015. Analyzing Italian citrus sector by semi-nonparametric frontier efficiency models. Empirical Economics, 49:641-658 See Also summary.semsfa, efficiencies.semsfa, plot.semsfa. Examples set.seed(0) n<-200 x<- runif(n, 1, 2) v<- rnorm(n, 0, 1) u<- abs(rnorm(n,0,2.5)) #cost frontier fy<- 2+30*x+5*x^2 y <- fy + v + u dati<-data.frame(y,x) #first-step: gam, second-step: fan o<-semsfa(y~s(x),dati,sem.method="gam",ineffdecrease=false)

10 summary.semsfa #first-step: gam, second-step: mm ## Not run: o<-semsfa(y~s(x),dati,sem.method="gam",ineffdecrease=false,var.method="mm") plot(x,y) curve(2+30*x+5*x^2,add=true) points(sort(x),o$fitted[order(x)],col=3,type="l") #production frontier fy<- 2+30*x-5*x^2 y <- fy + v - u dati<-data.frame(y,x) #first-step: gam, second-step: fan o<-semsfa(y~s(x),dati,sem.method="gam",ineffdecrease=true) plot(x,y) curve(2+30*x-5*x^2,add=true) points(sort(x),o$fitted[order(x)],col=3,type="l") #imposing monotonicity restrictions on inputs set.seed(25) n=150 x=runif(n,0,3) u=abs(rnorm(n,0,1)) v=rnorm(n,0,.75*((pi-2)/pi)) #production frontier fy<-10-5*exp(-x) y <- fy+v-u dati<-data.frame(y,x) #first-step: monotone gam, second-step: fan o<-semsfa(y~pbm(x,mono="up"),sem.method = "gam.mono",dati) plot(x,y) curve(10-5*exp(-x),add=true) points(sort(x),o$fitted[order(x)],col=3,type="l") summary.semsfa Summary for semsfa object Description Usage Create and print summary results of a stochastic frontier model object returned by semsfa() with regard to the "CONDITIONAL EXPECTATION ESTIMATE" of the first step and to the "VARI- ANCE COMPONENTS ESTIMATE" of the compound error. ## S3 method for class 'semsfa' summary(object,...)

summary.semsfa 11 Arguments Details Value object an semsfa object returned by semsfa()... further arguments to the summary method are currently ignored Please note that if bootstrap is carried out the t-statistic is not reliable for testing the statistical significance of σ and λ, because these parameters are censored and cannot follow a t-distribution. We suggest to compare the BIC of the semiparametric estimated model with the base model. summary.semsfa returns the summary of an object returned by semsfa() with few modifications if bootstrap is carried out: b.t b.pv t-statistic given the bootstrapped standard errors for λ and σ (b.se) p-values of the t-statistic Note summary returns the same result if applied to an object created with semsfa or efficiencies.semsfa Author(s) Giancarlo Ferrara and Francesco Vidoli See Also semsfa, efficiencies.semsfa Examples #generate data set.seed(0) n<-200 x<- runif(n, 1, 2) fy<- 2+30*x-5*x^2 v<- rnorm(n, 0, 1) u<- abs(rnorm(n,0,2.5)) #production frontier y <- fy + v - u dati<-data.frame(y,x) #first-step: gam, second-step: fan (default) #without bootstrap o<-semsfa(y~s(x),dati,sem.method="gam") summary(o)

12 summary.semsfa #... with bootstrap o<-semsfa(y~s(x),dati,sem.method="gam",n.boot=100) summary(o)

Index efficiencies.semsfa, 2, 5, 9, 11 fan, 4 plot.semsfa, 3, 5, 9 semsfa, 3, 5, 6, 11 semsfa-package, 2 summary.semsfa, 3, 9, 10 13