data(testdata)
#Extract the group names from testdata.
conc<-unique(testdata[,2]) #concentration levels of the test data
#Extract the number of treatment groups.
N=length(conc)-1
#Devide the testdata into a list where the first element contains
#the Poisson data of the control group and the following contain
#the Poisson data of the treatment groups, respectively.
dat<-list()
#Create the final list.
for(j in 1:length(conc)){
index<-which(testdata[,2]==conc[j])
dat[[j]]<-testdata[index,]
}
#Show the data list.
dat
#Generate the intersection hypotheses of H01: mu_0=mu_1 using the
#hypotheses function.
C=hypotheses(N)[[1]]
#Show the first intersection hypothesis.
C[1,]
#Test the first intersection hypothesis.
poisson.sub.test(dat=dat,contrast=C[1,],M=10000)
Run the code above in your browser using DataLab