Intro to R for SAS and SPSS User Webinar

Embed Size (px)


R is free software for data analysis and graphics that is similar to SAS and SPSS. Two million people are part of the R Open Source Community. Its use is growing very rapidly and Revolution Analytics distributes a commercial version of R that adds capabilities that are not available in the Open Source version. This 60-minute webinar is for people who are familiar with SAS or SPSS who want to know how R can strengthen their analytics strategy.

Text of Intro to R for SAS and SPSS User Webinar

  • 1. What is R? Rs Advantages Rs Disadvantages Installing and Maintaining R Ways of Running RBob Muenchen, Author R for SAS and SPSS Users, An Example Program Co-Author R for Stata Users Where to Learn More, http://r4stats.comCopyright 2010, 2011, Robert A Muenchen. All rights reserved. 2 The most powerful statistical computing languageon the planet. -Norman Nie, Developer of SPSS Language + package + environment forgraphics and data analysis Free and open source Created by Ross Ihaka & Robert Gentleman 1996& extended by many more An implementation of the S language byJohn Chambers and others R has 4,950 add-ons, or nearly 100,000 procs3 4

2. 5Source: Data input & management (data step)* SAS Approach;2. Analytics & graphics procedures (proc step)DATA A; SET A;3. Macro language logX = log(X);4. Matrix languagePROC REG;5. Output management systems (ODS/OMS)MODEL Y = logX;R integrates these all seamlessly.# R Approachlm( Y ~ log(X) )7 8 3. Vast selection of analytics & graphics New methods are available sooner Many packages can run R (SAS, SPSS, Excel) Its object orientation does the right thing Its language is powerful & fully integrated Procedures you write are on an equal footing It is the universal language of data analysis It runs on any computer Being open source, you can study and modify it It is free9 10* Using SAS; Language is somewhat harder to learnPROC TTEST DATA=classroom; Help files are sparse & complexCLASS gender; Must find R and its add-ons yourselfVAR score; Graphical user interfaces not as polished Most R functions hold data in main memory# In R Rule-of-thumb: 10 million values per gigabytet.test(score ~ gender, data=classroom) SAS/SPSS: billions of records Several efforts underway to break Rs memory limitt.test(posttest, pretest , paired=TRUE, data=classroom)including Revolution Analytics distribution1112 4. Base R plus Recommended Packages like: Email support is free, quick, 24-hours: Base SAS, SAS/STAT, SAS/GRAPH, SAS/IML Studio SPSS Stat. Base, SPSS Stat. Advanced, Regression Tested via extensive validation programs But add-on packages written by Crossvalidated Professor who invented the method?/questions/tagged/r A student interpreting the method? Phone support available commercially13141. Go to, Comprehensive R Archive Network the Comprehensive R Archive Network Crantastic.com2. Download binaries for Base & run Inside-R.org3. Add-ons: install.packages(myPackage)4. To update: update.packages()1516 5. 17 1819 20 6. Run code interactively Submit code from Excel, SAS, SPSS, Point-n-click using Graphical User Interfaces (GUIs) Batch mode21 2223 24 7. Copyright 2010, 2011, Robert A Muenchen. All rights reserved.26 25run ExportDataSetToR("mydata"); GET FILE=mydata.sav.BEGIN PROGRAM R.submit/r;mydata