This code was written by Felix Ritchie over the period 19911998. All code on this page is being reviewed and revised. It generally still seems to works but the XPReg program has an imcompatibility with GAUSS 5.0 (a problem creating arrays of variable names for output). The code has not been extensively tested on the latest versions of GAUSS. Comments gratefully received. This code can be freely used, with appropriate citation.
This code was developed as part of Felix' PhD thesis and for other projects at the University of Stirling over the period.
It provides for linear analysis of crosssection and panel data models, with or without instrumental variables (IV), and allowing for the creation of lagging and leading variables. Models include
 simple OLS regression, standard and covariance
 Simple panel fixedeffects, covariance and differencing estimators
 Timevarying fixedeffects: panel regression with unrestricted periodical variation in the parameter
 Pooled singleequation differenced estimator: potentially more efficient system differencing estimator
 Chamberlain's minimum distance estimator; not fully implemented
 First and second stage linear SURE model
Please note that this was an ongoing series of research projects. Version 7 was complete and fully working, but version 8 was not fully implemented as in 1998 Dr Ritchie left academia to focus on IT consulting. In particular IV estimation, fully implemented on earlier versions of the program, is only partially implemented.
Originally XPReg was designed to work on a crossproduct matrix, as for security reasons the raw data was unavailable. It still does this, but it now also works on a standard GAUSS matrix. The regression models available obviously depend upon the type of matrix, and so it does ask many questions.
In due course the program will be reviewed, revised and (possibly) resurrected, but this is not scheduled to happen in the very near future. Please note that the user manual relates primarily to version 7, rather than the unfinshed version 8. For the workings of version 8, please consult the relevant discussion papers or contact Dr Ritchie.
In the meantime, the downloads available from here are:
 Version 7 source code, zipped
 Version 8 source code, zipped
 User manual in PDF, zipped WPWin or zipped MS Word formats.
 Relevant University of Stirling discussion/working papers (latest versions, zipped WPWin files):
 DP 95/12: Efficient Access to large datasets for linear regression models
Theory behind using crossproducts and TVFE model
 DP 96/11: Timevarying parameters in panel models
The TVP methodology
 DP 97/04: Fixedeffects in static models: deviations or differences?
Theory of differencing and PSED differenced estimator
 XPOutFmt.gp: a program to format the output from XPReg for importing into spreadsheets
There are also a few programs about to manipulate crossproduct matrices, combining rows, creating dummy variables and so on. These are all development utilities, but can be obtained by emailing Felix Ritchie.
These general purpose utilities, implemented in procedures, are all in ASCII text. They are also mostly contained in the source code zips for the XPReg program.
 IOUtils.gl: file handling
 DataUtil.gl: ragbag of routines: read (possibly nonnull) prompted input string or Y/Ns, get numbers with more flexibility than CON, check whether file exists, query for name of existing file, print warning message etc
 BitOps.gl: bitbased set operations: test bit, set bit, emptyset
 SelDelFR.gl: replicates SELIF and DELIF but (a) requires much less memory and (b) works on correct definition of logical calculation (ie 0not 0 rather than 01). Also duplicate routines which do not use PACKR, hence can be used on matrices with missing values
 SingColl.gl: Singularity/multicollinearity tests for crossproduct matrices; uses fuzzy equivalence. Reference for multicollinearity test in comments.
 Constant.gl: constants used by some of these files
 Options.gl: options used by some of these files
 MakeXX.gl: routine to create crossproduct matrices
