## geom_smooth: method="auto" and size of largest group is <1000, so using<br />## loess. Use 'method = x' to change the smoothing method.<br />
I remember my dad telling me that when he was at Northwestern in the mid-70s, the team was essentially winless. As a small consolation, he remembered that the football team had actually been full of good students.
Some time ago, I stumbled across nflcombineresults.com. Among other measures, the site reports Wonderlic scores for a bunch of players entering the NFL.
By adding data on a school's institutional strength (from US News and World Report), I can look for an association between a quarterback's Wonderlic (a measure of cognitive ability), and the (academic) strength of a quarterback's alma mater.
ResultsWhile this is fairly rough, it looks like there is a relationship here – quarterbacks who attend better schools have higher Wonderlic scores; this relationship seems to only hold for top-50 schools.
There are a bunch of causal relationships that could give rise to this pattern, and we really don't have the data to separate these stories. It could be that better students choose better schools, or that attending some schools will increase a Wonderlic score. Alternatively, it may be that students at top schools are more likely to attend college for 4 years.
While the assessment is really preliminary, it looks like there might be something here.
I've attached my code below. At some point, I'll add the csv file with institutional strength (this information is freely available at US News as well).
<br /># loading libraries:<br />library(plyr)<br />library(ggplot2)<br /><br /><br /># gathering wonderlic data:<br />library(XML)<br />url = "http://nflcombineresults.com/nflcombinedata.php?year=&pos=&college="<br />test = readHTMLTable(url)<br /><br />dat = test[]<br /><br />## cleaning data:<br />names(dat) = tolower(names(dat))<br /><br /># replacing spaces in variable names:<br />names(dat) = gsub(x = names(dat), pattern = "\\s", ".")<br /><br /># adjusting vert.leap.(in)<br />names(dat) = "vert.leap.in"<br /><br /># cleaning individual columns:<br />dat$year = as.numeric(as.character(dat$year))<br />dat$name = as.character(dat$name)<br />dat$wonderlic = as.numeric(as.character(dat$wonderlic))<br />dat$bench.press = as.numeric(as.character(dat$bench.press))<br />dat$vert.leap.in = as.numeric(as.character(dat$vert.leap.in))<br /><br /><br /># separating out the individuals with wonderlic scores:<br />dat.sub = dat[!is.na(dat$wonderlic), ]<br /><br /># reordering<br />dat.sub = dat.sub[order(dat.sub$wonderlic, decreasing = TRUE), ]<br /><br /># examining the scores by position:<br />pos.dat = ddply(dat.sub, .(pos), summarise, mean.wonderlic = mean(wonderlic, <br /> na.rm = TRUE), count = length(wonderlic))<br /><br /># note: not really enough to compare by position.<br /><br />qb.dat = dat.sub[dat.sub$pos == "QB", ]<br /><br /><br /># reading in qbschools:<br />qb.schools = read.csv("qbschools.csv")<br /><br /><br /><br /><br /># merging:<br />qb.dat$college = as.character(qb.dat$college)<br />qb.schools$school = as.character(qb.schools$school)<br /><br />merged = merge(qb.dat, qb.schools, by.x = "college", by.y = "school")<br /><br />names(merged) = tolower(names(merged))<br /><br />merged$usnewsrank = as.numeric(as.character(merged$usnewsrank))<br /><br /><br /># to generate plot: p = ggplot(merged, aes(x = usnewsrank, y = wonderlic)) +<br /># geom_point() + geom_smooth() p + opts(title = 'QB Wonderlic score \n by<br /># (academic) strength of undergraduate institution') + xlab('US News and<br /># World Report institution rank (as of 2013)') + ylab ('Wonderlic score')<br /><br /><br /># ggsave('wonderlic.jpg')<br />