Wednesday, April 04, 2007

Econometrics: A few reasons to use Ox over Gauss

...though I am definitely going to try Gauss as well and learn it better than I know it at the moment (and I certainly think one should try many programming languages; each of them could have particular comparative advantages in specific routines etc.). Below I place some excerpts from some very interesting discussions on an ox discussion list that I consult quite frequently. I will leave the names of the authors out since everybody can trace the fragments on the list linked above (more precisely, we are talking about the archive for April, so here) and keep only what I consider the essential excerpts (I will also place links to the full messages at the end of the respective fragments ). They pretty much contain what I would have to say over the subject as well (obviously I am not so experienced as most of the researchers who answer here; as a personal note, I particularly like the references over the power of the BFGS log-likelihood maximization routine- that came clear, inter alia, in part of the research for a paper I co-authored, and of course the easy extension using C/C++, programming language which I learned far before I ever got to learn/do econometrics- ok, so I might be somewhat biased when preferring an object-oriented, modular, econometrics software :-)).


So, we start here, with the question:

"Dear Ox Users, I am a PhD student who tries to choose between Gauss and Ox. I have tried to ask some people which one to choose, I have read some documents to guide myself in chossing between the two, but still could not make myself clear on which one to choose. [...]" Link.

And some answers I particularly liked were:

"I think that trying to find "the best econometric software" is the wrong way to think about statistical/econometric programming nowadays. 15/20 years ago, people used to learn only one or two econometric software ,but I think that the things are very different now. Even if Gauss highly used in finance, both Gauss and Ox are great software, but sometimes Gauss is better and sometimes Ox is better. I simply depends on what you do. [...] If you are new to econometrics programming, I would say that Ox is easier to learn than Gauss, it is very powerfull (especially if you do arfima, markov models and panels) and it's free for universities." Link.

"[...]I think Ox has an excellent syntax based on C (with its extensions the most used programming language, there must be a reason). I think it is easy to read and to learn. Ox, if you want it, is also object oriented, and it is very easy to make reusable code or packages to share with others. There is not so much documentation on Ox as for Gauss for two reasons: 1) Gauss is still more widespread, 2) the official documentation of Ox is Excellent and public (on the web). Graphs in Ox just look better and are very easy to integrate into LaTeX documents. Ox is fast, but also Gauss is pretty quick. Ox may be extended in C. It is easy to make simple GUIs with Ox." Link.

"[...] 1) Gauss got there first, and is American. Hence it has a huge user base, and lots of code written for it. Alas, it is a poorly designed language. It's too unstructured, and it's easy to write incomprehensible spaghetti code. 2) Ox got there second, and is British. It has, inevitably, a more modest user base. It is, however, a beautifully designed language, combining all the power of matrix programming with the logical structure of C. (It is actually a lot simpler to write than C.) If you follow the recommended coding conventions (naming, indenting) then it is easy to write elegant, compact and self-documenting programs. It's got object-orientation and classes if you are into that, but you don't need to be. So - no contest frankly. If you want to learn a new language for your research, you will not regret starting with Ox. Try Gauss later when you are ready for the worst." Link.

"[...]I used Gauss for econometric programming in the past, and I have to say I did not like it. I oftentimes ended up with"incomprehensible spaghetti code". For starters, the language is not case sensitive, which bothers me. Ox is great. Its syntax is similar to C, it's fast, it has an excellent numerical library, and so on. Just try to do some Monte Carlo where you numerically maximize a log-likelihood function using BFGS in Gauss and Ox, and you will notice the difference. Additionally, please note that you can run Gauss code using Ox. Finally, Ox is free (for academic research and teaching), which is a huge plus in places like Brazil, where we don't have access to university wide site licenses. " Link.


PS. It should be said that, to be completely fair, one should also listen to the viewpoints of the people on a Gauss-users list :-). If anybody has such references, I'd be happy to link them here.

2 comments:

Economics Specialist said...

I’ve just read your last posts and I am wondering about the weight of econometrics. Sometimes I imagine that it will eventually be found a “Lucas’ Critique” to every matter discussed with econometrics, so that the contribution of this discipline will be recognized as almost irrelevant

Sebi Buhai said...

I am not sure this comment entitles you to the title "Economics Specialist" :-). But go on, studying is the key...