[R] About Scheffe test

ocbruno@netscape.net ocbruno at netscape.net
Mon Mar 24 14:25:39 CET 2003


Dear coleagues,

I wrote a script for a multiple comparisions
like Scheffe test, according Zar, JH. Biostatiscal Analysis
pg.196..
my data is fish larvae abundance with 4 tratments
month (with 12 levels), year (with 9 levels), station
of year (with 4 levels) and area (with 3 levels)
after an anova procedure i apply this:

Scheffe<-function(mxa,mxb,ms,na,nb,k,F){
 # Scheffe test for multiple comparision
 # where mxa is mean of A(month, year,station or area
 # mxb is some but other treatment
 # ms is mean square of anova results
 # na is number of A sample nb is number
 # of sample B, k is degree of freedon of
 # of treatments and F is critical value to
 # to compare
 #if S > Scrit -reject H0 else S < Scrit -accept H0
 SE<-sqrt(ms*(1/na+1/nb))
 S<-abs(mxb-mxa)/SE
 Scrit<-sqrt((k-1)*F)
 if (S > Scrit) result<-c("rej H0") else result<-c("ac H0")
 return(cbind(S,Scrit,result))
 }
Is there some errors??
Is possible find the F values in R??
Thanks for some help

Marcelo




More information about the R-help mailing list