Obama vs. McCain trend with error bars

I’ve been checking polling sites like an addict recently, especially Pollster.com and FiveThirtyEight.com. Pollster sometimes employs 68% and 95% confidence intervals around their loess trend lines, like in this article about historic convention bounces:

Intuitively, it seems like the error might fluctuate over time depending on frequency of observations and the variance. The simpleboot package has a function for bootstrapping of loess fits, which will return the standard error from these fits.

Here’s the current graph from Pollster:

And here is a similar loess with +/- 1 and 2 standard error generated from bootstrapping fits.

Looking at the past 4 months shows McCain’s recent upturn in the polls.

It seems like the global constant for standard error is a decent assumption, at least from the graphs I generated from polling data.

Thanks to Brendan for the code for importing the Pollster data, from his post about polling loess at SocialScience++.

Here are my files for generating the graphs and the TSV data (convert .doc to .R or .tsv):

loess-error – testing predict() vs simpleboot, poll-boot – the poll graphs with bootstrap error bars, poll2 – TSV file

Advertisements

2 thoughts on “Obama vs. McCain trend with error bars”

  1. looking at the fringes over the last few months, there are almost no Mcain poll results above 47% approval and almost no Obama polls below 37% approval. it is interesting because it shows there are less polls of people who simply can’t stand Obama and there is not a zealous crowd for Mcain.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s