In: Statistics and Probability
Use PROC GLM in SAS to test whether the mean number of days of sick leave differs across bank branches. Use alpha= 0.05, and justify your answer by referring to either a test statistic value and table value, or by referring to a P-value.
data banks; input branch leave; cards; 1 15 1 20 1 19 1 14 2 11 2 15 2 11 3 18 3 19 3 23 ; run;
Solution:
Treat branch as a grouping variable using class statement in proc glm
use model statement
SAS Code:
data banks;
input branch leave;
cards;
1 15
1 20
1 19
1 14
2 11
2 15
2 11
3 18
3 19
3 23
;
run;
proc glm data = banks;
class branch;
model leave=branch ;
means branch;
run;
Output:
The GLM Procedure
Class Level Information | ||
---|---|---|
Class | Levels | Values |
branch | 3 | 1 2 3 |
Number of Observations Read | 10 |
---|---|
Number of Observations Used | 10 |
The GLM Procedure
Dependent Variable: leave
Source | DF | Sum of Squares | Mean Square | F Value | Pr > F |
---|---|---|---|---|---|
Model | 2 | 89.8333333 | 44.9166667 | 6.21 | 0.0282 |
Error | 7 | 50.6666667 | 7.2380952 | ||
Corrected Total | 9 | 140.5000000 |
R-Square | Coeff Var | Root MSE | leave Mean |
---|---|---|---|
0.639383 | 16.30528 | 2.690371 | 16.50000 |
Source | DF | Type I SS | Mean Square | F Value | Pr > F |
---|---|---|---|---|---|
branch | 2 | 89.83333333 | 44.91666667 | 6.21 | 0.0282 |
Source | DF | Type III SS | Mean Square | F Value | Pr > F |
---|---|---|---|---|---|
branch | 2 | 89.83333333 | 44.91666667 | 6.21 | 0.0282 |
The GLM Procedure
Level of branch |
N | leave | |
---|---|---|---|
Mean | Std Dev | ||
1 | 4 | 17.0000000 | 2.94392029 |
2 | 3 | 12.3333333 | 2.30940108 |
3 | 3 | 20.0000000 | 2.64575131 |
F test with F=6.21 and p=0.0282 confirms the suspicion,based on
the plots and descriptive statisitcs,that there are
differences
in the mean number of days of sick leave differs across bank
branches.