# Admission to Berkeley graduate programs:
Berkeley <- data.frame(
expand.grid(GENDER=c("Male", "Female"),
ADMIT=c("Admitted", "Rejected")),
Freq=c(1198,557,1493,1278))
tab = as.table(rbind(c(1198,557), c(1493,1278)))
calc.Phi(tab)
Run the code above in your browser using DataLab