Doughnut Dump
02 三月, 2018
An education researcher is interested in how variables, such as GRE (Graduate Record Exam scores), GPA (grade point average) and prestige of the undergraduate institution (Rank), influence admission into graduate school (Admit).
Read data
dta <- read.csv('GPA.csv')
view the first few rows of the data
head(dta)
## admit gre gpa rank
## 1 0 380 3.61 3
## 2 1 660 3.67 3
## 3 1 800 4.00 1
## 4 1 640 3.19 4
## 5 0 520 2.93 4
## 6 1 760 3.00 2
library(lattice)
xyplot(gre ~ gpa | factor(rank), data = dta, type = c("g","p","r"), layout = c(4, 1))
Adapted from
https://stats.idre.ucla.edu/r/dae/logit-regression/