Publications by Christopher Gandrud

GitHub renders CSV in the browser, becomes even better for social data set creation

22.08.2013

I’ve written in a number of places about how GitHub can be a great place to store data. Unlike basically all other web data storage sites (many of which I really like such as Dataverse and FigShare) GitHub enables deep social data set development and fits nicely into a reproducible research workflow with R. One negative though, especially comp...

1214 sym 2 img

Showing results from Cox Proportional Hazard Models in R with simPH

02.09.2013

Effectively showing estimates and uncertainty from Cox Proportional Hazard (PH) models, especially for interactive and non-linear effects, can be challenging with currently available software. So, researchers often just simply display a results table. These are pretty useless for Cox PH models. It is difficult to decipher a simple linear variable...

6412 sym R (2326 sym/6 pcs) 8 img

Three Quick and Simple Data Cleaning Helper Functions (December 2013)

06.12.2013

As I go about cleaning and merging data sets with R I often end up creating and using simple functions over and over. When this happens, I stick them in the DataCombine package. This makes it easier for me to remember how to do an operation and others can possibly benefit from simplified and (hopefully) more intuitive code. I've talked about som...

2698 sym R (954 sym/5 pcs)

Programmatically download political science data with the psData package

23.02.2014

A lot of progress has been made on improving political scientists’ ability to access data ‘programmatically’, e.g. data can be downloaded with source code R. Packages such as WDI for World Bank Development Indicator and dvn for many data sets stored on the Dataverse Network make it much easier for political scientists to use this data as pa...

4149 sym R (760 sym/3 pcs)

d3Network Plays Nice with Shiny Web Apps

09.05.2014

After some delay (and because of helpful prompting by Giles Heywood and code contributions by John Harrison) d3Network now plays nicely with Shiny web apps. This means you can fully integrate R/D3.js network graphs into your web apps. Here is what one simple example looks like: An explanation of the code is here and you can download the app and ...

784 sym R (57 sym/1 pcs) 2 img

Updates to repmis: caching downloaded data and Excel data downloading

11.05.2014

Over the past few months I’ve added a few improvements to the repmis–miscellaneous functions for reproducible research–R package. I just want to briefly highlight two of them:Caching downloaded data sets.source_XlsxData for downloading data in Excel formatted files.Both of these capabilities are in repmis version 0.2.9 and greater.CachingWh...

1840 sym R (196 sym/2 pcs)

Simple script from setting up R, Git, and Jags on Amazon EC2 Ubuntu Instance

28.06.2014

Just wanted to put up the script I’ve been using to create an Amazon EC2 Ubuntu instance for running RStudio, Git, and Jags. There isn’t anything really new in here, but it it has been serving me well. The script begins after the basic instance has been set up in the Amazon EC2 console (yhat has a nice post on how to do this, though some of t...

840 sym

Note to self: brew cleanup r

22.07.2014

Note to self: after updating R with Homebrew remember to cleanup old versions: brew cleanup r Otherwise I’m liable to get a segfault. (see also) Related To leave a comment for the author, please follow the link and comment on their blog: Christopher Gandrud (간드루드 크리스토파). R-bloggers.com offers daily e-mail updates about ...

548 sym R (15 sym/1 pcs)

Do Political Scientists Care About Effect Sizes: Replication and Type M Errors

13.10.2014

Reproducibility has come a long way in political science since I began my PhD all the way back in 2008. Many major journals now require replication materials be made available either on their websites or some service such as the Dataverse Network.This is certainly progress. But what are political scientists actually supposed to do with this new i...

5811 sym

Set up R/Stan on Amazon EC2

10.12.2014

A few months ago I posted the script that I use to set up my R/JAGS working environment on an Amazon EC2 instance.Since then I’ve largely transitioned to using R/Stan to estimate my models. So, I’ve updated my setup script (see below). There are a few other changes:I don’t install/use RStudio on Amazon EC2. Instead, I just use R from the t...

1140 sym