Overview of Statistical Software SPSS, Stata, SAS, R
Total Page:16
File Type:pdf, Size:1020Kb
Overview of Statistical Software SPSS, Stata, SAS, R Debby Kermer Data Services George Mason University Software v 25 v 15 spss.com stata.com v 9.4 3.5.1 sas.com r-project.org 2 Pros and Cons SPSS Stata SAS R Use High Low High Growing Jobs Some Academic Many More Cost Expensive Depends Expensive Free Learning Easy Middle Hard Very Hard Extensible Scripts Users Built-in Users 3 What can it do well? SPSS Stata ANOVA, Factor Analysis, Regression, diagnostics, and Discriminant Analysis robust regression; Analysis of License modules separately Survey Data, Time Series, SEM Trends, Missing Data, Tables Freely downloadable packages SAS R Data Management; Complex Anything, if you can find a models; Mixed Model Analysis, [well written] package License components separately Download additional packages SAS/GIS, SAS/STAT, SAS/ACCESS from CRAN for free 4 Who Uses it? SPSS Stata Academic: Social Scientists Academic: Economics, Public (the “SS”), and non-scientists Policy, Biomedical Researchers Non-Academic: Companies Non-Academic: Groups that that just want to do neat things often work with academics SAS R Academic: Statistics, Medicine Academic: Statistics, various Non-Academic: Government, Non-Academic: Small and corporations who are companies with big plans, and serious about data others serious about data 5 Which to Pick? SPSS Stata Easy to start, limited capability Easy syntax, highly extensible Best for those with infrequent Best for academics doing and/or minimal needs cutting-edge research SAS R Hard to learn, highly capable Hard to learn, highly extensible Best for managing huge and/or Best for those who program complex datasets and know what they are doing 6 Job Prospects R vs SAS vs Python Survey of selected “quantitative professionals”, 2016 http://www.burtchworks.com/2016/07/13/sas-r-python-survey-2016-tool-analytics-pros-prefer/ 9 Use in Academia # of Scholarly Articles on Google Scholar 2015 http://r4stats.com/articles/popularity/ 12 Use in Industry # of Analytics Jobs on Indeed.com February 2014 http://r4stats.com/articles/popularity/ 13 Companies using it http://blog.datacamp.com/statistical-language-wars-the-infograph/ 14 Use Interface SPSS Stata SAS R 16 GUI SPSS Stata SAS Studio Deducer & R Cmdr 17 Syntax Contingency Table for variable q1 and q2; with only n, row %, and χ2 test SPSS Stata CROSSTABS tabulate q1 q2, obs row chi2 /TABLES= q1 BY q2 /STATISTICS=CHISQ /CELLS=COUNT ROW. SAS R PROC FREQ data=test; mytable <- table(q1, q2) table q1*q2 mytable / NOCOL NOPERCENT CHISQ; prop.table(mytable, 1) RUN; chisq.test(mytable) 19 Learning Curve http://guides.nyu.edu/quant/statsoft#s-lib-ctab-6295863-7 20 Important Differences Working with multiple files SPSS Multiple datasets allowed, active data can be specified Stata One dataset at a time, allows multiple instances SAS Data always specified, no datasets in memory R Data always specified, multiple objects in memory 22 Directories & Data Files SPSS cd "directory" filename.sav Stata cd "directory" filename SAS libname name "directory" name.filename R setwd("directory") use / or \\ filename.RData 23 Labeled/Categorical Variables SPSS separate LABEL VALUES assigns labels to levels Stata shared label define creates a 'label' SAS shared PROC step creates label 'formats' R separate defining a 'factor' creates labels for levels 24 Missing Values > # < # SPSS . no value or user defined FALSE FALSE Stata . highest possible value TRUE FALSE SAS . lowest possible value FALSE TRUE R NA no value, comparable TRUE TRUE 25 Code Characteristics Code Code Command Case Code File Prompt End Sensitive Comment SPSS Syntax File [nothing] . No * Stata Do file . [line break] Yes * SAS Program [line #] ; No * R R Script > or + [interpreted] Yes # 26 Data Files Files Data Syntax Output Others SPSS .sav .sps .spo / .spv .por Stata .dta .do .smcl / .log .dct SAS .sas7bdat .sas .lst / .log .sas7??? R .RData / .rda .R / .txt .txt .R?? 28 Opening other File Types in… Can open Stata and SAS directly Use usespss, R, or Stat/Transfer (commercial) Can import SPSS and Stata directly Use packages foreign or haven to convert 29 Resources Help transitioning, links to help for each software http://dataservices.gmu.edu/resources/software Single Statistical Software Initiative https://wikis.uit.tufts.edu/confluence/display/SSSI/Home 31.