Escolar Documentos
Profissional Documentos
Cultura Documentos
SAS Training
Basic
Agenda
Introduction to SAS Software Program
Data preparation & Tabulation
Test of Difference: T-test, and ANOVA
Test of Association: Correlation & Regression Analysis
SAS
From traditional statistical analysis of variance
and predictive modeling to exact methods and
statistical visualization techniques, SAS/STAT
software is designed for both specialized and
enterprise wide analytical needs. SAS/STAT
software provides a complete, comprehensive set
of tools that can meet the data analysis needs of
the entire organization.
SAS Components
SAS
SAS Enterprise
Enterprise
Guide
Guide
SAS
SAS 9.2
9.2
Graphical
Graphical user
user interface
interface application
application
for
for some
some common
common basic
basic data
data analysis
analysis
tasks.
tasks.
Command-based
Command-based application
application for
for aa
wide
wide variety
variety of
of data
data analysis
analysis tasks.
tasks.
SAS 9.2
10
11
12
13
14
15
Gender
M
M
F
M
Age
48
58
.
28
Weight
128.6
158.3
115.5
170.1
16
Gender
M
M
F
M
Age
48
58
.
28
Weight
128.6
158.3
115.5
170.1
17
18
19
20
21
22
23
24
25
26
27
28
Data Input
There are two main simple tasks for data input;
Manually Input Data
Import from an External File
29
30
31
32
33
34
35
36
37
38
39
40
41
Name
Jones
Laverne
Jaffe
Wilson
Gender
M
M
F
M
Age
48
58
.
28
Weight
128.6
158.3
115.5
170.1
42
Input Data
43
44
Import Data
File >> Import Data
45
46
47
48
49
50
51
52
53
54
55
Create Format
Tasks >> Data >> Create Format
56
57
Define Formats
Click New Label and type a name of a label
Click New Range and select type of values and
type a value according to the specified label
Repeat the steps
Click Run
58
59
60
61
62
SAS Tasks
After you have data in your project, you can
create reports and run analyses on the data.
To do this, you select a SAS task from the Task
List or from the Tasks menu. Some tasks have
wizards to guide you through the decisions that
you need to make. Wizards are available from
menus or from a link next to the related task in
the Task List.
63
64
65
One-Way Frequencies
Under Data, select Q1-Q19, Gender, Nation,
Year, and Major for Analysis variables.
66
One-Way Frequencies
Under Plots, check Vertical for Bar chart.
67
One-Way Frequencies
Check Frequency Tables and/or Bar charts for any
errors (e.g., typo). Make necessary correction(s).
68
69
70
71
72
73
74
Summary Tables
The Summary Tables wizard or task can be used to
generate a tabular summary report.
75
76
77
78
One-Sample t-Test
Tasks >> ANOVA >> t Test
79
80
81
82
T-Test Output
Since p-value
p-value is
is less
less than
than
Since
0.05, itit can
can be
be concluded
concluded that
that
0.05,
average
female
students
average female students
consider themselves
themselves as
as aa
consider
well-prepared
students
for
well-prepared students for
advising appointment
appointment
advising
(significantly
higher than
than 3).
3).
(significantly higher
Since p-value
p-value is
is less
less than
than
Since
0.05, itit can
can be
be concluded
concluded that
that
0.05,
average
male
students
also
average male students also
consider
themselves as
as aa
consider themselves
well-prepared students
students for
for
well-prepared
advising
appointment
advising appointment
83
Two-Sample t-Test
Tasks >> ANOVA >> t Test
84
85
86
87
T-Test Output
Equaled variance
variance is
is assumed.
assumed.
Equaled
Pooled
method
is
used.
Since
Pooled method is used. Since
p-value is
is greater
greater than
than 0.05,
0.05,
p-value
it
cannot
be
concluded
that
it cannot be concluded that
there is
is significant
significant difference
difference
there
in
Advisor
Satisfaction
in Advisor Satisfaction
between male
male and
and female
female
between
students.
students.
the probability
probability is
is greater
greater than
than
the
0.05. So
So there
there is
is evidence
evidence
0.05.
that
the
variances
for the
the two
two
that the variances for
groups, female
female students
students and
and
groups,
male students,
students, are
are not
not
male
different.
different.
88
One-Way ANOVA
Tasks >> ANOVA >> One-Way ANOVA
89
90
91
92
93
Since p-value
p-value is
is greater
greater than
than 0.05,
0.05,
Since
can be
be concluded
concluded that
that there
there is
is no
no
itit can
significant difference
difference in
in average
average
significant
Advisor Satisfaction
Satisfaction among
among
Advisor
year(s) of
of study.
study. Therefore,
Therefore, there
there is
is
year(s)
no need
need to
to check
check the
the Post
Post Hoc
Hoc tests.
tests.
no
94
95
96
97
98
99
With Data selected at the left, assign Q1, Q2, Q3, Q4,
and Q5 to the task role of Analysis variables and Q6
to the role of Correlate with.
100
Correlation Types
101
102
Correlation Analysis
Since p-values are less than 0.05, there are
significant (positive) relationships between Q6
(Overall satisfaction on Advisor) and Q1, Q2,
Q3, Q4, Q5.
103
Linear Regression
Tasks >> Regression >> Linear Regression
104
105
Regression: Model
Model Selection Method: Full model fitted (by
default)
106
Regression: Statistics
Under Details on estimates, check Standardized
regression coefficients
Perform some Diagnostics
107
Regression Diagnostics
Unusual and Influential data (Outliers/Leverage)
Tests on Normality of Residuals
Tests on Nonconstant Error of Variance
(Heteroscedasticity)
Tests on Correlations among Predictors
(Multicollinearity)
Tests on Nonlinearity
Tests on Dependence of Residuals
(Autocorrelation)
Model Specification
108
109
110
111
112
113
Regression Analysis
These are
are the
the FF Value
Value and
and
These
p-value, respectively,
respectively,
p-value,
testing the
the null
null hypothesis
hypothesis
testing
that the
the Model
Model does
does not
not
that
explain the
the variance
variance of
of
explain
the response
response variable.
variable.
the
R-Square defines
defines the
the
R-Square
proportion of
of the
the total
total
proportion
variance explained
explained by
by
variance
the Model.
Model.
the
114
Regression Analysis
These are
are the
the tt Value
Value and
and
These
p-value, respectively,
respectively,
p-value,
testing the
the null
null hypothesis
hypothesis
testing
that the
the coefficients
coefficients are
are
that
significantly equal
equal to
to 0.
0.
significantly
115
Regression: Diagnostics
Might suggest
suggest violation
violation
Might
of normality
normality of
of residuals
residuals
of
assumption
assumption
116
Regression: Diagnostics
Might suggest
suggest violation
violation
Might
of normality
normality of
of residuals
residuals
of
assumption
assumption
117
Regression: Diagnostics
118
Q&A