Coverage: Power and sample size in CRD, Randomized complete block design (Chapter 4.1), Power and sample size in RCBD

1. Recall the one-way ANOVA for Textbook problem 3.26

> prob0326 <- read.table("http://www.stat.uiowa.edu/~ernli/DOEdata/bookproblem0326.txt", header = TRUE)

> summary(aov(Life ~ factor(Brand), data = prob0326))

Df Sum Sq Mean Sq F value Pr(>F)

factor(Brand) 2 1196.1 598.1 38.34 6.14e-06 *** Residuals 12 187.2 15.6

Do the following power calculation and sample size determination:

(a) For the ANOVA F test at α = .05 you did in the last homework, calculate the power of this test to detect the differences in means observed in the data. Do the power calculation both “by hand” in R and using R function power.anova.test().

Hint: a = 3 treatments, n = 5. You can use tapply(), or use fitted model to find µ1 = 95.2, µ2 = 79.4, µ3 = 100.4, and MSE = 15.6. You can view these results as close guess of µi’s and σ2. See “Chapter 3 handout on power and sample size.”

(b) Treating the experiment in this problem as a pilot study, suppose in the future theinvestigator would like to detect the above differences in means using the one-way ANOVA F test at α = .01 with power of 80%. Find the sample size necessary. You can use power.anova.test().

2. Textbook problem 4.4 and do the following

(a) Analyze the data from this experiment. That is, conduct the overall two-way ANOVA Ftest at α = .05 and draw conclusions.

(b) Check model adequacy:

1) use residual plots to check assumptions of normality and homogeneous variance.

2) conduct the nonadditivity test to check the additivity assumption.

3) Plot the interaction plot. Is it consistent with the nonadditivity test?

(c) Suppose the experimental design is mistaken to be a CRD (blocks are ignored), conductthe “incorrect” ANOVA analysis without the block factor. Comment on the results.

(d) For the RCBD (the correct fixed effects model), conduct simultaneous pairwise comparisons using Tukey HSD. State your conclusions.

(e) Calculate the relative efficiency of this RCBD vs. CRD. Interpret your result.

Does the blocking work well?

(f) Assuming the block factor as random,

1) estimate its variance σβ2 by hand;

2) fit a linear mixed model – do you obtain the same σcβ2?

3) conduct pairwise comparisons using Tukey HSD, and compare to the HSD results from the fixed effects model in (d).

(g) Viewing this RCBD experiment as a pilot study with a = 3 and σ² = MSE = 8.64. Suppose if any two treatment means differ by as much as 6, the experimenter wishes to reject H0 of no treatment effect in a two-way ANOVA F-test at α = .05 with power of at least 90%. How many days (blocks) are needed?

Hint: Here D = 6; see “Chapter 4.1 handout on power and sample size”.

(h) Suppose in the data set, the observation for Solution 3 on Day 1 is missing (e.g., y31, the 9th observation in the dataset, is replaced by ‘NA’), conduct the overall two-way ANOVA F test at α = .05 for this unbalanced data set and draw conclusions.

For example, you can change that observation using

> prob0404Copy <- prob0404

> prob0404Copy["9", "Growth"] <- NA

> prob0404Copy

3. Textbook problem 4.7 and do the following

(a) In part (a), analyze the data from this experiment. That is, conduct the overall two-way ANOVA F test at α = .05 and draw conclusions.

(c) In part (c), provide residual plots to check model assumptions.

(d) Test the additivity assumption.

(e) Plot the interaction plot. Is it consistent with the nonadditivity test?

(f) Calculate the relative efficiency of this RCBD vs. CRD. Interpret your result.

Does the blocking work well?

(g) Assuming the block factor as random,

1) estimate its variance σβ2 by hand;

2) fit a linear mixed model – do you obtain the same σcβ2?

3) conduct pairwise comparisons using Fisher LSD, and compare to the LSD results from the fixed effects model in (b).

(h) Suppose in the data set, the observation for Tip 4 on Coupon 4 is missing (e.g., y44, the 16th observation in the dataset, is replaced by ‘NA’), conduct the overall two-way ANOVA F test at α = .05 for this unbalanced data set and draw conclusions.

You can change that observation using

> prob0407Copy <- prob0407

> prob0407Copy["16", "Hardness"] <- NA

**Subject Mathematics Statistics-R Programming**