Friday, September 15, 2006

How to compute min-F

Here's how to compute minF in R. You have to give the function the F1 and F2 values and the denominator dfs for each: minf(f1,f2,n1,n2).

minf <- function(f1,f2,n1,n2){
fprime <- (f1*f2)/(f1+f2)
n <- round(((f1+f2)*(f1+f2))/(((f1*f1)/n2)+((f2*f2)/n1)))
return(paste("minF(",n,")=",round(fprime,digits=2),", crit=",round(qf(.95,1,n)),sep=""))
}

If there are any mistakes here, corrections are welcome.

References: Raaijmakers' 1999 and 2003 articles.