# Rstudio codes

STAT 5670Homework #3 (Section 3.12, pgs. 130-138)
Due Friday, February 3, 2023
1. Problem 3.16 (p. 133). Use the appropriate R functions for this problem.
• Do parts (a)-(c) as stated in the textbook.
• For part (b), if your answer is “yes”, then conduct a Stage II analysis using Fisher’s
protected LSD method.
• For part (c), use “student” (i.e., internally scaled) residuals.
• For part (d), create a comparison boxplots graph analogous to the one given in Figure
3.2 (a) on page 68 of the textbook and answer the question posed in this part.
• Add a part (e) that says: use R (i.e., the user-defined CRD command) to create and
report a completely randomized design for this problem.
2. Problem 3.22 (p. 134). Use the appropriate R functions for this problem.
• Do part (a) as stated in the textbook.
• For part (b), use the protected LSD method instead of Tukey’s method. Note: you can
change the significance and confidence interval levels to 0.99 and 0.01, respectively
in the “cld” and “pairs” commands by including the options level=0.99 and
alpha=0.01 when you call these functions.
• For part (c), create a comparison boxplots graph analogous to the one given in Figure
3.2 (a) on page 68 of the textbook and answer the questions posed in this part.
• Replace part (d) with the following: construct a contrast, assuming that at the outset
of the experiment you suspected the response time of circuit type 2 to be different
from the average of the other two. Be sure to perform the corresponding test that the
contrast is equal to zero.
• You do not need to do parts (e) and (f) of this problem.
3. Problem 3.25 (p. 134). Use the appropriate R functions for this problem.
• For part (a), change the significance level (i.e., ) to 0.10.
• Do part (b) as stated in the textbook. Again, use “student” (i.e., internally scaled)
residuals.
• Replace part (c) with the following: regardless of your answer in part (a), perform a
Stage II analysis using the protected LSD method. See the note given in Problem 2
on how to change the significance levels and confidence interval levels in the
functions used to carry out the Stage II analysis.
• Add a part (d) that says: Construct a 90% confidence interval for the mean of chemist
number 1.
4. Consider the following situation. A completely randomized design (CRD) was used to assess
the effects of a treatment (say A) on the yield (say Y) of a particular process. Treatment A
had three levels (say A1, A2, and A3) and the design was unbalanced in that the samples
sizes for each treatment level were n1 = 4, n2 = 5, and n3 = 6, respectively. The data was
analyzed using R and R produced the following statistics: SST RMT = 2032:20,
MSE = 74:76, Y 1: = 94:5, Y 2: = 105:2, and Y 3: = 122:7. Use these statistics to help
answer the following questions. Your solutions need to be done “by hand” using R. That
said, you can do things like 3/4; #F-statistic and 3 qt(.975,4)*2/sqrt(25); #95% CI when showing your work using R.
a. Construct an appropriate ANOVA table for this problem. What are the corresponding
F-statistic and p-value for testing the Stage I null hypothesis of no Treatment A
effect?
b. Determine a 95% confidence interval for the difference between the mean when A =
1 and the mean when A = 2. That is, for ¹1 ¡ ¹2.
c. Determine a 95% confidence interval for the mean when A = 1. That is, for ¹1.
d. Suppose one of the observations at level 1 of Treatment A is 91. What would be the
corresponding fit (i.e., ) and (raw) residual (i.e.,
) for this observation?

Order your essay today and save 25% with the discount code: GREEN

## Order a unique copy of this paper

600 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
\$26