grahani.dat<-scan(what=list(suc=0,tot=0,per=0,comp=0,larg=0,ocup=0)) 20 22 1 1 1 1 8 9 2 1 1 1 4 8 3 1 1 1 13 13 1 2 1 1 8 8 2 2 1 1 12 12 3 2 1 1 8 11 1 1 2 1 4 5 2 1 2 1 5 8 3 1 2 1 6 6 1 2 2 1 1 2 3 2 2 1 34 45 1 1 1 2 69 89 2 1 1 2 18 28 3 1 1 2 31 36 1 2 1 2 55 59 2 2 1 2 13 16 3 2 1 2 17 32 1 1 2 2 60 92 2 1 2 2 8 16 3 1 2 2 12 13 1 2 2 2 21 26 2 2 2 2 4 8 3 2 2 2 attach(grahani.dat) suc<-grahani.dat$suc tot<-grahani.dat$tot per<-grahani.dat$per comp<-grahani.dat$comp larg<-grahani.dat$larg ocup<-grahani.dat$ocup Xmat<-cbind(suc,tot-suc) per<-factor(per) comp<-factor(comp) larg<-factor(larg) ocup<-factor(ocup) per<-C(per,treatment) comp<-C(comp,treatment) larg<-C(larg,treatment) ocup<-C(ocup,treatment) fit.grahani<-glm(Xmat~per+comp+larg+ocup,family=binomial()) summary(fit.grahani) form<-Xmat~per+comp+larg+ocup Fam<-binomial() alfa<-0.05 total<-tot envelope.binomialcr(form=form,Fam=Fam,k=k,alfa=alfa,total=total){