Hi, Ana try these source: # Scheffe test, according Zar, J.H. (1984) Biostatistical Analysis. # Englewood Cliffs: Prentice Hall. # ----------------------------------------------------------------- Scheffe1<- function(mxa,mxb,ms,na,nb,k,F) { # multiple comparision # DMSa=| meanXa- meanXb | # DMSc= critic value # if DMSa > DMSc --> reject H0 # where mxa is mean of one group dataset, # and mxb is outher group dataset # na is number of samples for group a # nb is number of samples for group b # ms is mean square, F is F value, k is treatments result<-0 DMSa<- abs(mxa-mxb) DMSc<- sqrt(((1/na)+(1/nb))*(k-1)*(ms)*(F)) if (DMSa > DMSc) result<-c("rej. H0") else result<- c("ac. H0") return(cbind(result)) } save as name.R in your work directory. Hope this helps. -- Ocean?logo Marcelo Alexandre Bruno # Linux User: 124592 # P?s-gradua??o Oceanografia Biol?gica FUNDACAO UNIV. FEDERAL do RIO GRANDE Departamento de Oceanografia Lab. de Ecologia do Ictiopl?ncton AV. IT?LIA km 8 s/n - CARREIROS Cx. Postal 474 96201-900 (0xx53) 2336529 Rio Grande - RS - BRAZIL