Matlab versus R

User avatar
tristanreid
Posts: 0
Joined: Thu Jan 01, 2004 12:00 am

Matlab versus R

Post by tristanreid »

Interesting, is that across the board that it seems slower? 



Ultimately I think it's more interesting to compare the productivity/power in the languages.  From afar, my impression is that Matlab has a much easier learning curve, but R has stronger functional expression.  Is that your experience?



thanks,



-t.
If you can make computers as smart as humans you will have invented a machine that can sing the words to the Flintstones tune but will forget to pay the phone bill.
Luiz Paulo
Posts: 0
Joined: Thu Jan 01, 2004 12:00 am

Matlab versus R

Post by Luiz Paulo »

I haven't done heavy lifting on R, but I don't think it is that much tougher to learn than Matlab. yes, Matlab is really intuitive, but I think R is too, albeit a bit less.



And i concur with the slowing of matlab post-v7.



it also seems to me that it demands a lot more ram as well...
User avatar
jslade
Posts: 0
Joined: Thu Jan 01, 2004 12:00 am

Matlab versus R

Post by jslade »

tristanreid:



[i]"Interesting, is that across the board that it seems slower? "[/i]



Yes. And, almost exactly a factor of 2 slower, across the board, which sort of hints to me that there is some low hanging fruit they could optimize away, but haven't. If you use their "compiler" it is even slower.



[i]"Ultimately I think it's more interesting to compare the productivity/power in the languages. From afar, my impression is that Matlab has a much easier learning curve, but R has stronger functional expression. Is that your experience?"[/i]



I can't remember a time when I couldn't code in Matlab. It has been a part of my life for too long. Re: expressivity; OO in Matlab is, IMO a joke. You can do a few neat lambda function type tricks in Matlab though, if you're bent funny like that. In fact, Matlab-OO is a sort of clunky lambda + closure internally. Cute to see. Bad to use.



R has fantastic expressivity and power if you want to uncork some heavy code guru juju; it's a sort of OO Lisp. Check out the native "D" function; so cool!



Chances are very good though, that you will prefer R to Matlab for other reasons. I mostly like it because it makes superior plots. Data types and many model types come equipped with plot methods; something Matlab should have done in ... oh, 1990 or so. As I said, it also has all kinds of bleeding edge toys. Check out fBasics, fExtremes or tseries packages for basic finance stuff. gam or randomForest for machine learning.
"Alles hat ein ende, nun die wurst hat zwei."
User avatar
jungle
Posts: 0
Joined: Thu Jan 01, 2004 12:00 am

Matlab versus R

Post by jungle »

the more i use R, the more i appreciate MATLAB.
it's axiomatic, deal with it.
User avatar
braverock
Posts: 0
Joined: Thu Jan 01, 2004 12:00 am

Matlab versus R

Post by braverock »

[i]

"Why learn? There is lots you can do in R that doesn't exist in Matlab, and probably will never exist. Most machine learning stuff seems to happen in R. Lots of the published research in quant stuff has R code associated with it (examples: the wavelets and high frequency finance books by Gencay and Oleson & associates, Bouchaud's stuff, etc)."
[/i]



I certainly know about wavelet code in R, and several other advanced econometric techniques, but I don't think I saw the examples from Gencay and Olson in R. Could you be more specific on this one? I've had a really hard time finding high frequency analytical models in R, either in books or the academic literature.



Regards,



- Brian
User avatar
tristanreid
Posts: 0
Joined: Thu Jan 01, 2004 12:00 am

Matlab versus R

Post by tristanreid »

Probably this?



-t.
If you can make computers as smart as humans you will have invented a machine that can sing the words to the Flintstones tune but will forget to pay the phone bill.
User avatar
tristanreid
Posts: 0
Joined: Thu Jan 01, 2004 12:00 am

Matlab versus R

Post by tristanreid »

Maybe not, though. There TOC isn't on Amazon, and there's no mention of R.  I looked at the authors' websites, most of their offerings are in Matlab, I saw no mention of R (although I just spent <5 minutes, maybe it's there somewhere)



-t.
If you can make computers as smart as humans you will have invented a machine that can sing the words to the Flintstones tune but will forget to pay the phone bill.
User avatar
urnash
Posts: 0
Joined: Thu Jan 01, 2004 12:00 am

Matlab versus R

Post by urnash »

Hi jslade: I agree so far with braverock, I haven't seen any R related functions concerning Gencay's or Bouchaud's books. I would be much obliged if you could post some links here. TIA.



P.S. In [url=/Show%20Post.aspx?PostIDKey=86689]this thread[/url] both Tradenator and I have lamented the relatively high learning curve for Rmetrics. Could you please share any helpful links you might have?
mattcushman: happiness levels are a I(0) process, not I(1).
User avatar
jslade
Posts: 0
Joined: Thu Jan 01, 2004 12:00 am

Matlab versus R

Post by jslade »

Gencay's wavelet package is waveslim; you can download it using the R package manager. It reproduces all the graphs in the book (and more, of course); incredibly useful in learning the material.



http://www.image.ucar.edu/~whitcher/book/software.html



I don't remember where Bouchaud talks about using R to make the graphs in his book (or maybe it was in one of his papers), but it is pretty obvious that he does. Certainly the stuff on extreme value statistics is all in there. it would, of course, be better if he released some source for it.
"Alles hat ein ende, nun die wurst hat zwei."
User avatar
jslade
Posts: 0
Joined: Thu Jan 01, 2004 12:00 am

Matlab versus R

Post by jslade »

[i]"In this thread both Tradenator and I have lamented the relatively high learning curve for Rmetrics."[/i]



FWIIW, I also found Rmetrics time series type sufficiently annoying, I haven't ended up using it much. I prefer tseries itself, pasted together with a few other things. Rmetrics does have a lot of stuff in it though.
"Alles hat ein ende, nun die wurst hat zwei."
Post Reply