Question

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

Solution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

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

fit <- aov(Life ~ factor(Brand), data=prob0326)
summary(fit)


# (a)

# By hand
ybars <- c()
a <- 3
n <- 5
MSE <- summary(fit)[[1]]$'Mean Sq'[2]
alpha <- 0.05
ybars <- c(fit$coefficients[1],fit$coefficients[1]+fit$coefficients[2],fit$coefficients[1]+fit$coefficients[3])

ncp <- n * sum( (ybars-mean(ybars))^2)/MSE
Fcritical <- qf( alpha, (a-1), (a-1)*(n-1), lower.tail=FALSE)
beta <- pf( Fcritical, a-1, (a-1)*(n-1), ncp)
power <- 1 -beta
power # = 0.999998


# Using power.anova.test()
power.anova.test(groups=a, n=n,
                between.var=var(ybars),
                within.var=MSE,
                sig.level=alpha,
                power=NULL)...

This is only a preview of the solution. Please use the purchase button to see the entire solution

Assisting Tutor

Related Homework Solutions

Simple Proportions and Binomials
Homework Solution
$30.00
Probability
Statistics
Mathematics
Proportions
Binomials
Factorials
Trials
Equations
Denominators
Pairwise Combinations
Optimal Strategy
R Programming
Functions
R Programming Problems
Homework Solution
$98.00
Statistics
Mathematics
R Programming
Genes
Expressions
Functions
PCA
Scaled Variables
Proportion
Variance
Correlation
Observations
Data Sets
Statistical Analysis Using R-Programming
Homework Solution
$98.00
Statistical Analysis
Gene Expression Values
K-Means Cluster
Patient Groups
Biostatistics
R-Programming
Confidence Intervals
Estimation
Functions
Marginal Independence
Euclidean Distance
R Programming Problems
Homework Solution
$33.00
Mathematics
Statistics
R Programming
Baseball Players
Strikes
Scores
Samples
Information
Estimation
Functions
Countries
Standard Errors
Salary
Applied Statistics Questions
Homework Solution
$40.00
Applied Statistics
Health
Pollution Levels
Pulmonary Function Tests
Cigarettes
Patients
AUC
Predictive Model
Estimation
Cross Validation
Mathematics
R Programming
Statistics Questions
Homework Solution
$68.00
Statistics
Mathematics
Hypothetical Experiments
Factors
Tables
Model
Regression
Slope
NAP Range
Variance
Species
Richness
Predictors
Coefficient
Determination
Probability Distribution
ANOVA
Functions
Get help from a qualified tutor
Live Chats