-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAonovaAncova.sas
136 lines (94 loc) · 2.22 KB
/
AonovaAncova.sas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
/* proc glm data=mydata.daily; */
/* class season; */
/* model casual=season; */
/* means season/hovtest welch; */
/* run; */
/* */
/* fa sp sm wn */
/* */
/* e n s w */
/* hypothesis s = e w n */
/* estimate 'South vs others' Region -1 -1 3 -1; */
/* hypothesis w = e n */
/* estimate 'West vs east & north' Region -1 -1 0 2; */
proc glm data=mydata.daily plots=diagnostics;
class season;
model casual=season / solution;
means season/hovtest welch tukey;
/*hypothesis s = e w n*/
estimate 'Summer vs others' season -1 -1 3 -1;
estimate 'Winter vs fall & spring' season -1 -1 0 2;
lsmeans season/pdiff adjust=tukey;
run;
proc glm data=mydata.daily;
class season workingday;
model casual = season | workingday /solution;
lsmeans season | workingday/ pdiff adjust=tukey;
run;
proc npar1way data=mydata.daily wilcoxon dscf;
var casual;
class season;
run;
/* summer winter*/
data summerWinter;
set mydata.daily;
if season='spring' then delete;
if season='fall' then delete;
run;
proc npar1way data=summerWinter wilcoxon dscf;
var casual;
class season;
run;
/* summer spring*/
data summerSpring;
set mydata.daily;
if season='winter' then delete;
if season='fall' then delete;
run;
proc npar1way data=summerSpring wilcoxon dscf;
var casual;
class season;
run;
/* summer autumn*/
data summerAutumn;
set mydata.daily;
if season='spring' then delete;
if season='winter' then delete;
run;
proc npar1way data=summerAutumn wilcoxon dscf;
var casual;
class season;
run;
/*2nd*/
data daily1;
set mydata.daily;
where not(season='summer');
run;
proc corr data=daily1 plots=scatter;
var count atemp;
run;
proc glm data=daily1;
class season;
model atemp=season;
run;
proc glm data=daily1;
class season;
model count=season atemp/ solution ss3;
lsmeans season/ adjust=tukey;
run;
proc glm data=daily1;
class season;
model count=season|atemp/ solution ss3;
lsmeans season/ adjust=tukey;
run;
/* 3rd */
proc glm data=mydata.daily;
class season;
model count=season atemp/ solution ss3;
lsmeans season/ adjust=tukey;
run;
proc glm data=mydata.daily;
class season;
model count=season|atemp/ solution ss3;
lsmeans season/ adjust=tukey;
run;