Content

Thoughts on Modelling and Statistics using Gams, Emacs and Stata or R

File: June 2010

2010-06-22 :: admin // Emacs + Stata
Emacs and Stata

Although I am not a great fan of multi-tasking I often use a lot of programs simultaneously for one task: For example, when I am writing a report in Word or with Emacs, I take notes in Emacs, search the internet and have my model results in the gdx-viewer.  Additionally my mail client is somewhere in the [...]

 » Read the rest

Now this might be obvious if you have a lot of time, but usually the rule is forgotten if you are stressed and want to finish what you are working on. Not writing comments will probably cost you a lot of time, if you take your model a year from now and see your code: [...]

 » Read the rest

The first golden rule for modeling is: Always display the results of your calculations and check them with your expectations about the results. Often you are working on a model doing a lot of preparing calculations (calibrating the model, preparing the data). Those calculations might be easy, for example calculating the shares for some parameter, [...]

 » Read the rest

2010-06-15 :: admin // Blogging
Blog hacked and back again

Unfortunately, my blog was hacked (that happens sometimes if you do not update WordPress to the newest, secure version…). I have reinstalled my blog and will post my past blogs to it in the next few days. Sorry if you get the old posts again in your RSS feader… I haven’t written for a long [...]

 » Read the rest

The Gams mailing list can be very helpful. There are a lot of people who are willing to use their free time to answer your questions. My advice: subscribe to the mailing list at http://www.listserv.dfn.de/cgi-bin/wa?SUBED1=gams-l&A=1 ( and even if you don’t post to it, you can learn a lot of the questions and answers by [...]

 » Read the rest

First run your model by hitting C-c C-s (C stands for Ctrl) or use the same command from the menu. Emacs will open a new window and you see how Gams solves your model. When Gams is finished you can hit F10 (or C-c C-v)  to show the listing file in a new buffer. We [...]

 » Read the rest

2010-06-15 :: admin // Emacs
Emacs Goodies

Suppose you have the following information in a text file: A;410 B;243 C;134 A;410 B;324 C;134 A;410 B;324 C;134 …   and you would like to have this text in the following format          A        410,        B        243,   Emacs makes this a [...]

 » Read the rest

2010-06-15 :: admin // Emacs + GAMS + Gams-Mode
Syntax Coloring in Gams-Mode

Let us start simple and get a model from the Gams-library. If you started emacs you are not in gams-mode (you can check this by looking at the menu bar: there is no gams-entry). If you load a gams model (with the extension “gms”), Emacs automatically turns on gams-mode and the gams entry appears in [...]

 » Read the rest

2010-06-15 :: admin // Blogging
Using a Newsreader

You can now automatically download the posts from this side using your newsreader (for example Outlook 2007/2010). Click on the “site feed” on the right and follow the instructions.

 » Read the rest

2010-06-15 :: admin // Emacs + GAMS + Gams-Mode
Installing Gams-Mode for Emacs

First of all download gams-mode from Shiro Takeda’s website: You will find it here: gams-mode-download. The files are zipped and should be unzipped to a directory Emacs will find. I show you my settings (as usual, you can do it in an other way). I have all my additional features in a directory that resides [...]

 » Read the rest