-
Notifications
You must be signed in to change notification settings - Fork 0
/
Chapter3-4_ANOVA.r
253 lines (224 loc) · 12 KB
/
Chapter3-4_ANOVA.r
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
f14_2f <- read.table("C:\\Kelsey\\Fall_2016\\WCW_3m\\Feb2014\\aspect_f\\Samples\\f14_2fs_points.txt", nrows=20000)
f17_2f <- read.table("C:\\Kelsey\\Fall_2016\\WCW_3m\\Feb2017\\aspect_f\\Samples\\f17_2fs_points.txt", nrows=20000)
aov.2f=aov(f14_2f$wcw_f14_3m_2fs~f17_2f$wcw_f17_3m_2fs)
sink("E:/2019/Stats/MW_b_anova.txt", append=TRUE)
cat("MW_2f_AnovaResults")
print(summary(aov.2f))
cat("=======================\n")
sink()
f14_3f <- read.table("C:\\Kelsey\\Fall_2016\\WCW_3m\\Feb2014\\aspect_f\\Samples\\f14_3fs_points.txt", nrows=20000)
f17_3f <- read.table("C:\\Kelsey\\Fall_2016\\WCW_3m\\Feb2017\\aspect_f\\Samples\\f17_3fs_points.txt", nrows=20000)
aov.3f=aov(f14_3f$wcw_f14_3m_3fs~f17_3f$wcw_f17_3m_3fs)
sink("E:/2019/Stats/MW_b_anova.txt", append=TRUE)
cat("MW_3f_AnovaResults")
print(summary(aov.3f))
cat("=======================\n")
sink()
f14_4f <- read.table("C:\\Kelsey\\Fall_2016\\WCW_3m\\Feb2014\\aspect_f\\Samples\\f14_4fs_points.txt", nrows=20000)
f17_4f <- read.table("C:\\Kelsey\\Fall_2016\\WCW_3m\\Feb2017\\aspect_f\\Samples\\f17_4fs_points.txt", nrows=20000)
aov.4f=aov(f14_4f$wcw_f14_3m_4fs~f17_4f$wcw_f17_3m_4fs)
sink("E:/2019/Stats/MW_b_anova.txt", append=TRUE)
cat("MW_4f_AnovaResults")
print(summary(aov.4f))
cat("=======================\n")
sink()
f14_5f <- read.table("C:\\Kelsey\\Fall_2016\\WCW_3m\\Feb2014\\aspect_f\\Samples\\f14_5fs_points.txt", nrows=20000)
f17_5f <- read.table("C:\\Kelsey\\Fall_2016\\WCW_3m\\Feb2017\\aspect_f\\Samples\\f17_5fs_points.txt", nrows=20000)
aov.5f=aov(f14_5f$wcw_f14_3m_5fs~f17_5f$wcw_f17_3m_5fs)
sink("E:/2019/Stats/MW_b_anova.txt", append=TRUE)
cat("MW_5f_AnovaResults")
print(summary(aov.5f))
cat("=======================\n")
sink()
f14_6f <- read.table("C:\\Kelsey\\Fall_2016\\WCW_3m\\Feb2014\\aspect_f\\Samples\\f14_6fs_points.txt", nrows=20000)
f17_6f <- read.table("C:\\Kelsey\\Fall_2016\\WCW_3m\\Feb2017\\aspect_f\\Samples\\f17_6fs_points.txt", nrows=20000)
aov.6f=aov(f14_6f$wcw_f14_3m_6fs~f17_6f$wcw_f17_3m_6fs)
sink("E:/2019/Stats/MW_b_anova.txt", append=TRUE)
cat("MW_6f_AnovaResults")
print(summary(aov.6f))
cat("=======================\n")
sink()
f14_7f <- read.table("C:\\Kelsey\\Fall_2016\\WCW_3m\\Feb2014\\aspect_f\\Samples\\f14_7fs_points.txt", nrows=20000)
f17_7f <- read.table("C:\\Kelsey\\Fall_2016\\WCW_3m\\Feb2017\\aspect_f\\Samples\\f17_7fs_points.txt", nrows=20000)
aov.7f=aov(f14_7f$wcw_f14_3m_7fs~f17_7f$wcw_f17_3m_7fs)
sink("E:/2019/Stats/MW_b_anova.txt", append=TRUE)
cat("MW_7f_AnovaResults")
print(summary(aov.7f))
cat("=======================\n")
sink()
f14_8f <- read.table("C:\\Kelsey\\Fall_2016\\WCW_3m\\Feb2014\\aspect_f\\Samples\\f14_8fs_points.txt", nrows=20000)
f17_8f <- read.table("C:\\Kelsey\\Fall_2016\\WCW_3m\\Feb2017\\aspect_f\\Samples\\f17_8fs_points.txt", nrows=20000)
aov.8f=aov(f14_8f$wcw_f14_3m_8fs~f17_8f$wcw_f17_3m_8fs)
sink("E:/2019/Stats/MW_b_anova.txt", append=TRUE)
cat("MW_8f_AnovaResults")
print(summary(aov.8f))
cat("=======================\n")
sink()
f14_9f <- read.table("C:\\Kelsey\\Fall_2016\\WCW_3m\\Feb2014\\aspect_f\\Samples\\f14_9fs_points.txt", nrows=20000)
f17_9f <- read.table("C:\\Kelsey\\Fall_2016\\WCW_3m\\Feb2017\\aspect_f\\Samples\\f17_9fs_points.txt", nrows=20000)
aov.9f=aov(f14_9f$wcw_f14_3m_9fs~f17_9f$wcw_f17_3m_9fs)
sink("E:/2019/Stats/MW_b_anova.txt", append=TRUE)
cat("MW_9f_AnovaResults")
print(summary(aov.9f))
cat("=======================\n")
sink()
f14_1b <- read.table("C:\\Kelsey\\Fall_2016\\WCW_3m\\Feb2014\\elev_b\\Samples\\f14_1bs_points.txt", nrows=10000)
f17_1b <- read.table("C:\\Kelsey\\Fall_2016\\WCW_3m\\Feb2017\\elev_b\\Samples\\f17_1bs_points.txt", nrows=10000)
aov.1b=aov(f14_1b$wcw_f14_3m_1bs~f17_1b$wcw_f17_3m_1bs)
sink("E:/2019/Stats/MW_b_anova.txt", append=TRUE)
cat("MW_1b_AnovaResults")
print(summary(aov.1b))
cat("=======================\n")
sink()
f14_2b <- read.table("C:\\Kelsey\\Fall_2016\\WCW_3m\\Feb2014\\elev_b\\Samples\\f14_2bs_points.txt", nrows=10000)
f17_2b <- read.table("C:\\Kelsey\\Fall_2016\\WCW_3m\\Feb2017\\elev_b\\Samples\\f17_2bs_points.txt", nrows=10000)
aov.2b=aov(f14_2b$wcw_f14_3m_2bs~f17_2b$wcw_f17_3m_2bs)
sink("E:/2019/Stats/MW_b_anova.txt", append=TRUE)
cat("MW_2b_AnovaResults")
print(summary(aov.2b))
cat("=======================\n")
sink()
f14_3b <- read.table("C:\\Kelsey\\Fall_2016\\WCW_3m\\Feb2014\\elev_b\\Samples\\f14_3bs_points.txt", nrows=10000)
f17_3b <- read.table("C:\\Kelsey\\Fall_2016\\WCW_3m\\Feb2017\\elev_b\\Samples\\f17_3bs_points.txt", nrows=10000)
aov.3b=aov(f14_3b$wcw_f14_3m_3bs~f17_3b$wcw_f17_3m_3bs)
sink("E:/2019/Stats/MW_b_anova.txt", append=TRUE)
cat("MW_3b_AnovaResults")
print(summary(aov.3b))
cat("=======================\n")
sink()
f14_4b <- read.table("C:\\Kelsey\\Fall_2016\\WCW_3m\\Feb2014\\elev_b\\Samples\\f14_4bs_points.txt", nrows=10000)
f17_4b <- read.table("C:\\Kelsey\\Fall_2016\\WCW_3m\\Feb2017\\elev_b\\Samples\\f17_4bs_points.txt", nrows=10000)
aov.4b=aov(f14_4b$wcw_f14_3m_4bs~f17_4b$wcw_f17_3m_4bs)
sink("E:/2019/Stats/MW_b_anova.txt", append=TRUE)
cat("MW_4b_AnovaResults")
print(summary(aov.4b))
cat("=======================\n")
sink()
f14_5b <- read.table("C:\\Kelsey\\Fall_2016\\WCW_3m\\Feb2014\\elev_b\\Samples\\f14_5bs_points.txt", nrows=10000)
f17_5b <- read.table("C:\\Kelsey\\Fall_2016\\WCW_3m\\Feb2017\\elev_b\\Samples\\f17_5bs_points.txt", nrows=10000)
aov.5b=aov(f14_5b$wcw_f14_3m_5bs~f17_5b$wcw_f17_3m_5bs)
sink("E:/2019/Stats/MW_b_anova.txt", append=TRUE)
cat("MW_5b_AnovaResults")
print(summary(aov.5b))
cat("=======================\n")
sink()
f14_6b <- read.table("C:\\Kelsey\\Fall_2016\\WCW_3m\\Feb2014\\elev_b\\Samples\\f14_6bs_points.txt", nrows=10000)
f17_6b <- read.table("C:\\Kelsey\\Fall_2016\\WCW_3m\\Feb2017\\elev_b\\Samples\\f17_6bs_points.txt", nrows=10000)
aov.6b=aov(f14_6b$wcw_f14_3m_6bs~f17_6b$wcw_f17_3m_6bs)
sink("E:/2019/Stats/MW_b_anova.txt", append=TRUE)
cat("MW_6b_AnovaResults")
print(summary(aov.6b))
cat("=======================\n")
sink()
f14_7b <- read.table("C:\\Kelsey\\Fall_2016\\WCW_3m\\Feb2014\\elev_b\\Samples\\f14_7bs_points.txt", nrows=10000)
f17_7b <- read.table("C:\\Kelsey\\Fall_2016\\WCW_3m\\Feb2017\\elev_b\\Samples\\f17_7bs_points.txt", nrows=10000)
aov.7b=aov(f14_7b$wcw_f14_3m_7bs~f17_7b$wcw_f17_3m_7bs)
sink("E:/2019/Stats/MW_b_anova.txt", append=TRUE)
cat("MW_7b_AnovaResults")
print(summary(aov.7b))
cat("=======================\n")
sink()
f14_8b <- read.table("C:\\Kelsey\\Fall_2016\\WCW_3m\\Feb2014\\elev_b\\Samples\\f14_8bs_points.txt", nrows=10000)
f17_8b <- read.table("C:\\Kelsey\\Fall_2016\\WCW_3m\\Feb2017\\elev_b\\Samples\\f17_8bs_points.txt", nrows=10000)
aov.8b=aov(f14_8b$wcw_f14_3m_8bs~f17_8b$wcw_f17_3m_8bs)
sink("E:/2019/Stats/MW_b_anova.txt", append=TRUE)
cat("MW_8b_AnovaResults")
print(summary(aov.8b))
cat("=======================\n")
sink()
f14_9b <- read.table("C:\\Kelsey\\Fall_2016\\WCW_3m\\Feb2014\\elev_b\\Samples\\f14_9bs_points.txt", nrows=10000)
f17_9b <- read.table("C:\\Kelsey\\Fall_2016\\WCW_3m\\Feb2017\\elev_b\\Samples\\f17_9bs_points.txt", nrows=10000)
aov.9b=aov(f14_9b$wcw_f14_3m_9bs~f17_9b$wcw_f17_3m_9bs)
sink("E:/2019/Stats/MW_b_anova.txt", append=TRUE)
cat("MW_9b_AnovaResults")
print(summary(aov.9b))
cat("=======================\n")
sink()
f14_10b <- read.table("C:\\Kelsey\\Fall_2016\\WCW_3m\\Feb2014\\elev_b\\Samples\\f14_10bs_points.txt", nrows=10000)
f17_10b <- read.table("C:\\Kelsey\\Fall_2016\\WCW_3m\\Feb2017\\elev_b\\Samples\\f17_10bs_points.txt", nrows=10000)
aov.10b=aov(f14_10b$wcw_f14_3m_10bs~f17_10b$wcw_f17_3m_10bs)
sink("E:/2019/Stats/MW_b_anova.txt", append=TRUE)
cat("MW_10b_AnovaResults")
print(summary(aov.10b))
cat("=======================\n")
sink()
f14_11b <- read.table("C:\\Kelsey\\Fall_2016\\WCW_3m\\Feb2014\\elev_b\\Samples\\f14_11bs_points.txt", nrows=10000)
f17_11b <- read.table("C:\\Kelsey\\Fall_2016\\WCW_3m\\Feb2017\\elev_b\\Samples\\f17_11bs_points.txt", nrows=10000)
aov.11b=aov(f14_11b$wcw_f14_3m_11bs~f17_11b$wcw_f17_3m_11bs)
sink("E:/2019/Stats/MW_b_anova.txt", append=TRUE)
cat("MW_11b_AnovaResults")
print(summary(aov.11b))
cat("=======================\n")
sink()
f14_12b <- read.table("C:\\Kelsey\\Fall_2016\\WCW_3m\\Feb2014\\elev_b\\Samples\\f14_12bs_points.txt", nrows=10000)
f17_12b <- read.table("C:\\Kelsey\\Fall_2016\\WCW_3m\\Feb2017\\elev_b\\Samples\\f17_12bs_points.txt", nrows=10000)
aov.12b=aov(f14_12b$wcw_f14_3m_12bs~f17_12b$wcw_f17_3m_12bs)
sink("E:/2019/Stats/MW_b_anova.txt", append=TRUE)
cat("MW_12b_AnovaResults")
print(summary(aov.12b))
cat("=======================\n")
sink()
f14_13b <- read.table("C:\\Kelsey\\Fall_2016\\WCW_3m\\Feb2014\\elev_b\\Samples\\f14_13bs_points.txt", nrows=10000)
f17_13b <- read.table("C:\\Kelsey\\Fall_2016\\WCW_3m\\Feb2017\\elev_b\\Samples\\f17_13bs_points.txt", nrows=10000)
aov.13b=aov(f14_13b$wcw_f14_3m_13bs~f17_13b$wcw_f17_3m_13bs)
sink("E:/2019/Stats/MW_b_anova.txt", append=TRUE)
cat("MW_13b_AnovaResults")
print(summary(aov.13b))
cat("=======================\n")
sink()
f14_14b <- read.table("C:\\Kelsey\\Fall_2016\\WCW_3m\\Feb2014\\elev_b\\Samples\\f14_14bs_points.txt", nrows=1200)
f17_14b <- read.table("C:\\Kelsey\\Fall_2016\\WCW_3m\\Feb2017\\elev_b\\Samples\\f17_14bs_points.txt", nrows=1200)
aov.14b=aov(f14_14b$wcw_f14_3m_14bs~f17_14b$wcw_f17_3m_14bs)
sink("E:/2019/Stats/MW_b_anova.txt", append=TRUE)
cat("MW_14b_AnovaResults")
print(summary(aov.14b))
cat("=======================\n")
sink()
f14_1q <- read.table("C:\\Kelsey\\Fall_2016\\WCW_3m\\Feb2014\\cover_q\\Samples\\f14_1qs_points.txt", nrows=30000)
f17_1q <- read.table("C:\\Kelsey\\Fall_2016\\WCW_3m\\Feb2017\\cover_q\\Samples\\f17_1qs_points.txt", nrows=30000)
aov.1q=aov(f14_1q$wcw_f14_3m_1qs~f17_1q$wcw_f17_3m_1qs)
sink("E:/2019/Stats/MW_q_anova.txt", append=TRUE)
cat("MW_1q_AnovaResults")
print(summary(aov.1q))
cat("=======================\n")
sink()
f14_2q <- read.table("C:\\Kelsey\\Fall_2016\\WCW_3m\\Feb2014\\cover_q\\Samples\\f14_2qs_points.txt", nrows=30000)
f17_2q <- read.table("C:\\Kelsey\\Fall_2016\\WCW_3m\\Feb2017\\cover_q\\Samples\\f17_2qs_points.txt", nrows=30000)
aov.2q=aov(f14_2q$wcw_f14_3m_2qs~f17_2q$wcw_f17_3m_2qs)
sink("E:/2019/Stats/MW_q_anova.txt", append=TRUE)
cat("MW_2q_AnovaResults")
print(summary(aov.2q))
cat("=======================\n")
sink()
f14_3q <- read.table("C:\\Kelsey\\Fall_2016\\WCW_3m\\Feb2014\\cover_q\\Samples\\f14_3qs_points.txt", nrows=30000)
f17_3q <- read.table("C:\\Kelsey\\Fall_2016\\WCW_3m\\Feb2017\\cover_q\\Samples\\f17_3qs_points.txt", nrows=30000)
aov.3q=aov(f14_3q$wcw_f14_3m_3qs~f17_3q$wcw_f17_3m_3qs)
sink("E:/2019/Stats/MW_q_anova.txt", append=TRUE)
cat("MW_3q_AnovaResults")
print(summary(aov.3q))
cat("=======================\n")
sink()
f14_1p <- read.table("C:\\Kelsey\\Fall_2016\\WCW_3m\\Feb2014\\tpi_p\\Samples\\f14_1ps_points.txt", nrows=30000)
f17_1p <- read.table("C:\\Kelsey\\Fall_2016\\WCW_3m\\Feb2017\\tpi_p\\Samples\\f17_1ps_points.txt", nrows=30000)
aov.1p=aov(f14_1p$wcw_f14_3m_1ps~f17_1p$wcw_f17_3m_1ps)
sink("E:/2019/Stats/MW_p_anova.txt", append=TRUE)
cat("MW_1p_AnovaResults")
print(summary(aov.1p))
cat("=======================\n")
sink()
f14_2p <- read.table("C:\\Kelsey\\Fall_2016\\WCW_3m\\Feb2014\\tpi_p\\Samples\\f14_2ps_points.txt", nrows=30000)
f17_2p <- read.table("C:\\Kelsey\\Fall_2016\\WCW_3m\\Feb2017\\tpi_p\\Samples\\f17_2ps_points.txt", nrows=30000)
aov.2p=aov(f14_2p$wcw_f14_3m_2ps~f17_2p$wcw_f17_3m_2ps)
sink("E:/2019/Stats/MW_p_anova.txt", append=TRUE)
cat("MW_2p_AnovaResults")
print(summary(aov.2p))
cat("=======================\n")
sink()
f14_3p <- read.table("C:\\Kelsey\\Fall_2016\\WCW_3m\\Feb2014\\tpi_p\\Samples\\f14_3ps_points.txt", nrows=30000)
f17_3p <- read.table("C:\\Kelsey\\Fall_2016\\WCW_3m\\Feb2017\\tpi_p\\Samples\\f17_3ps_points.txt", nrows=30000)
aov.3p=aov(f14_3p$wcw_f14_3m_3ps~f17_3p$wcw_f17_3m_3ps)
sink("E:/2019/Stats/MW_p_anova.txt", append=TRUE)
cat("MW_3p_AnovaResults")
print(summary(aov.3p))
cat("=======================\n")
sink()