Blog Archives

Parametric Bootstrap Power Analysis of GISS Temp Data

October 24, 2010
By
Parametric Bootstrap Power Analysis of GISS Temp Data

Previosly, I calculated a bunch of ad-hoc power curves from GISTEMP data. Power is essentially a reframing of the p-value, to see the significance of the trend lines in the global temps. However, power calculations are inherently very noisy, hence, my ad-hoc way of aggregating the data. Another method is to bootstrap through the responses

Read more »

Global Temperature Proxy Reconstructions ~ now with CO2 forcing

August 26, 2010
By
Global Temperature Proxy Reconstructions ~ now with CO2 forcing

Previously, I did a simple Bayesian projection of recent temperature using proxy data and the methods shown in McShane and Wyner (2010). I showed that when you take out the last 30 years of data (1969~1998), the projection does not track the recent uptick in temperatures well. The “projection” is a simple unparametric bootstrap which

Read more »

Global Temperature Proxy Reconstructions ~ Bayesian extrapolation of warming w/ rjags

August 22, 2010
By
Global Temperature Proxy Reconstructions ~ Bayesian extrapolation of warming w/ rjags

Update: fixed projection. There are a bunch of “hockey sticks” that calculate past global temps. through the use of proxies when instrumental data is absent. There is a new one out there by McShane and Wyner (2010) that’s creating quite a stir in the blogosphere (here, here, here, here). The main take out being, that

Read more »

R and Google Earth ~ comparing tuna tracks vs. Gulf of Mexico oil spill extent

August 5, 2010
By
R and Google Earth ~ comparing tuna tracks vs. Gulf of Mexico oil spill extent

There is a lot of interest in how the Gulf of Mexico oil gusher will affect the ecosystem and its marine species. One such species is the Western Atlantic bluefin tuna that holds the Gulf of Mexico as one of its major spawning grounds. Recent tag data show that the location of the gusher is

Read more »

Cherry Picking to Generalize ~ retrospective meta-power analysis using Cohen’s f^2 of NASA temp + visualization

July 17, 2010
By
Cherry Picking to Generalize ~ retrospective meta-power analysis using Cohen’s f^2 of NASA temp + visualization

Previously, I plotted a grid of NASA GISS global temps in ggplot2 to show general trends by the brute force method. Here, I will again use the brute force method to do a simple power analysis on a portion of the data (data here). The general aim is to figure out what the minimum sample

Read more »

Area Plots with Intensity Coloring ~ el nino SST anomalies w/ ggplot2

July 10, 2010
By
Area Plots with Intensity Coloring ~ el nino SST anomalies w/ ggplot2

I see many economy indicator graphs that show emphasis by shading in the curve under the area (while x-axis is time). The shade is stronger at higher values (example). I did this in R below (ggplot2). This was a little more difficult that I’d expected. The color gradients are good to color each individual points

Read more »

Plot Multiple Time Series using the flow / inkblot / river / ribbon / volcano / hourglass / area / whatchamacallit plots ~ blue whale catch per country w/ ggplot2

June 27, 2010
By
Plot Multiple Time Series using the flow / inkblot / river / ribbon / volcano / hourglass / area / whatchamacallit plots ~ blue whale catch per country w/ ggplot2

Ever since I first looked at this NYT visualization by Amanda Cox, I’ve always wanted to reproduce this in R. This is a plot that stacks multiple time series onto one another, with the width of the river/ribbon/hourglass representing the strength at each time. The NYT article used box office revenue as the width of

Read more »

R Tools for Dynamical Systems ~ bifurcation plot in R for system of ODEs

June 12, 2010
By
R Tools for Dynamical Systems ~ bifurcation plot in R for system of ODEs

As per request, here is the code that I wrote to draw bifurcation plots in R. Bifurcation diagrams for discrete maps can be done using this code by James Jones. It is a little easier since approximation is not needed. In the following code, I used the deSolve library to draw bifurcation diagrams for a

Read more »

MLB Baseball Pitching Matchups ~ grabbing pitcher and/or batter codes by specify game date using R XML

June 1, 2010
By
MLB Baseball Pitching Matchups ~ grabbing pitcher and/or batter codes by specify game date using R XML

MLB Gameday stores its game data in XML format, with the players denoted in ID numbers. To find out who is who, the codes are stored in pitchers.xml or batters.xml of each game. My DownloadPitchFX.R script can download the ID numbers, but it doesn’t look to see who the ID is because of the extra

Read more »

MLB Baseball Pitching Matchups ~ manipulating pitch f/x data using the RMySQL package in R

May 31, 2010
By
MLB Baseball Pitching Matchups ~ manipulating pitch f/x data using the RMySQL package in R

After downloading some pitch f/x data using my R script, we can finally have some fun. But because the pitch f/x data is very elaborate, R can easily get overwhelmed by copying the dataset back and forth in memory, as you manipulate the data. So the natural progression is to use relational database systems. Here,

Read more »