Hamlton (1989) MS-AR program

I downloaded the Hamilton (1989) codes

but the zip file contains couple of files including:

1- Example 1,2, 3 and so on...

2- GNP82.DAT


4-PROCS (a program file)

5-MAXSEEK (a program fiile)

6-EXDATA.TXT (another data file)


could you please on how to proceed step-by-step to make this program work?

I though the model program (MAXEEK) should have been on the same file

with PROCS (procedures) for the program to work !?

Please show me where to start , in which directory should we save all of these files?

I tried to save them all into the examples directory  on my gauss but

only PROCS and MAXEEK were saved.

Please help me understand how do i replicate this Hamilton Gauss program.

12 Answers


  1. Using your operating system (Windows, Mac, Linux), create a folder to use for this project.
  2. Place all the above files in this directory.
  3. Open the file you just created in the GAUSS Project Folders Window.
  4. Set your GAUSS working directory to this folder.
  5. Open the 'MAXSEEK' and 'PROCS' files in GAUSS, by double-clicking on it in the Project Folders Window.
  6. Check the bottom of the 'MAXSEEK' and 'PROCS' files to make sure there is not a strange character that looks like this SUB. If you see that, delete it.
  7. Run the 'MAXSEEK' file.

If you have any trouble with this, please post a very specific question (exactly what you did and exactly what error you found) and we will happily guide you.




Thanks a lot...

I id exactly what you said and there is only 3 errors messages

1 - G0008: Syntax error 'endp' [procs. line 153]

where i have this: endp;

2- G0155: Nested procedure definition [MAXEEK, line 182]

where i have this:

proc matpm(xth);  @This proc defines the user's conventions for reading
elements of Markov transition probabilities from
parameter vector @

3 - Syntax error "proc matpm(xth)' [MAXEEK, line 182]

where it shows the same as above


The errors you are reporting sound exactly like the problem caused by the strange SUB character at the bottom of the file. Can you recheck the bottom of the MAXSEEK and PROCS files? It would be the very last line of the file. I also see that your last message says 'MAXEEK'. Did you type that incorrectly, or is the file you are running actually 'MAXEEK' instead of 'MAXSEEK'?




NO there is not 'SUB' at the bottom of both MAXSEEK and PROCS.

but i did not run the PROCS ... I did run only MAXSEEK

I type MAXEEK by error in the previous comment.


Dear all

You were right. I removed the "sub"

I am in the right directory, but still have G00290 and G0014 errors:

1 - G0290 : File not found '/Users/GDanon/Desktop/Hamilton89/optimum.lcg' [MAXSEEK, line 178]

2- G0014: File not found ' /Users/GDanon/hauss17/gaussplot/examples/optimum.ext' MAXSEEK, line 231]

Please help on the next step



SORRY  line 1

it is

1 - G0290: Libray not found .....



This error means that you need to install the GAUSS add-on module, 'Optmum'. Contact Aptech to get 'Optmum'.




I understand that you are good at what you do.... Thanks

It works perfect.

But I don't see any graph of the recession probability .

Is there any possibility please.






I modified and added the following to the end of Maxseek

//skis = seqa(nk,1,captst)~skis[.,1:ns];

and got a plot.  I'm presuming they are the probabilities you want plotted.



Unfortunately, i does not work. But thanks a lot for your time.



What do you mean it does not work? Do you mean that you do not get a graph, or that it is plotting data that is different than what you are looking for?




Indeed I got completely different graph compare to the one i was expecting as in the paper. If i could, i would let you see the output

Your Answer

You must login to post answers.

Have a Specific Question?

Get a real answer from a real person

Need Support?

Get help from our friendly experts.

Try GAUSS for 30 days for FREE

See what GAUSS can do for your data

© Aptech Systems, Inc. All rights reserved.

Privacy Policy