Thursday, May 9, 2013

Why Mathematica for economics?

Readers would have noticed that some of my previous posts containing interactive graphs that require Mathematica CDF Player to view. Which might leave you wondering why I choose to use Mathematica as my computational tool for ‘doing economics’.

So I thought I might outline here why I do. 


And the answer is, mostly, because it was easy to learn

1. The documentation in Mathematica is very comprehensive and delivered in a notebook format (Mathematica’s ‘front end’ interface), so you can modify the examples and test what your modification does to the output. 

Many useful functions are built in, and even better, functions are typically named by their real mathematical name. 

For me, I need a tool that can handle analysis of graphs and networks, can do symbolic manipulation, produce charts, handle diverse file types, analyse textual data (for matching names and other strings in large data sets). I have scraped data from websites using Mathematica, analysed social networks, and more.

Now, Mathematica is surely not the only tool for these jobs. Many like the open source R, others like Matlab, and for basic regressions Stata is a common tool. I don’t want to start a debate about which tool is better for which job - ultimately it is a user choice about investing their time to learn one or the other, and about the ongoing usability. 

2. I like the integration of different functionality. There are real and electronic books written completely in Mathematica. It has built-in slide show options to have live and interactive calculations and charts in presentations. Easy interactive tools and web deployment (but viewers do need the free CDF player). 

3. One thing that Mathematica users seem to emphasise is functional programming. Rather than writing loops to build up calculations, you simply write the function and it can automatically map across lists and various other data structures. Once you get used to this, you won’t want to write out loops again. This also means it is easy to get quite complex calculations coded up quickly. 

4. A very helpful user group, especially at StackExchange

Lastly the RBA produces their charts and does a lot of analysis with Mathematica (although using custom packages). Some useful Mathematica tips from the RBA’s Luci Ellis are here, and here is a useful blog on how the dynamic graphing capabilities make good teaching tools. 

1 comment:

  1. This comment has been removed by a blog administrator.

    ReplyDelete