Thursday, October 15, 2009

Data Manipulation vs. Model Equations

In some Policy Evaluation models the ratio between lines of code (loc) doing data manipulation vs. loc implementing model equations can be surprisingly large. For these models it helps that GAMS has excellent facilities for doing data manipulations (the most important is probably the DISPLAY statement). Here is some numerical evidence:

image

These are all GAMS models. The Impact2000 model has actually no SOLVE statement, i.e. it is only data manipulation.

5 comments:

  1. Hi Erwin,

    how do you use the DISPLAY statement for data manipulation?

    Thank you.

    ReplyDelete
  2. How does that do data manipulation? That just outputs the value of a to the listing file.

    ReplyDelete
  3. If I do some more complex data manipulation the ability to inspect multi-dimensional symbols is for me very important. In 9 of the 10 cases the display shows them in an easily understood tabular format (sometimes it is needed to rearrange things, either in GAMS or using the OPTION statement). IMHO the display statement is one of the most important tools that allows me to efficiently produce GAMS code that works as intended.

    ReplyDelete
  4. Thanks, I was thinking there was actually a way of modifying data using the display statement (maybe using $ command as for sleep).

    I agree with you in the usefulness of being able to easily inspect the value of symbols.

    ReplyDelete