# What programming language for statistical inference?

just for curiosity... What language is used most here? R? MATLAB? Python? Java?

What for prototype or for production? For example I think MATLAB is mostly used for prototyping, python for both prot. and production...

-
pretty much solved here: stackoverflow.com/questions/2200460/… –  radek Nov 20 '10 at 16:06
Made wiki since this is entirely subjective. –  Shane Nov 20 '10 at 19:17

I couldnt agree more with a vote for R. R is the "Lingua Franca" of the statistics world. It is the definition of cutting edge, while most packages for MATLAB and SAS take several months. The language is very simple to understand as opposed to SAS. It also gives you the power to connect with C/C++/Python and databases.

Consider Revolution Analytics version of R for a bit more performance.

http://www.revolutionanalytics.com/products/revolution-r.php

-
I must say I have to disagree about R being simpler to learn than SAS. It may be because I learned SAS and SPSS first, but I think SAS, SPSS(PASW now), and Stata are all easier languages to pick up than R. It is a subjective argument though. –  Andy W Nov 22 '10 at 0:01
I feel like R gives the user so much more in terms of functionality. It goes above and beyond what SAS/SPSS can do. –  pslice Nov 22 '10 at 0:23
I don't disagree with that, but that doesn't make it easier to understand. I think it is pretty transparent what objects I am working with in SAS, SPSS, or Stata and the format/nature of those objects, but it isn't as transparent in R. Although R may be more cutting edge, I rarely have a need for cutting edge statistical techniques in my day to day work. –  Andy W Nov 22 '10 at 1:21

It should be clear by looking at the most popular tags that R is the most popular language on this site. Whether that makes it the most popular language for statistical analysis can't be inferred directly, but one might suppose as much.

-

Lots of small scale production stuff can be done in R. If you're doing something really big (think US census), you probably need to go learn SAS--and get your employer to pay for it.

-

"Popularity" depends on the community and the definition of "statistics". World-wide, taking a broad view of "statistical inference" as including any methods of drawing conclusions or taking actions based on quantitative data, there is little question that Excel beats all other applications, including R, SAS, Stata, SPSS, and S-Plus. (The links point to different kinds of statistics, but they are highly suggestive, to say the least.) Python and MATLAB aren't even blips in the statistics. I am not saying that this is a good thing or that we should like it: that's just how it is and that's how it's going to stay for a very long time.

We shouldn't draw any inferences from what may appear to be popular "here" in this forum. Commercial software vendors support their own forums, so naturally a place like SE will favor people using less actively supported software, especially free, open-source, and academic solutions.

-

R and SAS have each there pros and cons. I think more statisticians need to embrace the fact that lots of great statistical software is available, rather than endlessly bicker about which is superior.

R is free. SAS is very expensive. R gives you the ability to do just about anything. SAS may or may not. R and has amazing graphical abilities. Seeing SAS graphics makes it feel like 1985 all over again. SAS has great customer support. R support = hours of searching mailing list archives. Also with a name like "R", search engine results are often poor. R is extremely slow and does not deal well with large data sets. SAS does fine with large data sets. SAS tends to be more robust. In my experience, when it comes to mixed effects modeling or anything involving design of experiments (such as analyzing crossover designs), SAS is superior.

For large scale, brute force simulations, I use Fortran. I used to use C, but have found Fortran is much easier to use. I've never used MATLAB. If I need statistical power of R but the speed of Fortran, I will write the time-intensive operations (i.e. loops) in Fortran and call the subroutine from R.

-
Well, R support are places like here, which are often more effective that a paid support. For Googling, there is rseek.org, works very nice. 99% of R-is-slow cases can be solved with some thinking; there are also packages to deal with huge data (it is not straightforward in SAS neither). R is a programming language, SAS is an extended SQL. –  mbq Nov 22 '10 at 9:30
+1 because this answer is useful, but I think your points about R's support, speed, and ability to handle large data are out of date or becoming so fairly quickly. –  Matt Parker Nov 22 '10 at 16:00
I'll second @Matt and @mbq's comment about R performance, but I'd like to add that R is pretty good actually for (N)LMEs. I can remember a talk from Doug Bates at the DSC 2009 conference where he showed how the lme4 package easily handles a lot of random effects (as encountered e.g., in educational assessment). My own (but limited) experience (SAS NLMIXED vs. R lme4) confirms that point: R is by no way slower than SAS when it comes to apply complex IRT models, and it handles large data genetic sets as well (thanks to clever C implementation). –  chl Nov 22 '10 at 22:25