# function to calculate minF' # according to ... # H.H. Clark (1973). # The language-as-fixed-effect fallacy: A critique of language statistics in psychological research, # Journal of Verbal Learning and Verbal Behavior, 12, 335-359. # this implementation was inspired by function summary.long.ssc : # # Sherry LaMonica, insightful.com # # contributed to S-Plus discussion list, item #45, # # http://spluscom.insightful.com/discussions/discussion3.cfm?topic_id=10&dept_id=6&discussionitemID=35&parentitemid=0#45 # # Hugo Quené, hugo dot quene at let uu nl, Utrecht inst of Linguistics OTS, Utrecht Univ # # 20060220 first version # 20061011 removed typo in computation of dfe # minFprime <- function (F1,F2,df,n1,n2) { dn <- list(c("F1", "F2", "df", "n1", "n2", "minF'", "df", "dfe", "prob"), "Value") value <- (F1 * F2) / (F1 + F2) dfe <- (F1+F2)^2 / ( (F1^2/n2)+(F2^2/n1) ) dfe <- trunc(dfe) # be conservative here: truncate, not round pv <- 1-pf(value,df,dfe) sum.vec <- c(F1, F2, df, n1, n2, value, df, dfe, pv) mat <- matrix(sum.vec, ncol = 1) dimnames(mat) <- dn mat }