Introduction to SAS Sam Gordji ccsam@olemiss.edu Weir 107 List of Statistical Packages • • • • • SPSS (Windows) SAS (Windows & Unix) Mathematica (Windows) Matlab (willow, Unix) IMSL (sweetgum, Unix) General Information • IT staff will assist users – To access these packages – To find the proper procedure to analyze their data • For assistance please email – assist@mcsr.olemiss.edu – ccsam@olemiss.edu SAS/PC Statistical Package • • • • This seminar covers Introduction to SAS SAS is available in – Weir Student Lab (4 PCs) – Weir 107 – Several other labs around campus SAS is also installed on willow (Unix server) SAS performs statistical analysis Statistical Package: SAS/PC (cont.) • • • • 50 copies are available for faculty use For each copy purchased, a faculty member can get a free copy (to be installed on a student PC) The cost is $100 per copy per year To obtain a copy of SAS please email – ccsam@olemiss.edu – assist@mcsr.olemiss.edu Links for SAS • The main webpage – http://www.sas.com/ • For information on documentation for SAS visit – http://support.sas.com/onlinedoc/913/docMainpage.jsp • SAS Resources: http://www.mcsr.olemiss.edu/mathematica/fall_sem/SASRe sources.ppt SAS’ three main files – *.sas (a file created by the user, an input file) – *.log (a file created by SAS containing the “log” when the user’s program is finished running) – *.lst (listing file containing the output) • Examples of the three SAS files – my.sas – My.log – My.lst Activating and Running SAS on Windows Click on the “SAS” icon to activate SAS Create your program (below) in a window named “EditorUntiled1” Blue Text is your program data test; /* The name of the program */ input a b c; /* Variables are a, b, and c */ cards; /* Input will follow “card” */ 123 2 3 -1 ; /* end of data */ proc print; proc means; run; /* run procedures print & means */ Running SAS on Windows Click “run” and then “submit” the above example Running SAS on Windows (Cont.) Results will appear in the “output” window Running SAS on Windows (Cont.) Above shows the log file An Example of Linear Regression reg748re.sas • Below is an example of regression analysis • Data is entered into “Editor” The output from Linear Regression Below shows the output of the Regression Analysis Some SAS Proc • Proc (Procedure) – proc means (obtains mean, standard deviation) – proc anova (performs simple AOV) – proc plot (plots) – proc lp (performs Linear Programming) – proc reg ( performs regression) – proc corr (performs correlation) Questions • Email contact – Email your questions to assist@olemiss.edu • To look at this presentation and other materials visit, click Computing Camp at www.mcsr.olemiss.edu • Please fill out the feedback form and leave your email address so we may contact you for follow up questions For Further Practice On willow • Execute the four examples in your path and look at *.log and *.lst files On PC • From http://www.mcsr.olemiss.edu/educationsubpage.php?pagen ame=augcamp08.inc download and run the following examples – reg748re.sas – regcampB3.sas – regschaum.sas