rcbd: Analysis of Randomized Complete Block Design

Description Usage Arguments Value Examples

View source: R/rcbd.R

Description

The function gives ANOVA, R-square of the model, normality testing of residuals, SEm (standard error of mean), SEd (standard error of difference), interpretation of ANOVA results and multiple comparison test for means.

Usage

1
rcbd(data, treatmentvector, replicationvector, MultipleComparisonTest)

Arguments

data

dependent variables

treatmentvector

vector containing treatments

replicationvector

vector containing replications

MultipleComparisonTest

0 for no test, 1 for LSD test, 2 for Duncan test and 3 for HSD test

Value

ANOVA, interpretation of ANOVA, R-square, normality test result, SEm, SEd and multiple comparison test result

Examples

1
2
3
4
5
6
7
8
9
data<-data.frame(GFY=c(16,13,14,16,16,17,16,17,16,16,17,16,15,15,15,13,15,14,
16,14,15,14,15,17,18,15,15,15,14,14,14,14,15,15,13,15,14,14,13,13,13,12,15,12,15),
DMY=c(5,5,6,5,6,7,6,8,6,9,8,7,5,5,5,4,6,5,8,5,5,5,4,6,6,5,5,6,6,6,5,5,5,5,5,6,5,5,5,4,5,4,5,5,5),
Rep=rep(c("R1","R2","R3"),each=15),
Trt=rep(c("T1","T2","T3","T4","T5","T6","T7","T8","T9","T10","T11","T12","T13","T14","T15"),3))
#' #RCBD analysis with duncan test for GFY only
rcbd(data[1],data$Trt,data$Rep,2)
#RCBD analysis with duncan test for both GFY and DMY
rcbd(data[1:2],data$Trt,data$Rep,2)

Example output

$GFY
$GFY[[1]]
Analysis of Variance Table

Response: data2
            Df Sum Sq Mean Sq F value    Pr(>F)    
replication  2 26.533 13.2667  9.4122 0.0007475 ***
trt         14 17.200  1.2286  0.8716 0.5944508    
Residuals   28 39.467  1.4095                      
---
Signif. codes:  0***0.001**0.01*0.05.’ 0.1 ‘ ’ 1

$GFY[[2]]
[1] "R Square 0.526"

$GFY[[3]]

	Shapiro-Wilk normality test

data:  model$residuals
W = 0.98487, p-value = 0.8148


$GFY[[4]]
[1] "Normality assumption is not violated"

$GFY[[5]]
[1] "SEm 0.6854 , SEd 0.9694"

$GFY[[6]]
[1] "All the treatment means are same so dont go for any multiple comparison test"

$GFY[[7]]
$GFY[[7]][[1]]
   MSerror Df Mean       CV
  1.409524 28 14.8 8.021849

$GFY[[7]][[2]]
      Table CriticalRange
2  2.896885      1.985669
3  3.043847      2.086404
4  3.138859      2.151530
5  3.206478      2.197879
6  3.257369      2.232763
7  3.297090      2.259989
8  3.328885      2.281783
9  3.354805      2.299550
10 3.376223      2.314231
11 3.394100      2.326485
12 3.409132      2.336788
13 3.421839      2.345499
14 3.432619      2.352887
15 3.441780      2.359167

$GFY[[7]][[3]]
       data2 groups
T10 15.66667      a
T4  15.66667      a
T6  15.66667      a
T8  15.33333      a
T9  15.33333      a
T11 15.00000      a
T13 15.00000      a
T15 14.66667      a
T7  14.66667      a
T1  14.33333      a
T12 14.33333      a
T3  14.33333      a
T5  14.33333      a
T2  14.00000      a
T14 13.66667      a



$GFY
$GFY[[1]]
Analysis of Variance Table

Response: data2
            Df Sum Sq Mean Sq F value    Pr(>F)    
replication  2 26.533 13.2667  9.4122 0.0007475 ***
trt         14 17.200  1.2286  0.8716 0.5944508    
Residuals   28 39.467  1.4095                      
---
Signif. codes:  0***0.001**0.01*0.05.’ 0.1 ‘ ’ 1

$GFY[[2]]
[1] "R Square 0.526"

$GFY[[3]]

	Shapiro-Wilk normality test

data:  model$residuals
W = 0.98487, p-value = 0.8148


$GFY[[4]]
[1] "Normality assumption is not violated"

$GFY[[5]]
[1] "SEm 0.6854 , SEd 0.9694"

$GFY[[6]]
[1] "All the treatment means are same so dont go for any multiple comparison test"

$GFY[[7]]
$GFY[[7]][[1]]
   MSerror Df Mean       CV
  1.409524 28 14.8 8.021849

$GFY[[7]][[2]]
      Table CriticalRange
2  2.896885      1.985669
3  3.043847      2.086404
4  3.138859      2.151530
5  3.206478      2.197879
6  3.257369      2.232763
7  3.297090      2.259989
8  3.328885      2.281783
9  3.354805      2.299550
10 3.376223      2.314231
11 3.394100      2.326485
12 3.409132      2.336788
13 3.421839      2.345499
14 3.432619      2.352887
15 3.441780      2.359167

$GFY[[7]][[3]]
       data2 groups
T10 15.66667      a
T4  15.66667      a
T6  15.66667      a
T8  15.33333      a
T9  15.33333      a
T11 15.00000      a
T13 15.00000      a
T15 14.66667      a
T7  14.66667      a
T1  14.33333      a
T12 14.33333      a
T3  14.33333      a
T5  14.33333      a
T2  14.00000      a
T14 13.66667      a



$DMY
$DMY[[1]]
Analysis of Variance Table

Response: data2
            Df Sum Sq Mean Sq F value  Pr(>F)  
replication  2 12.133  6.0667  5.0157 0.01375 *
trt         14  7.200  0.5143  0.4252 0.95260  
Residuals   28 33.867  1.2095                  
---
Signif. codes:  0***0.001**0.01*0.05.’ 0.1 ‘ ’ 1

$DMY[[2]]
[1] "R Square 0.363"

$DMY[[3]]

	Shapiro-Wilk normality test

data:  model$residuals
W = 0.97393, p-value = 0.3985


$DMY[[4]]
[1] "Normality assumption is not violated"

$DMY[[5]]
[1] "SEm 0.635 , SEd 0.898"

$DMY[[6]]
[1] "All the treatment means are same so dont go for any multiple comparison test"

$DMY[[7]]
$DMY[[7]][[1]]
   MSerror Df     Mean       CV
  1.209524 28 5.533333 19.87561

$DMY[[7]][[2]]
      Table CriticalRange
2  2.896885      1.839407
3  3.043847      1.932722
4  3.138859      1.993051
5  3.206478      2.035986
6  3.257369      2.068300
7  3.297090      2.093521
8  3.328885      2.113710
9  3.354805      2.130168
10 3.376223      2.143768
11 3.394100      2.155119
12 3.409132      2.164663
13 3.421839      2.172732
14 3.432619      2.179577
15 3.441780      2.185394

$DMY[[7]][[3]]
       data2 groups
T10 6.333333      a
T11 6.000000      a
T4  6.000000      a
T6  6.000000      a
T8  5.666667      a
T9  5.666667      a
T12 5.333333      a
T13 5.333333      a
T14 5.333333      a
T15 5.333333      a
T2  5.333333      a
T3  5.333333      a
T5  5.333333      a
T7  5.333333      a
T1  4.666667      a

doebioresearch documentation built on July 8, 2020, 7:18 p.m.