1 / 26

Introduction to Linear Regression with SAS

Introduction to Linear Regression with SAS. Sam Gordji ccsam@olemiss.edu Weir 107 . List of Statistical Packages. SPSS SAS Mathematica Matlab IMSL. General Information. IT staff will assist users To access these packages To find the proper procedure to analyze their data

noleta
Download Presentation

Introduction to Linear Regression with SAS

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction to Linear Regression with SAS Sam Gordji ccsam@olemiss.edu Weir 107

  2. List of Statistical Packages • SPSS • SAS • Mathematica • Matlab • IMSL

  3. 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

  4. SAS/PC Statistical Package • This seminar covers SAS & SAS/Regression • SAS is available in • Weir Student Lab (5 PCs) • Weir 107 • Several other labs around campus • SAS is also installed on willow (Unix server) • SAS performs statistical analysis

  5. 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

  6. 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/SASResources.ppt

  7. Examples of Regression Analysis • Looking at several examples • Creating a simple SAS program and obtaining • *.log • *.lst (listing) • Examples of simple regression with SAS • reg748re.sas • regcampB3.sas • reg.sas • regschaum.sas

  8. Activating and Running SAS on Windows Click on the “SAS” icon to activate SAS Enter the just the blue text in the Editor window data test; /* The name of the program */ input a b c; /* Variables are a, b, and c */ cards; /* Input will follow “card” */ 1 2 3 2 3 -1 ; /* end of data */ proc print; proc means; run; /* run procedures print & means */

  9. Running SAS on Windows Click “run” and then “submit” the above example

  10. Running SAS on Windows (Cont.) Results will appear in the “output” window

  11. Running SAS on Windows (Cont.) Above shows the log file

  12. Accessing SAS on willow • Willow is Unix server housed in the data center building • Willow’s operating system is Sun Solaris (Solaris 10) • Willow is the primarily used by researchers that have large number crunching programs • Limited knowledge of Unix system is needed to run SAS

  13. A Few Useful Unix Commands • cat --- for displaying a file • cd --- change directory • cd 1--- to move to sub-directory 1 & so on • cp --- for copying files • ls --- see what files you have • pwd --- find out what directory you are in • rm --- remove a file • pico --- a Unix editor • sas --- to activate and run SAS programs • To attend a Unix seminar, please contact assist@mcsr.olemiss.edu

  14. SAS on willow may be accessed from the network. Steps to access willow from a Windows PC: Request a willow account from the IT Helpdesk. Download/Install SSH Secure Shell Client from http://www.mcsr.olemiss.edu/appssubpage.php?pagename=ssh2.inc Click “Secure Shell Client” Accessing SAS on Willow

  15. Accessing SAS on Willow (Cont.) Click “Quick Connect”

  16. Accessing SAS on Willow (Cont.) • For this workshop, everyone can login as student • Fill in “Host Name” and “User Name” as above • Click “Connect”

  17. Accessing SAS on Willow (Cont.) • Enter your password • Click “OK”

  18. Accessing SAS on Willow (Cont.)

  19. Running SAS on Willow • Willow is ready to execute SAS jobs • cd to the numbered directory assigned to you, e.g. cd 5 • pwd to print working directory • ls to list files in working directory • To view a program, enter: cat file-name.sas • To launch a SAS program, enter: sas file-name.sas • To view the output of a program, enter cat file-name.lst • Note that lst stands for listing

  20. A Short SAS Program: test99.sas • To view your input, enter cat test99.sas • To run your SAS job enter sas test99.sas

  21. Running SAS jobs • To view your output, enter cat test99.lst

  22. A Linear Regression Window/SASreg748re.sas • Below is an example of regression analysis • Data is entered into “Editor”

  23. The output from Linear Regression Below shows the output of the Regression Analysis

  24. 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)

  25. 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

  26. 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?pagename=augcamp08.inc download and run the following examples • reg748re.sas • regcampB3.sas • regschaum.sas

More Related