Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: Mata versus Matlab


From   "Rajesh Tharyan" <R.Tharyan@exeter.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: Mata versus Matlab
Date   Tue, 8 Jul 2008 14:56:58 +0100

Hi All,

Thanks Manti, Nick and others who responded to the query. I am not sure I
will need to apply many of the things mentioned in Mantis mail just yet!. 
But it is very helpful, and coming from someone who has experience of both,
it is valuable. Here is another response I got in private.

....
" I don't use either, but I asked someone here a while back why he selected
Matlab. Here's his reply. I'd be curious to see what other opinions you
uncover. There are three reasons that I chose to use Matlab over MATA. The
first and biggest is that though I've used MATA in the past, I was far from
an expert in the language while the person I am working with is a matlab
expert. The second reason is that I could not find any information on Mata's
ability to perform computations on sparse matrices (I read that it could not
do this, but they may have updated it since that was posted). Due to the
massive amount of computations I would be performing, I needed this
capability to cut down on running time. This makes a huge difference: in
matlab it cuts a 4 minute run time to 13 seconds (and this was for a small
to medium sized computation, the big ones would take hours or days).
Finally, I think matlab is far more user friendly; though I've been using
stata exclusively for the past five years and consider myself to have a very
solid background in it, I still find it's documentation confusing and
frustrating. Additionally, matlab has an incredible editor which
automatically points out errors in your code and makes suggestions of more
efficient ways to do things."
...

Thanks again
Rajesh



-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Nick Cox
Sent: 07 July 2008 18:31
To: statalist@hsphsun2.harvard.edu
Subject: RE: st: Mata versus Matlab

This seems a very fair summary from what I know. I'd add that Stata and
MATLAB have a major similarity as proprietary software but with many
user-written extras available freely and publicly. 

I'd be interested to know more details of how "it is sometimes easier to
trick MATLAB than Stata into producing unsupported graph types". That
would be a challenge either for Stata graphics programmers to show how
such types can be supported or as agenda items for StataCorp. I
specifically exclude 3-D graphics where -- to my great regret -- it is
clear that MATLAB is currently superior to Stata. 

Nick
n.j.cox@durham.ac.uk 

Michael Manti

Rajesh,

I've used both Stata and MATLAB reasonably extensively. Stata is my  
main tool for statistical work. I've used MATLAB to do statistical  
work, but I've used it mostly for financial simulations. I much prefer  
Stata over MATLAB for statistical work.

For my purposes, the biggest disadvantage of MATLAB over Stata/Mata is  
cost. If you want to use MATLAB as your main tool for statistical  
work, you need to pay up for the Statistics and Optimization (and  
perhaps other) toolkits. All MATLAB toolkits are sold separately,  
whereas Stata bundles many procedures, and many more are downloadable.  
Even then, my guess is that you're much more likely to find a given  
statistical procedure implemented in Stata (or R) than you are in  
MATLAB.

Stata is much better than MATLAB for managing data, logging research,  
and producing tables. For statistical graphics, I generally prefer  
Stata's defaults over MATLAB's--tick marks that poke into the plot  
area, ugh!--but it is sometimes easier to trick MATLAB than Stata into  
producing unsupported graph types.

I suspect that more numerical routines are available in MATLAB than in  
Mata. MATLAB the language also supports some nice programming  
abstractions--higher-order functions, lexical scoping, arrays of  
higher dimension than 2, etc.--that Mata lacks. Mata's pointers only  
partially make up for these omissions. However, I really appreciate  
Mata's optional type declarations, which have saved me from boneheaded  
errors on occasion.

Rajesh Tharyan 

> Does anyone have any extensive experience of using both of these? If  
> so what
> are the advantages of Mata over Matlab or vice versa? Or is there a  
> good
> reference on comparison of capabilities?

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index