Blog Archives

Earthquake Magnitude / Depth Chart

April 7, 2014
By
Earthquake Magnitude / Depth Chart

I am working on a project related to secondary effects of earthquakes. To guide me in the analysis I need a chart showing the location, magnitude and depth of recent earthquakes. There are a host of such charts available already, but since I had the required data on hand, it seemed like a good idea

Read more »

Daylight Saving Effect on S&P500 and FTSE100

April 1, 2014
By
Daylight Saving Effect on S&P500 and FTSE100

Does the transition to and from Daylight Saving Time (DST) have a (significant) effect on the stock market? In a recent blog post on The UK Stock Market Almanac, the author found that the average return of the FTSE100 index for the days following the start of British Summer Time (BST) was -0.07% during the

Read more »

Filtering Data with L1 Regularisation

March 27, 2014
By
Filtering Data with L1 Regularisation

A few days ago I posted about Filtering Data with L2 Regularisation. Today I am going to explore the other filtering technique described in the paper by Tung-Lam Dao. This is similar to the filter discussed in my previous post, but uses a slightly different objective function: where the regularisation term now employs the L1

Read more »

Filtering Data with L2 Regularisation

March 25, 2014
By
Filtering Data with L2 Regularisation

I have just finished reading Momentum Strategies with L1 Filter by Tung-Lam Dao. The smoothing results presented in this paper are interesting and I thought it would be cool to implement the L1 and L2 filtering schemes in R. We’ll start with the L2 scheme here because it has an exact solution and I will

Read more »

How Much Time to Conceive?

January 12, 2014
By
How Much Time to Conceive?

This morning my wife presented me with a rather interesting statistic: a healthy couple has a 25% chance of conception every month , and that this should result in a 75% to 85% chance of conception after a year. This sounded rather interesting and it occurred to me that it really can’t be that simple.

Read more »

Processing EXIF Data

December 15, 2013
By
Processing EXIF Data

I got quite inspired by the EXIF with R post on the Timely Portfolio blog and decided to do a similar analysis with my photographic database. The Data The EXIF data were dumped using exiftool. This command uses some of the powerful features of the bash shell. If you are interested in seeing more about

Read more »

Contour and Density Layers with ggmap

December 13, 2013
By
Contour and Density Layers with ggmap

I am busy working on a project which uses data from the World Wide Lightning Location Network (WWLLN). Specifically, I am trying to reproduce some of the results from Orville, Richard E, Gary R. Huffines, John Nielsen-Gammon, Renyi Zhang, Brandon Ely, Scott Steiger, Stephen Phillips, Steve Allen, and William Read. 2001. “Enhancement of Cloud-to-Ground Lightning

Read more »

Deriving a Priority Queue from a Plain Vanilla Queue

November 25, 2013
By

Following up on my recent post about implementing a queue as a reference class, I am going to derive a Priority Queue class. Inheritance The syntax for Reference Class inheritance is quite intuitive. We need to modify only two of the methods. The most important of these is insert(), which is where all of the

Read more »

Implementing a Queue as a Reference Class

November 24, 2013
By

I am working on a simulation for an Automatic Repeat-reQuest (ARQ) algorithm. After trying various options, I concluded that I would need an implementation of a queue to make this problem tractable. R does not have a native queue data structure, so this seemed like a good opportunity to implement one and learn something about

Read more »

Iterators in R

November 13, 2013
By

According to Wikipedia, an iterator is “an object that enables a programmer to traverse a container”. A collection of items (stashed in a container) can be thought of as being “iterable” if there is a logical progression from one element to the next (so a list is iterable, while a set is not). An iterator

Read more »