| 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).
|