Publications by John Myles White

Times Series Methods versus Recurrence Relations

10.12.2009

This term, I’ve been sitting in on Rene Carmona’s course on Modern Regression and Time Series Analysis. Much of the material on regression covered in the course was familiar to me already, but I’ve never felt that I had a real command of times series analysis methods. When Carmona defined the AR(p) model in class a few weeks ago, it struck ...

4470 sym R (1639 sym/14 pcs) 7 tbl

A Lot of Deaths are Partly Self-Induced

11.12.2009

I’m a little surprised by Andrew Gelman’s post today, doubting the wisdom of a passage from Gary Becker’s work that reads: According to the economic approach, therefore, most (if not all!) deaths are to some extent “suicides” in the sense that they could have been postponed if more resources had been invested in prolonging life. I dis...

5568 sym R (171 sym/2 pcs) 2 tbl

The Most Basic Elements of Object-Oriented Programming in R

13.12.2009

Until recently, I’ve never had any reason to learn how to define my own classes in R. Having learned this week, I was surprised to find out how easy it is to start implementing classes in R. If you know nothing about creating classes and class methods in R, here’s a very quick overview of the three core ideas behind R’s object system. If yo...

5210 sym R (1733 sym/22 pcs) 11 tbl

Object-Oriented Programming in R: The Setter Methods

14.12.2009

With a little guidance from the indefatigable Hadley Wickham, I figured out today how to implement the setter methods that were missing from my example user class. To review, let’s rebuild the getter methods for my user object: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 user <- list(id = 1, ...

1953 sym R (1940 sym/8 pcs) 4 tbl

Quick Review of Matrix Algebra in R

16.12.2009

Lately, I’ve been running a series of fMRI experiments on visual perception. In the interests of understanding the underlying properties of the images I’m using as stimuli, I’ve been trying to learn more about the matrix transformations commonly used for image compression and image manipulation. Thankfully, R provides simple-to-use implemen...

4639 sym R (1734 sym/28 pcs) 14 tbl

Image Compression with the SVD in R

17.12.2009

Over the next few posts, I’m going to be reviewing the use of R to implement the most commonly used matrix techniques for image manipulation. The code will be surprisingly simple to understand, because the real magic behind these techniques lies in the mathematics that R provides an abstract interface to. To start, I’m going to review the sin...

5597 sym R (1089 sym/16 pcs) 16 img 8 tbl

Using Complex Numbers in R

18.12.2009

This post is a continuation of my series dealing with matrix operations for image processing. My next goal is to demonstrate the construction of simple low-pass and high-pass spatial frequency filters in R. It’s easy enough to construct simple versions of these filters in R using the Fast Fourier Transform (also known as the FFT), but, because ...

4423 sym R (1224 sym/20 pcs) 2 img 10 tbl

Announcing r-ORM: A Pure R Object-Relational Mapper

05.01.2010

My apologies for the long break between posts. Before the end of this week I’ll return to my series of posts on image processing in R. In the intervening time, I’ve finished a piece of code that I’d like to officially release to the public. The code in question is a very minimal object-relational mapper written entirely in R. As of today, y...

6462 sym R (833 sym/30 pcs) 15 tbl

Killing Yourself: An Addendum

09.01.2010

In further support of the claim that a lot of deaths are partly self-induced, here’s a fascinating piece by Wired on the extraordinary rise in the percent of deaths among the young caused by their own poor decisions. It’s remarkable that, for the young, modern science has already made the world so safe that humanity, rather than nature, is no...

823 sym

Outlawing Gay Marriage

10.01.2010

Given the recent votes on same-sex marriage in New Jersey and Portugal, I wanted to test a seemingly innocuous claim that touches upon very broad issues in political theory: does the degree of directness of a “democratic” vote predict whether the vote will promote or prohibit same-sex marriage? Naively, it seemed clear to me that this was tru...

2657 sym 1 tbl