Rev 85981 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
% File src/library/datasets/man/UCBAdmissions.Rd% Part of the R package, https://www.R-project.org% Copyright 1995-2018 R Core Team% Distributed under GPL 2 or later\name{UCBAdmissions}\docType{data}\alias{UCBAdmissions}\title{Student Admissions at \abbr{UC} Berkeley}\description{Aggregate data on applicants to graduate school at Berkeley for thesix largest departments in 1973 classified by admission and sex.}\usage{UCBAdmissions}\format{A 3-dimensional array resulting from cross-tabulating 4526observations on 3 variables. The variables and their levels are asfollows:\tabular{rll}{No \tab Name \tab Levels\cr1 \tab \code{Admit} \tab Admitted, Rejected\cr2 \tab \code{Gender} \tab Male, Female\cr3 \tab \code{Dept} \tab A, B, C, D, E, F}}\details{This data set is frequently used for illustrating Simpson's paradox,see \bibcitet{R:Bickel+Hammel+O_Connell:1975}.At issue is whether the data show evidenceof sex bias in admission practices. There were 2691 male applicants,of whom 1198 (44.5\%) were admitted, compared with 1835 femaleapplicants of whom 557 (30.4\%) were admitted. This gives a sampleodds ratio of 1.83, indicating that males were almost twice as likelyto be admitted. In fact, graphical methods (as in the example below)or log-linear modelling show that the apparent association betweenadmission and sex stems from differences in the tendency of males andfemales to apply to the individual departments (females used to apply\emph{more} to departments with higher rejection rates).This data set can also be used for illustrating methods for graphicaldisplay of categorical data, such as the general-purpose \link{mosaicplot}or the \link{fourfoldplot} for 2-by-2-by-\eqn{k} tables.}\references{\bibshow{*}}\examples{require(graphics)## Data aggregated over departmentsapply(UCBAdmissions, c(1, 2), sum)mosaicplot(apply(UCBAdmissions, c(1, 2), sum),main = "Student admissions at UC Berkeley")## Data for individual departmentsopar <- par(mfrow = c(2, 3), oma = c(0, 0, 2, 0))for(i in 1:6)mosaicplot(UCBAdmissions[,,i],xlab = "Admit", ylab = "Sex",main = paste("Department", LETTERS[i]))mtext(expression(bold("Student admissions at UC Berkeley")),outer = TRUE, cex = 1.5)par(opar)}\keyword{datasets}