# Monthly Archives: December 2012

## 24 Christmas Gifts from is.R

December 24, 2012
By

The is.R blog has been on a roll in December with their Advent CalendaR feature: daily tips about R to unwrap each day leading up to Christmas. If you haven't been following it, start with today's post and scroll down. Sadly there isn't a tag to collect all these great posts together, but here are a few highlights: December...

## Miles of iles

December 24, 2012
By

An explanation of quartiles, quintiles deciles, and boxplots. Previously “Again with variability of long-short decile tests” and its predecessor discusses using deciles but doesn’t say what they are. The *iles These are concepts that have to do with approximately equally sized groups created from sorted data. There are 4 groups with quartiles, 5 with quintiles … Continue reading...

## Latent Class Analysis with poLCA

December 24, 2012
By

On an airplane the other day, I learned of a method called latent class (transition) analysis, and it sounded like an interesting thing to try in R. Of course, as with everything R, There is a Package for That, called poLCA, written by none other than Drew Linzer (of Votamatic fame) and Jeffrey Lewis. I...

## Labeling the Vertical Axis in R Plots

December 24, 2012
By

I show how to position the vertical axis label of an R plot above the axis and orient it horizontally as suggested by Stephen Few. I encourage you to share this with others and contribute to the conversation at Labeling the Vertical Axis in R Plots, which first appeared at carlislerainey.com. For more of my thoughts and...

## Identical Champions League Draw: What Were the Odds?

December 24, 2012
By

A number of news outlets have reported a peculiar quirk that arose during Friday’s Champions League draw. Apparently, the sport’s European governing body, UEFA, ran a trial run the day before the main event, and the schedule chosen during this event was identical to that of the actual draw on Friday. Given this strange coincidence,

## Aggregation by Group in R

December 23, 2012
By

Efficiency Comparison among 4 Methods above

## My R year

December 23, 2012
By

End-of-year posts are corny but, what the heck, I think I can let myself delve in to corniness once a year. The following code gives a snapshot of what and how was R for me in 2012. outside.packages.2012 <- list(used.the.most = c('asreml', 'ggplot2'), largest.use.decline = c('MASS', 'lattice'), same.use = c('MCMCglmm', 'lme4'), would.like.use.more = 'JAGS')

## Data Import Efficiency – A Case in R

December 23, 2012
By

Below is a piece of R snippet comparing the data import efficiencies among CSV, SQLITE, and HDF5. Similar to the case in Python posted yesterday, HDF5 shows the highest efficiency.

## Binary Classification – A Comparison of “Titanic” Proportions Between Logistic Regression, Random Forests, and Conditional Trees

December 23, 2012
By

Now that I’m on my winter break, I’ve been taking a little bit of time to read up on some modelling techniques that I’ve never used before. Two such techniques are Random Forests and Conditional Trees.  Since both can be used … Continue reading →

## Measuring the Gerrymander with spatstat

December 23, 2012
By

Well, to be specific, I mean measuring district compactness (a very interesting subject, see these three articles for starters). There are myriad ways of measuring the “oddness” of a shape, including a comparison of the area of the district to its circumcircle, the moment of inertia of the shape, the probability that a path connecting...