The Linear effects model for a randomized block design (RCBD ) is:
\[ y_{ij}: \mu + \tau_i + \beta_{j} + \varepsilon{ij} = 0 \]
Null Hypothesis: There is not difference in the mean due the effect four chemicals’ effect:
\[ H_0: \mu_1 = \mu_2 =\mu_3 =\mu_4 = \mu \]
Alternative Hypothesis: There is at least one mean which is significantly different.
\[H_a : \text{at least one} \ \mu_i \neq \mu \]
library(GAD)
bolt<-c(73,68,74,71,
73,67,75,72,
75,68,78,73,
73,71,75,75)
chemicals <- c(rep(1,4), rep(2,4), rep(3,4), rep(4,4))
blocks <- c(rep(seq(1,4),4))
#blocks is random
chemicals <- as.fixed(chemicals)
blocks <- as.random(blocks)
blocked_random_model <- lm(bolt ~ chemicals+blocks)
gad(blocked_random_model)
## $anova
## Analysis of Variance Table
##
## Response: bolt
## Df Sum Sq Mean Sq F value Pr(>F)
## chemicals 3 14.187 4.729 2.7349 0.1057217
## blocks 3 104.188 34.729 20.0843 0.0002515 ***
## Residuals 9 15.563 1.729
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Treatment effect gets p values of f-statistic as 0.1075 which is less than confidence level (alpha =0.15). Hence we reject the null hypothesis and conclude there is at least one mean which is significantly different than the other population mean. This means different chemicals effect the strength.
For blocking effect we get p value of f-statistic 0.00025 which is less than alpha( 0.15). This means blocking effect was significant ; block design was justified as shown by its effectiveness.
Linear effect equation comes out as
\[ y_{ij}: \mu + \tau_i + \varepsilon{ij} = 0 \]Null Hypothesis: There is not difference in the mean due the effect four chemicals’ effect:
\[ H_0: \mu_1 = \mu_2 =\mu_3 =\mu_4 = \mu \]
Alternative Hypothesis: There is at least one mean which is significantly different.
\[H_a : \text{at least one} \ \mu_i \neq \mu \]
crd_model <- lm(bolt ~ chemicals)
gad(crd_model)
## $anova
## Analysis of Variance Table
##
## Response: bolt
## Df Sum Sq Mean Sq F value Pr(>F)
## chemicals 3 14.187 4.7292 0.4739 0.7062
## Residuals 12 119.750 9.9792
p value of f-statistic 0.4739 is less than confidence level alpha 0.15. We fail to reject null hypothesis. We cannot say with confidence that at least one of them means of chemical effect differs significantly than the rest.
p-value of 0.0002515 indicates a strong effect of blocking. Out of 119.75 sum of square(residual) error, blocking consists of a significant portion of it as blocking effect sum of square error is 104.188. That indicates bolt of cloth represents a significant amount of nuissance variability.
library(GAD)
bolt<-c(73,68,74,71,
73,67,75,72,
75,68,78,73,
73,71,75,75)
chemicals <- c(rep(1,4), rep(2,4), rep(3,4), rep(4,4))
blocks <- c(rep(seq(1,4),4))
chemicals <- as.fixed(chemicals) #treament effects are fixed
blocks <- as.random(blocks) #blocks are randomized
blocked_random_model <- lm(bolt ~ chemicals+blocks)
gad(blocked_random_model)
crd_model <- lm(bolt ~ chemicals)
gad(crd_model)