General Answers

Q. Does a change in the date that Daylight Savings Time goes into effect matter to GAUSS functions?

A. No. The GAUSS functions that returns date and time, date, hsec, time, and timeutc, return times as set by your operating system. If your operating system fails to properly adjust for Daylight Savings Time, then the GAUSS functions relying on the operating system will also fail to properly adjust. To make sure that the GAUSS functions return the proper times, you will need to make sure your operating system is properly adjusted.

[Back]

Q. I am getting a file not found error when I try running an example that comes with GAUSS.

A. It is not possible for us to write the examples with hard-coded paths to the data files because we cannot predict what kind of directory system the user will have. Since the filenames don't have paths, it is necessary that your working directory be the same as the directory the data files are in. Therefore you must change your working directory to the example subdirectory before attempting to run them. When you first bring up GAUSS your working directory will be the main directory containing the GAUSS executable. To change the working directory to that of the examples, enter the following from the command line:
>> chdir examples

[Back]

Q. What are the minimum machine requirements for GAUSS?

A. A Pentium II computer or better

Operating system and memory (RAM):

In general, a slower machine with a large amount of RAM will out perform a faster machine that relies on a swap file, so install as much RAM as you can.

  • Windows 2000, 64 MB minimum, 256 MB recommended
  • Windows XP, 128 MB minimum, 256 MB recommended
  • Windows Vista, 512 MB minimum, 1 GB recommended
  • Windows 2003, 128 MB minimum, 256 MB recommended
Platforms:
  • GAUSS is also available for Linux, Mac OS X, Solaris, and HP UX11.
  • 64-bit versions of GAUSS are currently available for Windows Itanium 2, Linux, Mac OS X, and Solaris.

Free hard disk space requirements:
  • Minimum of 100 MB free hard disk space; more may be needed depending on the size of matrices and the complexity of the program
  • Monthly defragmenting is recommended
[Back]

Q. How do I use FORTRAN with the GAUSS Foreign Language Interface?

A. dllcall expects the called function to use the C calling convention. Many Fortran compilers default to the stdcall convention, which will result in unpredictable behavior. Under Microsoft Fortran PowerStation and Compaq Visual Fortran, the use of the C calling convention in a function may be specified by including the "C" and "REFERENCE" properties in the function's ATTRIBUTES compiler directive. (The "REFERENCE" property is needed to override the implicit "VALUE" in the "C" property.) The Intel Fortran Compiler uses the C calling convention by default.

[Back]

Q. Changing the workspace size in my gauss.cfg file has no effect. Why?

A. The workspace for GAUSS is managed by the operating system, and there is no need to increase workspace because you have access to all of the available workspace that the operating system is able to assign to GAUSS. If you receive an "insufficient workspace" error, it is generated by the operating system not GAUSS. The operating system is telling you that there is no more space available. This failure could be due to other programs on your computer taking up space (including the operating system itself -- Windows is a space hog). It could also be due to the fact that your GAUSS program is using a large amount of RAM. Remedies include freeing up RAM by closing other programs using up RAM, or re-designing your GAUSS program to use smaller arrays.

It is important to realize that a large matrix can produce several copies of itself in statements. A complicated statement with many nested operations can generate five or six temporary copies of matrices. A 1000x1000 matrix requires 8 megabytes of memory to store in RAM. A complicated statement might require 40 megabytes of RAM to complete. The solution here is to break that statement into a series of statements.

Another recommended method is to leave large amounts of data on the disk in GAUSS data sets rather than trying to bring it all into memory. Bring the data into memory in smaller pieces for calculations.

[Back]

Q. How can I initialize and store data into arrays?

A. To initialize an array you have several options, arrayalloc, arrayinit, and areshape. Arrayalloc and arrayinit produce an array of the specified dimensions, and the latter initializes the elements to a specified value. The reason for the former is that it is faster because there is no initialization, so if you are doing it in a loop and are setting values yourself, then arrayalloc would be preferable.

Areshape will turn a scalar or matrix into an array of given dimensions. Suppose you want 6 4x4 matrices, then areshape would get you that quickly:

      y = areshape(ones(4,4),6|4|4);

There are special functions, putarray and setarray, for entering an array of data into an N-dimensional array, and you can also use indexing, e.g., A[2,.,.] = B. The difference is that the functions are much faster than indexing and so if it's in a loop the functions would be better.

Here is a quick example:

      y = areshape(ones(4,4),2|4|4);
      print y;

      Plane[1,.,.]

            1.000       1.000       1.000       1.000
            1.000       1.000       1.000       1.000
            1.000       1.000       1.000       1.000
            1.000       1.000       1.000       1.000

      Plane[2,.,.]

            1.000       1.000       1.000       1.000
            1.000       1.000       1.000       1.000
            1.000       1.000       1.000       1.000
            1.000       1.000       1.000       1.000

      y[2,.,.] = 2*ones(4,4);
      print y;

      Plane[1,.,.]

            1.000       1.000       1.000       1.000
            1.000       1.000       1.000       1.000
            1.000       1.000       1.000       1.000
            1.000       1.000       1.000       1.000

      Plane[2,.,.]

            2.000       2.000       2.000       2.000
            2.000       2.000       2.000       2.000
            2.000       2.000       2.000       2.000
            2.000       2.000       2.000       2.000

Above is the intuitive, but slow way to initialize and store data. The following would be much faster:

      y = putarray(arrayinit(2|4|4,1),2,2*ones(4,4));

Now suppose you have NxK data matrices for L companies stored on L text files.

      companies = "company1"$|
                         "company2"$|
                         "company3";

      N = 100;
      K = 10;

      z = arrayalloc(rows(companies),N,k,1);

      for i(1,rows(companies),1);

      textfileName = companies[i];

      load y[N,K] = ^textfileName;

      z = putArray(z,i,y);

endfor;
[Back]

Q. I get an error "0498 Environment variable referenced but not defined : 'read_config_file() in GAUSS_CreateWorkspace()'," what is wrong?

A. On a Solaris, Linux, or similar UNIX system, there is an environment variable that is not defined. It is most likely the USER environment variable. If setting the USER environmental variable to the current user name does not fix the issue, please contact Aptech.

[Back]

Q. What are the differences between GAUSS and Matlab*?

A. Matlab's Optimization Toolbox contains a variety of optimization programs. GAUSS has several Application Modules as well as functions in its Run-Time Library (i.e., functions that come with GAUSS without extra cost) that cover the same territory.

In summary, most of the functionality contained in the Matlab Optimization Toolbox comes free with GAUSS in its Run-Time Library. We do have Application Modules as well that offer this functionality along with advanced features.

For example, here are some functions free in GAUSS that are in the Matlab Optimization Toolbox:

  • Qprog - Quadratic programming
  • SqpSolvemt - Sequential quadratic programming
  • QNewton - Quasi-Newton unconstrained optimization
  • EQsolve - Nonlinear equations solver
GAUSS Applications are also available for these and other optimization problems with more advanced features.
  • Constrained Optimization - Sequential Quadratic Programming
  • Constrained Maximum Likelihood MT - Constrained Maximum Likelihood with statistical inference
  • Maximum Likelihood MT - Bounds constrained Maximum Likelihood with statistical inference
  • CurveFit - Model fitting using Levenburg-Marquardt method
  • Nonlinear Equations - Nonlinear equation solution

COMPARING MATLAB WITH GAUSS

The Matlab Optimization ToolBox contains the following:

Unconstrained Optimization:

In their Toolbox, Matlab offers a quasi-Newton method, a Nelder-Mead method, and a "trust-region" method. The trust-region method is a sparse matrix method.

GAUSS includes a quasi-Newton method in its Run-Time Library (i.e., it comes with GAUSS). A public domain version of the Nelder-Mead is available at the American University GAUSS archive. A GAUSS sparse version does not exist.

GAUSS also has an Application module that solves unconstrained maximum likelihood estimation problems. The difference is that it produces a variety of statistical inference methods, including inference using Wald statistic (the usual standard errors), bootstrap, inversion of likelihood ratio statistic, bootstrap. Matlab does not have anything like this module to our knowledge.

Nonlinear Optimization and Multi-Objective Optimization:

The Matlab ToolBox has a sequential quadratic programming (SQP) method.

GAUSS has an SQP nonlinear optimizer in the Run-Time Library, and has an Application Module, Constrained Optimization, with more advanced features.

There's also a GAUSS Application Module, Constrained Maximum Likelihood, which in addition to solving the maximum likelihood problem for an arbitrary model with linear and nonlinear constraints, both equality and inequality, on the parameters, also provides a wide variety of statistical inference. Matlab does not have anything like this to our knowledge.

Nonlinear Least Squares, Data Fitting, and Nonlinear Equations:

In their Toolbox, Matlab offers a "trust-region" method for bound constrained problems, a Levenberg-Marquardt method, and a Gauss-Newton method.

GAUSS has an Application Module, CurveFit, which implements the Levenberg-Marquart method. There is a function in the GAUSS Run-Time Library, SQPsolvemt, which can solve the bounds problem (as well as the linear and nonlinear constraint problem). The MaxlikMT Application Module also solves the bound constrained problem for statistical models.

Quadratic and Linear Programming:

In their Toolbox, Matlab has three quadratic programming functions, and an interior point linear programming method.

GAUSS has a quadratic programming function in its Run-Time Library, and a linear programming Application Module.

Binary Integer Programming:

In their ToolBox, Matlab has a binary integer programming method.

GAUSS does not come with a function to solve this kind of problem. However, there is a third party application called GENO that can solve this problem.

Bottom Line:

First, GAUSS Applications Modules CMLMT and MaxlikMT provide a variety of statistical inference methods in addition to solving the estimation problem for any user-provided log-likelihood function. Matlab does not have anything like that to our knowledge.
Second, much of the Matlab Toolbox is in GAUSS without additional cost.
Third, a thirty-party GAUSS product GENO solves all of the types of problems in the Toolbox and more. GENO can solve integer problems, linear programming problems, linear programming problems with nonlinear constraints, and more.

Fourth, Matlab has more sparse optimization methods. GAUSS's Linear Programming module contains a sparse method, but we do not have a sparse unconstrained optimization method like their trust-region unconstrained optimization method.


*Matlab is a registered trademark of The MathWorks, Inc.

[Back]


© Copyright 2004-2008.   Aptech Systems, Inc.
Black Diamond, WA.  All Rights Reserved Worldwide.