Introduction to Correlation & Regression with SAS Sam Gordji Weir 107

advertisement
Introduction to Correlation
& Regression with 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
Correlation and Regression with 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
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
Correlation and Regression
• Regression is used for prediction and
Estimation
• Examples of simple linear Regression will
be given here
• Correlation obtains the relationship
between two variables
• Example of both parametric and nonparametric Correlation will be given here
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
Below is an example of Correlation
analysis
Output of the Correlation 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
•
Download the following four SAS
examples to your PC
– reg748re.sas
– regcampB3.sas
– regschaum.sas
• From
http://www.mcsr.olemiss.edu/educationsubpa
ge.php?pagename=augcamp08.inc
Download