fcrd3fact: Analysis of Factorial Completely Randomized Design for 3...

Description Usage Arguments Value Examples

View source: R/fcrd3fact.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
fcrd3fact(data, fact.A, fact.B, fact.C, Multiple.comparison.test)

Arguments

data

dependent variables

fact.A

vector containing levels of first factor

fact.B

vector containing levels of second factor

fact.C

vector containing levels of third factor

Multiple.comparison.test

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 for both the factors as well as interaction.

Examples

1
2
3
4
data(factorialdata)
#FCRD analysis along with dunccan test for two dependent var.
fcrd3fact(factorialdata[5:6],factorialdata$Nitrogen,
factorialdata$Phosphorus,factorialdata$Potassium,2)

Example output

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

Response: dependent.var
                     Df  Sum Sq Mean Sq F value  Pr(>F)  
fact.A                1   24.00   24.00  0.1469 0.70656  
fact.B                1  112.67  112.67  0.6896 0.41851  
fact.C                1    0.17    0.17  0.0010 0.97492  
fact.A:fact.B         1   42.67   42.67  0.2612 0.61630  
fact.A:fact.C         1  620.17  620.17  3.7960 0.06914 .
fact.B:fact.C         1   48.17   48.17  0.2948 0.59463  
fact.A:fact.B:fact.C  1  181.50  181.50  1.1109 0.30753  
Residuals            16 2614.00  163.37                  
---
Signif. codes:  0***0.001**0.01*0.05.’ 0.1 ‘ ’ 1

$Yield[[2]]
[1] "R Square 0.283"

$Yield[[3]]
[1] "SEm of A: 3.69 , SEd of A: 5.218 , SEm of B: 3.69 , SEd of B 5.218 , SEm of C: 3.69 , SEd of C: 5.218 , SEm of AB: 5.218 , SEd of AB: 7.38 , SEm of AC: 5.218 , SEd of AC: 7.38 , SEm of BC: 5.218 , SEd of BC: 7.38 , SEm of ABC: 7.38 , SEd of ABC: 10.436"

$Yield[[4]]

	Shapiro-Wilk normality test

data:  model$residuals
W = 0.93419, p-value = 0.121


$Yield[[5]]
[1] "Normality assumption is not violated"

$Yield[[6]]
[1] "All the factor A level means are same so dont go for any multiple comparison test"

$Yield[[7]]
$Yield[[7]][[1]]
  MSerror Df     Mean       CV
  163.375 16 122.6667 10.41996

$Yield[[7]][[2]]
     Table CriticalRange
2 2.997999        11.062

$Yield[[7]][[3]]
   dependent.var groups
n1      123.6667      a
n0      121.6667      a


$Yield[[8]]
[1] "All the factor B level means are same so dont go for any multiple comparison test"

$Yield[[9]]
$Yield[[9]][[1]]
  MSerror Df     Mean       CV
  163.375 16 122.6667 10.41996

$Yield[[9]][[2]]
     Table CriticalRange
2 2.997999        11.062

$Yield[[9]][[3]]
   dependent.var groups
p0      124.8333      a
p1      120.5000      a


$Yield[[10]]
[1] "All the factor C level means are same so dont go for any multiple comparison test"

$Yield[[11]]
$Yield[[11]][[1]]
  MSerror Df     Mean       CV
  163.375 16 122.6667 10.41996

$Yield[[11]][[2]]
     Table CriticalRange
2 2.997999        11.062

$Yield[[11]][[3]]
   dependent.var groups
k0      122.7500      a
k1      122.5833      a


$Yield[[12]]
[1] "The means of levels of interaction between A and B factors are same so dont go for any multiple comparison test"

$Yield[[13]]
$Yield[[13]][[1]]
  MSerror Df     Mean       CV
  163.375 16 122.6667 10.41996

$Yield[[13]][[2]]
     Table CriticalRange
2 2.997999      15.64403
3 3.143802      16.40486
4 3.234945      16.88045

$Yield[[13]][[3]]
      dependent.var groups
n1:p0      127.1667      a
n0:p0      122.5000      a
n0:p1      120.8333      a
n1:p1      120.1667      a


$Yield[[14]]
[1] "The means of levels of interaction between B and C factors are same so dont go for any multiple comparison test"

$Yield[[15]]
$Yield[[15]][[1]]
  MSerror Df     Mean       CV
  163.375 16 122.6667 10.41996

$Yield[[15]][[2]]
     Table CriticalRange
2 2.997999      15.64403
3 3.143802      16.40486
4 3.234945      16.88045

$Yield[[15]][[3]]
      dependent.var groups
p0:k1      126.1667      a
p0:k0      123.5000      a
p1:k0      122.0000      a
p1:k1      119.0000      a


$Yield[[16]]
[1] "The means of levels of interaction between A and C factors are same so dont go for any multiple comparison test"

$Yield[[17]]
$Yield[[17]][[1]]
  MSerror Df     Mean       CV
  163.375 16 122.6667 10.41996

$Yield[[17]][[2]]
     Table CriticalRange
2 2.997999      15.64403
3 3.143802      16.40486
4 3.234945      16.88045

$Yield[[17]][[3]]
      dependent.var groups
n1:k0      128.8333      a
n0:k1      126.6667      a
n1:k1      118.5000      a
n0:k0      116.6667      a


$Yield[[18]]
[1] "The means of levels of interaction between all the three factors ABC are same so dont go for any multiple comparison test"

$Yield[[19]]
$Yield[[19]][[1]]
  MSerror Df     Mean       CV
  163.375 16 122.6667 10.41996

$Yield[[19]][[2]]
     Table CriticalRange
2 2.997999      22.12400
3 3.143802      23.19997
4 3.234945      23.87256
5 3.297445      24.33379
6 3.342599      24.66701
7 3.376283      24.91558
8 3.401918      25.10475

$Yield[[19]][[3]]
         dependent.var groups
n1:p0:k0      133.6667      a
n0:p0:k1      131.6667      a
n1:p1:k0      124.0000      a
n0:p1:k1      121.6667      a
n1:p0:k1      120.6667      a
n0:p1:k0      120.0000      a
n1:p1:k1      116.3333      a
n0:p0:k0      113.3333      a



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

Response: dependent.var
                     Df  Sum Sq Mean Sq F value  Pr(>F)  
fact.A                1  10.667 10.6667  1.3617 0.26034  
fact.B                1   2.667  2.6667  0.3404 0.56772  
fact.C                1  24.000 24.0000  3.0638 0.09920 .
fact.A:fact.B         1  28.167 28.1667  3.5957 0.07613 .
fact.A:fact.C         1   8.167  8.1667  1.0426 0.32242  
fact.B:fact.C         1   0.167  0.1667  0.0213 0.88585  
fact.A:fact.B:fact.C  1  10.667 10.6667  1.3617 0.26034  
Residuals            16 125.333  7.8333                  
---
Signif. codes:  0***0.001**0.01*0.05.’ 0.1 ‘ ’ 1

$Plant_Height[[2]]
[1] "R Square 0.403"

$Plant_Height[[3]]
[1] "SEm of A: 0.808 , SEd of A: 1.143 , SEm of B: 0.808 , SEd of B 1.143 , SEm of C: 0.808 , SEd of C: 1.143 , SEm of AB: 1.143 , SEd of AB: 1.616 , SEm of AC: 1.143 , SEd of AC: 1.616 , SEm of BC: 1.143 , SEd of BC: 1.616 , SEm of ABC: 1.616 , SEd of ABC: 2.285"

$Plant_Height[[4]]

	Shapiro-Wilk normality test

data:  model$residuals
W = 0.96559, p-value = 0.5605


$Plant_Height[[5]]
[1] "Normality assumption is not violated"

$Plant_Height[[6]]
[1] "All the factor A level means are same so dont go for any multiple comparison test"

$Plant_Height[[7]]
$Plant_Height[[7]][[1]]
   MSerror Df     Mean       CV
  7.833333 16 12.41667 22.54075

$Plant_Height[[7]][[2]]
     Table CriticalRange
2 2.997999      2.422223

$Plant_Height[[7]][[3]]
   dependent.var groups
n1      13.08333      a
n0      11.75000      a


$Plant_Height[[8]]
[1] "All the factor B level means are same so dont go for any multiple comparison test"

$Plant_Height[[9]]
$Plant_Height[[9]][[1]]
   MSerror Df     Mean       CV
  7.833333 16 12.41667 22.54075

$Plant_Height[[9]][[2]]
     Table CriticalRange
2 2.997999      2.422223

$Plant_Height[[9]][[3]]
   dependent.var groups
p0      12.75000      a
p1      12.08333      a


$Plant_Height[[10]]
[1] "All the factor C level means are same so dont go for any multiple comparison test"

$Plant_Height[[11]]
$Plant_Height[[11]][[1]]
   MSerror Df     Mean       CV
  7.833333 16 12.41667 22.54075

$Plant_Height[[11]][[2]]
     Table CriticalRange
2 2.997999      2.422223

$Plant_Height[[11]][[3]]
   dependent.var groups
k1      13.41667      a
k0      11.41667      a


$Plant_Height[[12]]
[1] "The means of levels of interaction between A and B factors are same so dont go for any multiple comparison test"

$Plant_Height[[13]]
$Plant_Height[[13]][[1]]
   MSerror Df     Mean       CV
  7.833333 16 12.41667 22.54075

$Plant_Height[[13]][[2]]
     Table CriticalRange
2 2.997999      3.425541
3 3.143802      3.592137
4 3.234945      3.696277

$Plant_Height[[13]][[3]]
      dependent.var groups
n1:p0      14.50000      a
n0:p1      12.50000      a
n1:p1      11.66667      a
n0:p0      11.00000      a


$Plant_Height[[14]]
[1] "The means of levels of interaction between B and C factors are same so dont go for any multiple comparison test"

$Plant_Height[[15]]
$Plant_Height[[15]][[1]]
   MSerror Df     Mean       CV
  7.833333 16 12.41667 22.54075

$Plant_Height[[15]][[2]]
     Table CriticalRange
2 2.997999      3.425541
3 3.143802      3.592137
4 3.234945      3.696277

$Plant_Height[[15]][[3]]
      dependent.var groups
p0:k1      13.83333      a
p1:k1      13.00000      a
p0:k0      11.66667      a
p1:k0      11.16667      a


$Plant_Height[[16]]
[1] "The means of levels of interaction between A and C factors are same so dont go for any multiple comparison test"

$Plant_Height[[17]]
$Plant_Height[[17]][[1]]
   MSerror Df     Mean       CV
  7.833333 16 12.41667 22.54075

$Plant_Height[[17]][[2]]
     Table CriticalRange
2 2.997999      3.425541
3 3.143802      3.592137
4 3.234945      3.696277

$Plant_Height[[17]][[3]]
      dependent.var groups
n1:k1      13.50000      a
n0:k1      13.33333      a
n1:k0      12.66667      a
n0:k0      10.16667      a


$Plant_Height[[18]]
[1] "The means of levels of interaction between all the three factors ABC are same so dont go for any multiple comparison test"

$Plant_Height[[19]]
$Plant_Height[[19]][[1]]
   MSerror Df     Mean       CV
  7.833333 16 12.41667 22.54075

$Plant_Height[[19]][[2]]
     Table CriticalRange
2 2.997999      4.844446
3 3.143802      5.080049
4 3.234945      5.227325
5 3.297445      5.328318
6 3.342599      5.401283
7 3.376283      5.455713
8 3.401918      5.497136

$Plant_Height[[19]][[3]]
         dependent.var groups
n1:p0:k1      15.66667      a
n0:p1:k1      14.66667     ab
n1:p0:k0      13.33333     ab
n0:p0:k1      12.00000     ab
n1:p1:k0      12.00000     ab
n1:p1:k1      11.33333     ab
n0:p1:k0      10.33333     ab
n0:p0:k0      10.00000      b

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