feldt2 <- function(obs.a1,obs.a2,k,n1,n2,ci=.95) { # program translated from SAS program I wrote, Feldt2.sas # tests significance of difference between two alpha values # obs.a1 and obs.a2 # assumes same number of items in the measures: k1 <- k k2 <- k # n1 and n2 supply sample sizes # default test against p<-.05, 95% C.I. if (obs.a1 > obs.a2) { # necessary to reverse everything tmp <- obs.a1 obs.a1 <- obs.a2 obs.a2 <- tmp # tmp <- k1 # k1 <- k2 # k2 <- tmp tmp <- n1 n1 <- n2 n2 <- tmp tmp <- 1 # used as flag lower } else { tmp <- 0 } w <- (1 - obs.a2)/(1 - obs.a1) ci.pct <- 100*ci df1 <- n1 - 1 df2 <- n2 - 1 p_null <- pf(w,df2,df1) } feldt2(.75,.62,4,713,52)