Monthly Archives: August 2012

Crawford-Howell (1998) t-test for case-control comparisons

August 6, 2012
By
Crawford-Howell (1998) t-test for case-control comparisons

Cognitive neuropsychologists (like me) often need to compare a single case to a small control group, but the standard two-sample t-test does not work for this because the case is only one observation. Several different approaches have been proposed and in a new paper just published in Cortex, Crawford and Garthwaite (2012) demonstrate that the Crawford-Howell (1998) t-test...

Read more »

It is good to be explicit

August 6, 2012
By
It is good to be explicit

Being careful not to repeat the year 1901 mistake, I set the TZ variable before I run R. I have the same set of data that I convert as follows: dates values date1 date2 and then plot plot( date1, values )plot( date2, values ) To my surprise I end up with the following two...

Read more »

Visualize a random forest that classifies digits

August 5, 2012
By
Visualize a random forest that classifies digits

My last post uses random forest proximity to visualize a set of diamond shapes (the random forest is trained to distinguish diamonds from non-diamonds).This time I looked at the digits data set that Kaggle is using as the basis of a competition for "ge...

Read more »

Early August flotsam

August 5, 2012
By
Early August flotsam

Back teaching a couple of subjects and it’s the constant challenge to find enough common ground with students so one can push/pull them to the other side of new concepts. We are not talking about complex hierarchical models using mixed … Continue reading →

Read more »

Provincial Map using GADM

August 5, 2012
By
Provincial Map using GADM

This blog demonstrates how to produce political/provincial boundary map (below) using R maptools and raster packages. ## Load required packageslibrary(maptools)library(raster) ## Download data from gadm.org adm <- getData('GADM', country='PHL',...

Read more »

London Olympics 100m men’s sprint results

August 5, 2012
By
London Olympics 100m men’s sprint results

The 100m mean's sprint finals of the 2012 London Olympics are over and Usain Bolt won the gold medal again with a winning time of 9.63s. Time to compare the result with my forecast of 9.68s, posted on 22 July. My simple log-linear model predicted ...

Read more »

Counting CRAN Package Depends, Imports and LinkingTo

August 5, 2012
By
Counting CRAN Package Depends, Imports and LinkingTo

The recent update by Søren Højsgaard's to his gRbase package for graphical models made it the 75th package to depend on our Rcpp package for R and C++ integration. So in a lighthearted weekend moment, I tweeted about gRbase being number...

Read more »

The R-Podcast Episode 9: Adventures in Data Munging Part 1

August 5, 2012
By

It’s great to be back with a new episode after an eventful break! This episode begins a series on my adventures in data munging, a.k.a data processing. I discuss three issues that demonstrate the flexibility and versatility R brings for recoding messy values, important inconsistent data files, and pinpointing problematic observations and variables. We also

Read more »

Animation basics for a vacation

August 5, 2012
By
Animation basics for a vacation

Since I have a vacation this time I decided to implement some entertaining graphics. I have chosen to animate a Cassini oval.The task is can be accomplished using polar equation:The implementation of the animation is given by the following code:library...

Read more »

At A Glance View of the 2012 Olympics Heptathlon Performances

August 4, 2012
By
At A Glance View of the 2012 Olympics Heptathlon Performances

I spent most of today, err, yesterday, failing to hold back the tears as the medal performances from the Team GB Olympians kept rolling in… So to celebrate one of those wonderful performances, here are a couple of quick sketches of how Jessica Ennis made her medal in the Heptathlon. (The data is cut and

Read more »