GAUSS Programming

Creating and Editing a GAUSS Program

Example: Lesson 2.1

File I/O and Data Transformation

Example: Lesson 2.2
Example: Lesson 2.3

GAUSS Built-In Functions

Example: Lesson 2.4

Controlling Execution Flow

Example: Do you know the accuracy of your computer's numerical calculation? This example addresses this important problem. Suppose e is a known small positive number, and the 5x4 matrix X is defined as follows:

1  1  1  1
e  0  0  0
0  e  0  0
0  0  e  0
0  0  0  e

Verify that the eigenvalues of X'X are 4+e2, e2, e2, and e2. How small of the value of e your computer will allow so that X'X can be inverted? (Program).

Writing Your Own Functions

Example: Write a single-line GAUSS function to convert a quarterly time series into the annual series by taking the average of every four data points. How you extend the single-line version of time series conversion function to a multi-line procedure so that it can handle the conversion of more than one time series? (Program).

Library and Package

Example: Using GAUSS to present and solve the following functions:

  1. f(x) = ln(x) - x2
    Hint: The maximal of f(x) is found at x = Ö½ or 0.707. (Program).

  2. g(x) = (x12 + x2 - 11)2 + (x1 + x22 -7)2
    Hint: There are four minima: (3, 2), (3.5844, -1.8481), (-3.7793, -3.2832), (-2.8051, 3.1313). (Program).