STAT XXXXXXXXXXHW#7 Due Date: 4/01/2021 (Thursday) Homework must be submitted to Assignment #7 on Blackboard On the top right corner, write your name, date, and HW #. All problem numbers refer to the...

1 answer below »

View more »
Answered 2 days AfterMar 31, 2021

Answer To: STAT XXXXXXXXXXHW#7 Due Date: 4/01/2021 (Thursday) Homework must be submitted to Assignment #7 on...

Sanchi answered on Apr 01 2021
156 Votes
Hypothetical Chemical Experiment
· Preparation of dataset
acid <- factor(rep(c("1", "2"), each = 4))
time <- factor(rep(c("1", "2"), times = 4))
temp <- factor(rep(c("1", "2"), times = 4))
y<- c(7.3,    9.5,    
13.8,    15.4,    16,    18.7,    11.3,    14.5,
8.8,    11.3,    15.3,    17.7,    17.9,    20.8,    12,    15.4,
11.7,    14.1,    17.2,    22.3,    22.6,    24.8,    16.9,    18.5,
6.2,    8.3,    11.2,    15.4,    16.8,    17.4,    8.2,    12.5)
results <- data.frame(y, acid, time,temp)
f = c("111", "112", "121","122","211","212","221","222") # treatment levels
k = 8 # number of treatment levels
n = 4 # number of control blocks
tm = gl(k, 1, n*k, factor(f)) # matching treatment
tm
blk = gl(n, k, k*n)
blk
results <- data.frame( blk,tm, y)
· Question 1 Plot the data and comment on your chosen plots.
library(ggplot2)
ggplot(data = results, mapping = aes(x = tm, y = y,group=1)) +
geom_line(aes(color = blk))
· Question2 Fit a block–treatment model to these data and show that the assumptions on the model are approximately satisfied.
Input-
fit.lm = lm(y ~ tm + blk, data = results)
fit.lm
Output-
Call:
lm(formula = y ~ tm + blk, data = results)
Coefficients:
(Intercept) tm112 tm121 tm122 tm211 tm212 tm221
7.131 2.300 5.875 9.200 9.825 11.925 3.600
tm222 blk2 blk3 blk4
6.725 1.588 5.200 -1.312
· Question 3 Suppose that the pre-plan was to calculate a 99% set of pairwise comparisons between the treatment combinations using Tukey’s method, to calculate 99.5% intervals for the comparisons between the levels of A, B and C if these were not involved in interactions and a set of 99% intervals using Scheffé’s method for any other contrasts that look interesting. The overall confidence level would then be at least 96.5%. List any contrasts that you would like to examine further after looking at the plots in part (a).
Input
pairwise$tm
pairwise$blk
Output
> pairwise$tm
diff ...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here
April
January
February
March
April
May
June
July
August
September
October
November
December
2025
2025
2026
2027
SunMonTueWedThuFriSat
30
31
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
1
2
3
00:00
00:30
01:00
01:30
02:00
02:30
03:00
03:30
04:00
04:30
05:00
05:30
06:00
06:30
07:00
07:30
08:00
08:30
09:00
09:30
10:00
10:30
11:00
11:30
12:00
12:30
13:00
13:30
14:00
14:30
15:00
15:30
16:00
16:30
17:00
17:30
18:00
18:30
19:00
19:30
20:00
20:30
21:00
21:30
22:00
22:30
23:00
23:30