Blog Archives

Seasonal Trend Decomposition in R

January 11, 2013
By
Seasonal Trend Decomposition in R

The Seasonal Trend Decomposition using Loess (STL) is an algorithm that was developed to help to divide up a time series into three components namely: the trend, seasonality and remainder. The methodology was presented by Robert Cleveland, William Cleveland, Jean McRae and Irma Terpenning in the Journal of Official Statistics in 1990. The STL is

Read more »

Theme Elements in ggplot2

May 3, 2012
By

This website provides a simple summary of the theme elements that can be set within ggplot2. There should be sufficient information here to change the default settings for graphs within the ggplot2 package.

Read more »

Melt

April 5, 2012
By

There are many situations where data is presented in a format that is not ready to dive straight to exploratory data analysis or to use a desired statistical method. The reshape2 package for R provides useful functionality to avoid having to hack data around in a spreadsheet prior to import into R. The melt function

Read more »

Useful functions for data frames in R

February 17, 2012
By

This post will consider some useful functions for dealing with data frames during data processing and validation. Consider an artifical data set create using the expand.grid function where there are duplicate rows in the data frame. > des = expand.grid(A = c(2,2,3,4), B = c(1,3,5,5,7)) > des A B 1 2 1 2 2 1

Read more »

Surfaces in ternary plots

January 31, 2012
By
Surfaces in ternary plots

In mixture experiments there is a constraint that the variables are the proportions of components that are mixed together with the consequence that these proportions sum to one. When fitting regression models to data from mixture experiments we may be interested in reprenting the fitted model with a surface plot. The constraint on proportions means

Read more »

Tikz absolute positioning

November 20, 2011
By

When working with a tikz drawing within LaTeX document we might want to locate an object using an absoute position on the page rather than leaving LaTeX to make the decision for us. The use of nodes and the current.page label in conjunction with some other parameters attached to the tikz drawing will allow us

Read more »

Tikz Nodes

October 17, 2011
By
Tikz Nodes

Nodes are used in tikz to place content in a picture as part of a LaTeX document. Fast Tube by Casper When creating a tikz picture the origin is assumed to be at (0,0) and objects are placed with positioning relative to the origin on the picture. If we wanted to add a grid with

Read more »

Tikz Introduction

September 27, 2011
By
Tikz Introduction

The pgf drawing package for LaTeX provides facilities for drawing simple of complicated pictures within a LaTeX document. There are many options available within the package and in this post we consider some of the basics to get up and running. Fast Tube by Casper As with all LaTeX documents we need to select a

Read more »

Cricket All Round Performances

September 19, 2011
By

In cricket a player who can perform well with both the bat and bowl is a great asset for any team and across the history of international cricket there have been a number of cricketers that hall into this bracket. It is difficult to specify a set of criteria to determine whether a player can

Read more »

Scatter plots with images

September 4, 2011
By

Edward Tufte has written extensively on the presentation of data covering good and bad practice. He has made a number of suggestions for adaptations of regularly used graph types to assist with the interpretation and understanding of data. One idea for enhancing scatter plots covered in Tufte’s book Beautiful Evidence is the use of images

Read more »