Publications by jackman

malapportionment in the U.S. Senate

23.12.2009

The 40 Republican senators currently in the U.S. senate represent 36% of the U.S population. See the graph below (click on the thumbnail for PDF). This is something I’ve been meaning to compute for a while now, mapping the cumulative distribution of senators’ ideal points onto the cumulative distribution of state population (each state coun...

1724 sym 2 img

tooltips in R graphics; nytR package

28.12.2009

At Doug Rivers’ suggestion, I started investigating tooltips as a way to label points in R graphs. An example appears at the top of my blog, where I plot the ideal points (revealed preferences) of the (current) 111th U.S. House of Representatives against Obama vote share in their district in 2008 (SVG). I’m using the RSVGTipsDevice package i...

2061 sym

subsetting a matrix/array in R

07.01.2010

From the R-devel svn log. Nice addition… r50896 | falcon | 2010-01-05 12:05:31 -0800 (Tue, 05 Jan 2010) | 7 lines Changed paths: M /trunk/NEWS M /trunk/src/include/Defn.h M /trunk/src/library/base/man/Extract.Rd M /trunk/src/main/subassign.c M /trunk/src/main/subscript.c M /trunk/src/main/subset.c M /trunk/tests/Makefile.c...

1261 sym

sequential ideal point estimates

09.01.2010

Out of curiosity, I produced a “sequential” set of ideal point estimate for the (current) 111th U.S. Senate, plotting the results in the graph attached below (click on the thumbnail); as is conventional, red is Republican and blue is Democratic. The analysis uses all 373 non-unanimous roll calls in the 111th Senate thus far. Each senator st...

2789 sym 2 img

principal components and image reconstruction

09.03.2010

Jeff Lewis at UCLA told me he teaches principal components with an image reconstruction example. This got me inspired to try it myself. A snapshot appears below, showing how the image quality improves quickly with a relatively small number of principal components. A full, Sweaved write up is here, making use of the biOps package in R. Related ...

746 sym 2 img

Stata Fail

10.03.2010

From a recent mailing from Stata (highlighting by me): Funnily enough, there is a Daniel Rubin, a bio-informatics person here at Stanford. Related To leave a comment for the author, please follow the link and comment on their blog: simon jackman's blog » R. R-bloggers.com offers daily e-mail updates about R news and tutorials about learning...

546 sym 2 img

Senators’ ideal points against Obama vote

18.03.2010

I added another plot to the output generated by my overnight ideal point scripts: a scatterplot of estimated Senate ideal points against Obama vote share in their state (color coded by party, local linear regression overlays by party, labels for some big residuals). I suppose I’m surprised by the way that the loess curve for the Democrats flatt...

1289 sym 2 img

Health Care Reform vote

21.03.2010

A little bit of churn relative to the House’s 1st shot at this but otherwise a remarkably similar vote, with an estimated cutpoint almost at the same place; see some raw R output, below the fold, after the thumbnail… y is the vote to take up the Senate amendments; yEarly is the previous go at this by the House: table(y,yEarly,exclude=NULL) ...

777 sym R (354 sym/3 pcs) 2 img

JAGS 2.0

29.04.2010

Is out. On sourceforge. Along with a new rjags. Thanks Martyn. I’m looking forward to working my way through some of the improvements, which include block-updating of parameters in GLMs more use of R’s d/p/q family of functions for densities improvements to dnormmix for normal mixtures dmstate, for Markov switching models (far out!). Re...

748 sym

countrycode R package

03.08.2010

I am digging this countrycode package in R I just found, written by a UM grad student Vincent Arel-Bundock. Very nice. Thanks! countrycode("2","cown","iso3c") [1] "USA" It would be better if the package could handle failed matches a little more gracefully: e.g., > countrycode(c(2,730,818),"cown","iso3c") [1] "USA" when the user was expect...

958 sym