ST 524NCSU - Fall 2008

RCBD and Power

Types of Error in Hypothesis testing

To compare two treatment means, we carry out a test of against .

We make a Type I error if is true but we conclude.

We make a Type II error if we fail to reject when in fact .

Power = P(Type I Error) = probability of a Type II error,

Power = probability that the test will reject , given that is false.

True Situation
Decision Taken / /
Do Not Reject Ho / Correct Decision / Type II Error
Reject Ho / Type I Error / Correct Decision

Power

For testing against , power depends on:

a) True value of ,

b) , measure of variability.

c) r, number of repetitions per treatment, and on

d) , significance level of test.

  • Power increases as increases.

Sample size

Sample Size Determination

For a Randomized Complete Block Design

is the effect ofith treatment

difference between means for treatmentsiandi’.

Number of repetitions per treatment is equal to the number of blocks in a balanced design.

Number of replicates required depends on

  • Hypothesis is being tested
  • Whether test is one- or two-tailed (what are the possible alternative hypotheses?)
  • Significance level, , to be used, P(Type I Error).
  • Size of the difference to be detected.
  • What assurance is desired to detect the difference ()?
  • An estimate of the variability of the data. .

Sample size required to detect a mean difference at least equal to is given by

  • Express the desired difference to detect, , as a multiple of the true standard deviation
  • Correction when residual variance is used instead of true variance

Example 1

Table 9.2 ST&D (p. 207)

Oil Content of Redwing Flaxseed inoculated at different stages of growth with S. linicola,Winnipeg, 1947 (in percentage)

Analysis of Variance
Source of Variation / df / SS / MS / F
Blocks / r-1 = 3 / 3.14 / 1.05 / 4.83
Treatments / t – 1 = 5 / 31.65 / 6.33
Error / (r-1)(t-1) = 15 / 19.72 / 1.31
Total / n – 1= 23 / 54.51

Calculate the number of repetitions per treatment to detect a difference effect between treatments of at least 2.5% oil, regardless of direction, at a significance level of 0.05 with a 90% assurance of detecting a true difference of 2.5%

,

We need r = 5 blocks to attain desired power in detecting a difference effect of 2.5%

Example 2. Calculate sample size for detecting difference D between clones 2 and 5, MSE = 11793

D / 55 / 75 / 95 / 115 / 135 / 165 / 185 / 205 / 225 / 255
n / 82 / 45 / 28 / 19 / 14 / 10 / 8 / 6 / 5 / 4

n=2*(11793)*(1.96+1.28)^2/(c(55,75,95,115,135,165,185,205,225,255)^2)

n

[1] 81.850047 44.017137 27.434503 18.721845 13.585536 9.094450 7.234372

[8] 5.891645 4.890793 3.807711

Randomized Block Design

treat / block_1 / block_2 / block_3 / block_4
Early_Bloom / 33.3 / 31.9 / 34.9 / 37.1
Full_Bloom / 34.4 / 34.0 / 34.5 / 33.1
Full_Bloom_P / 36.8 / 36.6 / 37.0 / 36.4
Ripening / 36.3 / 34.9 / 35.9 / 37.1
Seedling / 34.4 / 35.9 / 36.0 / 34.1
Uninoculated / 36.4 / 37.3 / 37.7 / 36.7

Field Layout

block / plot_1 / plot_2 / plot_3 / plot_4 / plot_5 / plot_6
1 / 6 / 2 / 3 / 5 / 4 / 1
2 / 5 / 4 / 3 / 2 / 1 / 6
3 / 3 / 1 / 6 / 5 / 4 / 2
4 / 4 / 2 / 5 / 6 / 1 / 3

Linear Model

Treatments and Block as fixed effect factors

Model Information

Data Set WORK.REDWING

Dependent Variable y

Covariance Structure Diagonal

Estimation Method REML

Residual Variance Method Profile

Fixed Effects SE Method Model-Based

Degrees of Freedom Method Residual

Class Level Information

Class Levels Values

block 4 1 2 3 4

treat 6 Early_Bloom Full_Bloom

Full_Bloom_P Ripening Seedling

uninoculated

Dimensions

Covariance Parameters 1

Columns in X 11

Columns in Z 0

Subjects 1

Max Obs Per Subject 24

Number of Observations

Number of Observations Read 24

Number of Observations Used 24

Number of Observations Not Used 0

Block and Treat are fixed-effect factors

Expected Mean Squares

ANALYSIS of VARIANCE TABLE

Type 3 Analysis of Variance

Sum of Error

Source DF Squares Mean Square Expected Mean Square Error Term DF F Value Pr > F

block 3 3.141250 1.047083 Var(Residual) + Q(block) MS(Residual) 15 0.80 0.5147

treat 5 31.652083 6.330417 Var(Residual) + Q(treat) MS(Residual) 15 4.82 0.0080

Residual 15 19.716250 1.314417 Var(Residual) . . . .

,

Var(Residual) is

Test of Hypothesis

  1. Block
  2. Treatments

Treatments as fixed-effect factor and Block as random-effect factor

,

Model Information

Data Set WORK.REDWING

Dependent Variable y

Covariance Structure Variance Components

Subject Effect block

Estimation Method REML

Residual Variance Method Profile

Fixed Effects SE Method Model-Based

Degrees of Freedom Method Satterthwaite

Class Level Information

Class Levels Values

block 4 1 2 3 4

treat 6 Early_Bloom Full_Bloom

Full_Bloom_P Ripening Seedling

uninoculated

Dimensions

Covariance Parameters 2

Columns in X 7

Columns in Z Per Subject 1

Subjects 4

Max Obs Per Subject 6

Number of Observations

Number of Observations Read 24

Number of Observations Used 24

Number of Observations Not Used 0

Block is random-effect factor and Treat is fixed-effect factor

Type 3 Analysis of Variance

Sum of Error

Source DF Squares Mean Square Expected Mean Square Error Term DF F Value Pr > F

treat 5 31.652083 6.330417 Var(Residual) + Q(treat) MS(Residual) 15 4.82 0.0080

block 3 3.141250 1.047083 Var(Residual) + 6 Var(block) MS(Residual) 15 0.80 0.5147

Residual 15 19.716250 1.314417 Var(Residual) . . . .

Var(block) is

Var(Residual) is

Method of Moments to estimate

Since estimated value for is negative we can assume that variance for block effects is 0.

Need to correct the number of degrees of freedom in Type 3 test of hypothesis for fixed effects

RCBD Block random effects and Treat fixed effects

Satterthwaite correction for degrees of freedom

Covariance Parameter

Estimates

Cov Parm Estimate

block 0

Residual 1.2699

Fit Statistics

-2 Res Log Likelihood 63.7

AIC (smaller is better) 65.7

AICC (smaller is better) 65.9

BIC (smaller is better) 65.1

Type 3 Tests of Fixed Effects

Num Den

Effect DF DF F Value Pr > F

treat 5 18 4.99 0.0049

Test of Hypothesis

  1. Block
  2. Treatments

Power Study

Assume a RCBD, Fixed Effects, with t treatments and r blocks. Assume that the true treatment means are , and that the error variance is .

The power of the test to test depends on the noncentrality parameter , where and . As the noncentrality parameter increases, power increases.

To compute power for a given number of reps ® and a given alternative H1, that specifies values for we may use SAS:

  1. State and values for under H1 and compute .
  2. State significance level and critical value for testing null hypothesis ,
  3. From ANOVA table for RCBD, the test statistic is , with (t-1) and (t-1)(r-1) degrees of freedom.
  4. Critical value of F distribution is =
  5. Calculate power as

Example, based in results for example 9.2 (STD)

Error MS = 1.3144

Treatment means: 34.3, 34, 36.7, 36.05, 35.1, 37.025 and Overall mean = 35.5292, = 0.05, Fcrit = F(5,15,0.05) = 2.9013

Obs grndmn dfnum mse t r trt mu diff_mn2 term

1 35.5292 5 1.31 6 4 A 34.300 1.51085 4.61328

2 35.5292 5 1.31 6 4 B 34.000 2.33835 7.14000

3 35.5292 5 1.31 6 4 C 36.700 1.37085 4.18580

4 35.5292 5 1.31 6 4 D 36.050 0.27127 0.82830

5 35.5292 5 1.31 6 4 E 35.100 0.18418 0.56239

6 35.5292 5 1.31 6 4 F 37.025 2.23752 6.83211

Noncentrality parameter == 24.0810

Power = 1- P(F2.9013| 24.0810,5,15) = 0.90594

Power vs sample size - example STD-9.2

How does power change as number of blocks (repetitions) varies?

Power vs lambda (noncentrality parameter) - example STD-9.2

How does power change asnoncentrality parameter varies?

Tuesday September 4, 20081