e-mail

Stochastic Nonparametric Envelopment of Data (StoNED) - homepage


News


Overview


Literature Review


Papers


Poster


Presentations


Codes (GAMS, Excel, R)


Collaborators



Timo Kuosmanen homepage


NOMEPRE homepage



Codes for computing the StoNED model

This page provides some examples of program codes that can be used for computing the StoNED estimators in applications. So far, we have codes available for GAMS and Matlab. Further documentation of these programmes will be added to this page asap. Program codes for "R" are under development. New codes will be added to this website as soon as they have been tested - stay tuned for further developments!

Integrated StoNED codes

An example of an integrated GAMS code for StoNED model developed by Andy Johnson. This code computes both Step 1 (CNLS regression) and Step 2 (method of moments estimation of the standard deviations) assuming half-normal inefficiency and normal noise as in Kuosmanen and Kortelainen (2007). The conditional expected values of inefficiency are computed using Jondrow et al. (1982) formula.

Other examples of integrated GAMS codes for the StoNED estimation have been developed by Richard Mulwa. The first code Mumias Moments applies the method of moments estimation. The second code Mumias Pseudolikelihood applies the pseudolikelihood estimator developed by Fan et al. (1996).

Codes for Step 1 - CNLS regression

A simple example of a GAMS code for the cross-sectional CNLS regression.

An example of a Matlab code for computing the CNLS regression, consisting of three files: 1) StoNed.m, 2) DataEntry.m, and 3) Sample.xls. The input data are inserted in the Excel file Sample.xls, worksheet "X" (inputs on rows, observations on columns). The output vector is inserted in column A of the worksheet "Y" (observations on rows). Additional observations and inputs can be directly inserted to the Excel file without adjusting the Matlab code. Execute the Matlab file StoNed.m to compute the optimal solution to the CNLS regression. The vector of results is in form (residuals, coefficients beta)'. Many thanks to Natalia Kuosmanen, Andy Johnson, Reza Kazemi Matin, and H. Molhem for develing this code.

Codes for Step 2 - method of moments estimation

An Excel sheet for the Method of Moments estimation of the standard deviations (half-normal inefficiency, normal noise) and conditional expected values of inefficiency.

GAMS code for the Method of Moments estimation of the standard deviations (half-normal inefficiency, normal noise) and conditional expected values of inefficiency.

Codes for the panel data model

An example of a GAMS code for panel data, with fixed effects treatment (note: relates to the application to wholesale and retail trade reported in Kuosmanen (2007).

Excel spreadsheet application of StoNED

Although the StoNED method is computationally more demanding than the conventional DEA and SFA methods, once the frontier has been estimated, it can be presented in a relatively simple piece-wise linear form. As a part of the project commission by the Finnish Energy Market Authority (EMV), a simple Excel application was developed for computing the StoNED efficiency scores and cost targets for any arbitrary values of outputs y and the contextual variable z. This application enables clients to make own calculations and analyzes within the given model specification. For example, it is possible to evaluate the impacts of increasing demand for electricity in the future on the level of acceptable total cost and efficiency. An English version of the Excel application is available HERE.

  StoNED homepage