getwd() rp <-"C:/Users/hp/Desktop/bayili passing" setwd(rp) readLines("dawa.txt",n=5) dw <- read.table("dawa.txt",header=T,dec=",",sep="\t") View(dw) dput(colnames(dw)) str(dw) ######## Unwashing ######## Udw <- subset(dw,Number.of.washing==0) dim(Udw) plot(Udw$Mortality.rate.after.24h~Udw$treat) tapply(Udw$Mortality.rate.after.24h,Udw$treat,median) Kt<-kruskal.test(Udw$Mortality.rate.after.24h~Udw$treat, data=Udw) Kt #quel se manifeste les difference nous devons realiser# #le teste de comparaison multiple# #### ANOVA ##### mon<-lm(Udw$Mortality.rate.after.24h~Udw$treat) summary(mon) drop1(mon,.~.,test="F") summary(mon) hist(resid(mon),col="brown",main = "Mortality Rate\n after 24 hours") bartlett.test(Udw$Mortality.rate.after.24h~Udw$treat) pairwise.t.test(Udw$Mortality.rate.after.24h,Udw$treat,p.adjust.method="bonferroni") mon.aov<-aov(Udw$Mortality.rate.after.24h~Udw$treat) te<-TukeyHSD(mon.aov) par(las=1,cex=0.75) plot(te) ####### blood feeding ###### blfd<-lm(Udw$Blood.feeding.inhibition~Udw$treat) summary(blfd) drop1(blfd,.~.,test="F") hist(resid(blfd),col="brown",main = "blood feding inihibition Rate\n after 24 hours") bartlett.test(Udw$Blood.feeding.inhibition~Udw$treat) mon.aov1<-aov(Udw$Blood.feeding.inhibition~Udw$treat) te<-TukeyHSD(mon.aov1) par(las=1,cex=0.75) plot(te) ###### intervalle de confiance passing rate #### #### confidente interval ###### require(binom) total.tested<-by(Udw$Nb.mosquitoes.tested,Udw$treat,sum) tot.test<-c(total.tested) ## Total des moustique mort par traitement## tot.pass<- by(Udw$Number.passing.through.holes.in14h,Udw$treat,sum) tot.p<-c(tot.pass) # interval de confiance a 95% d'une proportion### ci<-binom.confint(tot.p,tot.test,method="exact") ci write.table(ci,"Ci.exiting.txt",row.names=F,sep="\t",dec=",") ##### blood fef dead interval de confiance### total.tested<-by(Udw$Nb.mosquitoes.tested,Udw$treat,sum) tot.test<-c(total.tested) ## Total des moustique mort par traitement## tot.bloodfed<- by(Udw$Number.of.blood.fed,Udw$treat,sum) tot.b<-c(tot.bloodfed) # interval de confiance a 95% d'une proportion### ci<-binom.confint(tot.b,tot.test,method="exact") ci write.table(ci,"Ci.blood feed.txt",row.names=F,sep="\t",dec=",") ############### washing dawa ################### ## Mortality ## Kt<-kruskal.test(Wdw$Mortality.rate.after.24h~Wdw$treat, data=Wdw) Kt require(coin) pairwise.wilcox.test(Wdw$Mortality.rate.after.24h,Wdw$treat,p.adjust.method="bonferroni") mon<-lm(Wdw$Mortality.rate.after.24h~Wdw$treat) summary(mon) drop1(mon,.~.,test="F") summary(mon) hist(resid(mon),col="brown",main = "Mortality Rate\n after 24 hours") bartlett.test(Wdw$Mortality.rate.after.24h~Wdw$treat) pairwise.t.test(Wdw$Mortality.rate.after.24h,Wdw$treat,p.adjust.method="bonferroni") mon.aov<-aov(Udw$Mortality.rate.after.24h~Udw$treat) te<-TukeyHSD(mon.aov) par(las=1,cex=0.75) plot(te) ## Blood feding ## Kt<-kruskal.test(Wdw$Blood.feeding.inhibition~Wdw$treat, data=Wdw) Kt mon<-lm(Wdw$Blood.feeding.inhibition~Wdw$treat) summary(mon) drop1(mon,.~.,test="F") summary(mon) hist(resid(mon),col="brown",main = "Blood.feding inihibition\n after 24 hours") bartlett.test(Wdw$Blood.feeding.inhibition~Wdw$treat) pairwise.t.test(Wdw$Blood.feeding.inhibition,Wdw$treat,p.adjust.method="bonferroni") mon.aov<-aov(Wdw$Blood.feeding.inhibition~Wdw$treat) te<-TukeyHSD(mon.aov) par(las=1,cex=0.75) plot(te) require(binom) total.tested<-by(Wdw$Nb.mosquitoes.tested,Wdw$treat,sum) tot.test<-c(total.tested) ## Total des moustique mort par traitement## tot.pass<- by(Wdw$Number.passing.through.holes.in14h,Wdw$treat,sum) tot.p<-c(tot.pass) # interval de confiance a 95% d'une proportion### ci<-binom.confint(tot.p,tot.test,method="exact") ci write.table(ci,"Ci.washingpassing.txt",row.names=F,sep="\t",dec=",") ##### blood fef dead interval de confiance### total.tested<-by(Wdw$Nb.mosquitoes.tested,Wdw$treat,sum) tot.test<-c(total.tested) ## Total des moustique mort par traitement## tot.bloodfed<- by(Wdw$Number.of.blood.fed,Wdw$treat,sum) tot.b<-c(tot.bloodfed) # interval de confiance a 95% d'une proportion### ci<-binom.confint(tot.b,tot.test,method="exact") ci write.table(ci,"Ci.blood washing.txt",row.names=F,sep="\t",dec=",") ################################################### "Date" "Treatment" "Number.of.washing" "Nb.mosquitoes.tested", "Replicate" "Number.passing.through.holes.in14h" "Passing.rate" "Number.of.blood.fed" "Blood.fed.rate" "Total.number.dead.after.24.h" "Mortality.rate.after.24h" "X.Blood.feeding.inhibition" #################################################### grp <- plot(dw$Mortality.rate.after.24h~dw$Treatment) tapply(dw$Mortality.rate.after.24h,dw$Treatment,summary) mon<-lm(dw$Mortality.rate.after.24h~dw$Treatment) summary(mon) te<-TukeyHSD(mon) par(las=1,cex=0.75) plot(te) ################################################## mon1<-aov(dw$X.Blood.feeding.inhibition~dw$Treatment) te<-TukeyHSD(mon1) par(las=1,cex=0.75) plot(te) pairwise.t.test(dw$X.Blood.feeding.inhibition,dw$Treatment,p.adjust.method="bonferroni") tapply(dw$X.Blood.feeding.inhibition,dw$Treatment,median) Kt<-kruskal.test(dw$X.Blood.feeding.inhibition~dw$Treatment, data=dw) Kt #quel se manifeste les difference nous devons realiser# #le teste de comparaison multiple# require(coin) pairwise.wilcox.test(dw$X.Blood.feeding.inhibition,dw$Treatment,p.adjust.method="bonferroni") ####### Krustal wallis test non parametrique ##### tapply(dw$Mortality.rate.after.24h,dw$Treatment,median) Kt<-kruskal.test(dw$Mortality.rate.after.24h~dw$Treatment, data=dw) Kt #quel se manifeste les difference nous devons realiser# #le teste de comparaison multiple# require(coin) pairwise.t.test(dw$Mortality.rate.after.24h,dw$Treatment,p.adjust.method="bonferroni")