Learn R Programming

agricolae (version 1.2-0)

PBIB.test: Analysis of the Partially Balanced Incomplete Block Design

Description

Analysis of variance PBIB and comparison mean adjusted. Applied to resoluble designs: Lattices and alpha design.

Usage

PBIB.test(block,trt,replication,y,k, method=c("REML","ML","VC"), 
test = c("lsd","tukey"), alpha=0.05, console=FALSE, group=TRUE)

Arguments

block
blocks
trt
Treatment
replication
Replication
y
Response
k
Block size
method
Estimation method: REML, ML and VC
test
Comparison treatments
alpha
Significant test
console
logical, print output
group
logical, groups

Value

  • blockVector, consecutive numbers by replication
  • trtVector numeric or character
  • replicationVector
  • ynumeric vector
  • knumeric constant
  • methodCharacter: REML, ML and VC
  • testCharacter: comparison methods lsd and tukey
  • alphaNumeric
  • groupLogic

Details

Method of comparison treatment. lsd: least significant difference. tukey: Honestly significant differente. Estimate: specifies the estimation method for the covariance parameters. The REML is the default method. The REML specification performs residual (restricted) maximum likelihood, and The ML specification performs maximum likelihood, and the VC specifications apply only to variance component models.

References

1. Iterative Analysis of Generalizad Lattice Designs. E.R. Williams (1977) Austral J. Statistics 19(1) 39-42. 2. Experimental design. Cochran and Cox. Second edition. Wiley Classics Library Edition published 1992

See Also

BIB.test, design.alpha

Examples

Run this code
require(agricolae)
require(MASS) # method = VC in PBIB.test
# require(nlme) # method = REML or LM in PBIB.test
# alpha design 
Genotype<-paste("geno",1:30,sep="")
ntr<-length(Genotype)
r<-2
k<-3
s<-10
obs<-ntr*r
b <- s*r
book<-design.alpha(Genotype,k,r,seed=5)
book$book[,3]<- gl(20,3)
# dataset
y<-c(5,2,7,6,4,9,7,6,7,9,6,2,1,1,3,2,4,6,7,9,8,7,6,4,3,2,2,1,1,2,
     1,1,2,4,5,6,7,8,6,5,4,3,1,1,2,5,4,2,7,6,6,5,6,4,5,7,6,5,5,4)
dbook<-data.frame(book$book,yield=y)
rm(y,Genotype)
# analysis
require(nlme) # method = REML or LM in PBIB.test
attach(dbook)
model <- PBIB.test(block, Genotype, replication, yield, k=3, method="REML")
detach(dbook)
model$ANOVA
model$method
model$parameters
model$Fstat
head(model$comparison)
model$means
model$groups
bar.group(model$groups,ylim=c(0,9), density=20, las=2)

Run the code above in your browser using DataLab