I want to use maxlik to estimate a tobit model with friction I wrote
library maxlik; #include maxlik.ext; maxset;
'library maxlik;' works.
But when I run maxset i got "undefined symbol!
Any hint would be highly appreciated!
The maxset function is inside the maxlik library. When you execute the statement:
GAUSS will read the file maxlik.lcg from your GAUSSHOME/lib directory. (NOTE: GAUSSHOME by default will be C:\gauss16 on Windows, /Users/YourUserName on Mac, or wherever you installed GAUSS on Linux).
The maxlik.lcg file will tell GAUSS which GAUSS procedures that the Maxlik library has and also where to find them. For example, part of your maxlik.lcg file might look like this:
maxlik.src maxlik : proc : 535 maxset : proc : 596 maxclr : proc : 651 maxprt : proc : 725 maxclprt : proc : 868 maxtlimits : proc : 987
This tells GAUSS that there is a file named maxlik.src which contains the procedures listed below it (maxlik, maxset, maxclr, maxprt, etc). Since there is not path in front of the file name, maxlik.src, GAUSS will assume that maxlik.src is located in the GAUSS SRC path. The GAUSS SRC path, by default, will contain GAUSSHOME/src and GAUSSHOME/examples. The maxlik.src file should be in GAUSSHOME/src. You should check to see that:
- There is a file named maxlik.src in GAUSSHOME/src.
- That it contains the maxset procedure, which will start out like this:
proc(0) = maxset;
If both of those appear correct, then it is possible that your maxlik.lcg file contains a path in front of the name maxlik.src, like this:
C:/Path/That/Does/Not/Exist/maxlik.src maxlik : proc : 535 maxset : proc : 596 maxclr : proc : 651 maxprt : proc : 725 maxclprt : proc : 868 maxtlimits : proc : 987
If that is the case, then GAUSS is looking for maxlik.src in C:/Path/That/Does/Not/Exist. For this reason GAUSS cannot find the file. If this is the problem, you should replace the incorrect path from the maxlik.lcg file, with the correct path for your computer.