Statistics package for the home in retirement: SAS? R? or...?

I’m retiring within months. But I’ve been using SAS statistical analysis software for 34 years and would like to be able to continue doing the things it’s helped me do for my various personal scientific interests in retirement. Should I use SAS, or learn the R language, or use something else? I use a Mac.

A great example of what I’d like to be able to do is using the NLIN Procedure in SAS. This is an iterative arbitrary form regression tool (not just a linear regression polynomial fitting tool). If you state an expression and provide starting values for the parameters within it, it searches for a minumum fit error by iteratively adjusting all the parameters. I’ve used this for fun to write my own surveying code to relax distance, azimuth, and altitude angle from a total station, as well as GPS coordinates, onto a model map of a site. I’ve done a lot of work professionally with this. One example was modeling a Raman spectrum as the sum of multiple Lorentz distributions in Raman shift. Another was modeling blob dimensions in scanning electron microscope and atomic force microscope images. Another was modeling temperature changes in complex systems as nested exponential decays.

One particularly big project was studying fluid structure interaction, like a flapping flag problem. I did my own threadline analysis to model a flexible sheet shape in response to pressure profiles, and alternated this with CFD analysis which I did by writing text files to feed gemetrical parameters to a mesher, spawning a session in Windows to run the mesher (it was Gambit), spawning another session in Windows to run the CFD code on the mesh (it was Fluent) and drop a text file of pressure profiles, and repeating iteratively while evaluating convergence. So, there was modeling analysis, but also some minor system programming to programmatically run sessions of two other programs and pass data back and forth.

SAS is text based and includes canned “procedures” or statistical and graphing programs, an interpretive language, and a macro preprocessing system much like C++ adds to C. I like text programming just fine, and mostly avoid point-and-click software when possible.

So, what seemed like the path of least resistance was “SAS OnDemand for Academics: Studio”. This sounded like it was ordinary SAS, but without the expensive licensing (I think my current license runs a few thousand dollars a year), which SAS Institute made available because they were losing so much market share to R, a free package. But the information about “SAS OnDemand for Academics: Studio” seemed oddly worded regarding whether it was the real SAS language, or some weird trick thing. I tried downloading but got stuck clicking on the button for them to email me some confirmation link, which email never arrives (in Junk or otherwise). Should I persevere on the basis that it is real SAS?

On the other hand, some statisticians kind of blow off SAS, saying everybody just uses R of course. I could learn R, it sounds like a fun retirement project. However when I start down the R for macOS road, it looks messy – downloading binaries and compiling them, so installing compilers first, maybe the GNU Fortran compiler, being able to use X11 so maybe installing XQuartz, needing the Tcl/Tk libraries and Texinfo, on and on, each of these supported by joining various forums. And I really don’t like all this kind of messing around as it seems like there’s always stuff that goes wrong. I’d like to learn R and be able to use it. I spent my years learning UNIX already (SVR4, BSD, SunOS, X Windows system) and don’t want to go back.

Or perhaps I should learn some other programming environment and write my own solvers. I did this once in C# with a finite difference solver, creating a Windows .exe that estimated slab heating for a system with periods of heating on both surfaces. But these days writing any program for Windows or MacOS or IOS takes such an accumulation of skills before you actually compute anything, I think it’s not even worth trying – my best analytical thinking and learning days are behind me. I can barely make a printer work.

So, any thoughts on where I should place my bets???

Thank you!

Have you tried Anaconda? It’s open-source software. I use it for the Spyder Python environment, but it has Rstudio as well. The Anaconda makes installation and updates easy.

Wiki page:

Official page:

Yes! If you are familiar with SAS, you should persevere and once you have access you can check whether all you think you’ll need is included. And I say that as someone who’s used onDemand to do the first couple of free courses and hate SAS with the fury of a thousand suns.

It’s free, so all you stand to lose is a few hours to get it up and running. It shouldn’t require much downloading since the whole idea of OnDemand is to run it through your browser. All the action happen on their servers. But confirmation emails can sometimes be finicky. Try a different email address, or a different browser, and definitely check your spam folder.

Does onDemand let you use the SAS language, and the procs? Or at least the stat procs?

I mean for example:

data ForNaita;
input x y;
cards;
1 2
3 4
;
run;
proc glm data=ForNaita;
model y=x;
run;

I type this hoping nothing gets turned into an emoticon…

Those things are only necessary if you want to compile packages yourself. The default Mac install “Contains R 4.2.2 framework, R.app GUI 1.79 in 64-bit for Intel Macs, Tcl/Tk 8.6.6 X11 libraries and Texinfo 6.7l” (or for ARM Macs, pick the right one), so it already has pre-compiled versions of everything you need. R packages on CRAN for Mac are also pre-compiled, so you won’t need all of that stuff to start playing and installing common extras.

Every student and faculty person I work with has R on their Mac, and I don’t think I’ve ever been asked for help getting it installed.

Many people like the R.app GUI on Mac, but I prefer the free desktop version of Rstudio as an IDE for writing R code.

I made the transition from SAS to R many years ago, and the languages are very different. I always thought of SAS as sort of a big loop that iterates over my data, and then with some procs to do special things. I mean, I know it’s way more complex than that… R is more like a traditional object oriented programing language, except one designed by novices that throws computer scientist types into fits.

As a non-CS type, I don’t really understand why they don’t like it. On the other hand, students can become productive with R pretty quickly.

Much of that is due to the hundreds of packages that have been written for it. You can almost think of those as procs written by the community to enhance the base software.

You can put code into text blocks here by surrounding it in backticks (under the ~, near the 1) ` for inline code (cards; for example) or with a triple backtick to start and end a code block

data ForNaita;
input x y;
cards;
1 2
3 4
;
run;

It is also the </> Preformatted text option, possibly under the gear menu in the text box.

In my opinion, the only way to learn R (or any new tool) is to pick a project that you will use it for, and the play with it. Go through a tutorial or two to get started, but then work through solving your problem.

For me, it took a while because I’d need to do something, and know I could get it done in SAS in a few minutes, instead of spending hours figuring out how to do it in R. Much of what I do is data manipulation, rather than analysis, and once I’d built up my R skills a bit, it was apparent that R is far better at that than SAS.

On the other hand, SAS documentation is much better than R’s, but your going to find far more online support for R than SAS.

Hey, wow, thanks for the encouragement. I just clicked around for a couple minutes and it’s installed now! I just tried demo(graphics) and got pretty pictures.

I look forward to figuring out what this is about. I do have R.app, it’s what I launched, but might prefer Rstudio. Why do you prefer it?

Yes, you can use the SAS language.

And since I also use R. I prefer RStudio because it’s a complete development environment where you can edit files, interact with a terminal, see output, see your current objects, view the content of these objects, see the files in your wd, access help, see plots, manage packages etc.

And unlike SAS it’s an actual programming language, although a statistician’s cobbled together* version of what a programming language should be. In my opinion SAS looks like someone kept adding to a command line tool and then wrapped that in a separate tool and it’s a paradigm my programming experience doesn’t apply as easily to.

*For instance base R includes three separate OOP systems and packages offer several additional ones.

Really for the same reasons @naita gave. Plus I’m on Linux, so no R.app for me.

When I used SAS I would write in EMACS, and then run in batch mode. After I moved to R I did the same thing. It worked fine, particularly when the R code was destined to run in batch mode on a timeshare system.

Using RStudio seemed kind of like a crutch. I could see the data, like some kind of SPSS user! Turns out much of the way people seem to use R is to write little snippets of code in the console, tweak things, and then move stuff into the script when it works. Or, run an analysis in the script, and then use commands at the console to examine the output.

In R, do a regression on some data, and the results go into an object. Then give that object to a plotter and see some pictures, then feed that object to a pretty printer and it will write out some tables of results. Get real fancy with the object, feed it to just the right pretty printer, and it can dump out a table preformated to drop into a paper. It is a very different feel than paging through .lst and .log files.