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.


Anonymous said...

Dear Shravan Vasishth,

I'm using the function to calculate minF in R. Thanks!

However, I have a (silly) question. Is there an easy way to print the p value of the obtained minF, instead of the critical value?

Lara Tagliapietra

Shravan Vasishth said...

i think you should not compute min-F at all. if you are doing by-subjct and by-item analyses, you should use multilevel/hierarchical/mixed-effects models.

h. baayen has written some articles on this that cover the details for psycholinguists.

Shravan Vasishth said...

To compute p-value: