DATA ANALYSIS FOR PROJECTS
What statistic/s should be run?
How many variables?
Categorical or continuous variables?
Number of levels for categorical?
Divided by IV and DV?
Run by computer or by hand?
Most likely analyses
Chi square: All categorical variables
Correlation: All continuous variables
ANOVA: Both categorical and continuous variables.
Chi Square Contingency Table
Use for two categorical variables
Chi Square = Sum [(O – E)2/E]
Example:
|
30 / 35.45 |
48 / 42.54 |
78 |
|
20 / 14.54 |
12 / 17.45 |
32 |
|
50 |
60 |
110 |
(30 – 35.45) / 35.45
(48 – 42.54) / 42.54
(20 – 14.54) / 14.54
(12 – 17.45) / 17.45
________________
Chi Square = 5.29
Example of Correlation with SAS
data size;
input height weight;
datalines;
72 145
64 100
68 128
66 140
62 105
;
proc corr;
var height weight;
run;
Statements in bold are required just as shown.
Statements in italics can be anything you want, but are limited to 8 characters, must begin with a letter, and can’t be the same as a SAS statement, e.g., you can’t have a variable called data or input.
Example of ANOVA with SAS
data exprment;
input treatmnt dvarible;
datalines;
1 12
1 18
1 14
1 10
2 20
2 16
2 14
2 18
;
proc anova;
classes treatmnt;
model dvarible = treatmnt;
means treatmnt;
run;
Copyright Paul E. Spector, All rights reserved. Last modified October 21, 1998.