Publications by Mark T Patterson

ddply in action

07.03.2013

Top Batting Averages Over Time Top Batting Averages Over Time reference:http://www.baseball-databank.org/ ShortI'm going to use plyr and ggplot2 to look at how top batting averages have changed over time First load the data: options(width = 100) library(ggplot2) ## Warning message: package 'ggplot2' was built under R version 2.14.2 library(pl...

1417 sym R (1958 sym/4 pcs) 2 img

Using maps and ggplot2 to visualize college hockey championships

13.03.2013

Short: I plot the frequency of college hockey championships by state using the maps package, and ggplot2 Note: this example is based heavily on the example provided athttp://www.dataincolour.com/2011/07/maps-with-ggplot2/ data reference:http://en.wikipedia.org/wiki/NCAA_Men%27s_Ice_Hockey_Championship Question of interestAs a good Minnesotan, ...

2464 sym R (2011 sym/3 pcs) 2 img

Behavioral Economics and Beer… highly correlated

19.03.2013

Short: I plot the frequency of wikipedia searches of “Behavioral Economics”, and “Beer” – who knew the correlation would be 0.7! Data reference:Data on any wikipedia searches (back to 2007) are available at http://glimmer.rstudio.com/pssguy/wikiSearchRates/. The website allows you to download frequency hits per day as a csv, which i...

1198 sym R (631 sym/2 pcs) 2 img

CrossFit weights: gender matters less than you’d think

17.04.2013

Exploring Gaussian Mixture Models Exploring Gaussian Mixture Models This week in the Empirical Research Methods course, we've been talking a lot about measurement error. The idea of having some latent variable of interest, coupled with 'flawed' measures reminded me of a section of Cosma's course I really enjoyed, but haven't gotten a change to g...

4474 sym R (3473 sym/5 pcs) 4 img

Simulation of an Oxford (Undergrad) Interview Question

31.10.2013

A friend of mine, who's an economics teacher in London, is responsible for preparing some of his students for interviews at Oxford and Cambridge. He told me that, at these schools, students have to go through a nerve-wracking experience where faculty pepper them with quiz questions meant to assess the ability to think quickly under pressure. ...

2481 sym R (613 sym/1 pcs) 2 img

Quarterback Wonderlic Scores by Institution (Academic) Strength

01.11.2013

## geom_smooth: method="auto" and size of largest group is <1000, so using ## loess. Use 'method = x' to change the smoothing method. 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 studen...

1829 sym R (1956 sym/2 pcs) 2 img

Simulating Abstract Art with R

03.11.2013

Piet Mondrian Composition with Red, Blue, Black, Yellow, and Gray (1921): An example draw from my simulation function: We're in the midst of planning our spring course on Empirical Research Methods, and as a result, I've found myself spending a lot of time thinking about some of the fist ideas in statistics – For example, that the data we ob...

2057 sym R (3576 sym/1 pcs) 12 img

Using R to find Obama’s most frequent twitter hashtags

04.11.2013

I've been exploring Jeff Gentry's twitteR package, which has a ton of great functionality for intereacting with twitter data in R. Today, I thought a bit about a problem I've noticed several times on twitter: users profiles are often only noisy signals of the content they tweet about! I decided that a table of a user's commonly-used tweets migh...

1025 sym R (791 sym/1 pcs) 2 img

College Basketball: Presence in the NBA over Time

07.11.2013

Interested in practicing a bit of web-scraping, I decided to make use of a nice dataset provided by Databasebasketball.com in order to examine the representation of various college programs in the NBA/ABA over time. This dataset only includes retired players, and ends in 2010, so I decided to only plot data through 2000. Originally, I was exci...

1447 sym R (2344 sym/1 pcs) 2 img

Visualizing Twitter Followers Using Pointillism

10.04.2014

A funny thing about social media in the 21st century is that it allows us to connect with a lot of people.. by a lot, I mean so many that it's easy to lose track of any sense of scale. Maybe others are better at this, but I have a hard time wrapping my head around what (say) 8,000 twitter followers looks like. To try to get a grip on this, I ...

2174 sym R (2942 sym/1 pcs) 6 img