Articles by simonraper

Include uncertainty in a financial model

April 1, 2014 | simonraper

Here’s a post that appears on my new website, On-line resources for analysts are often either too general to be of practical use or too specialised to be accessible. The aim of is to remedy this by providing start to finish directions for complex analytical ... [Read more...]

Box Me

November 8, 2013 | simonraper

Here’s a short R function I wrote to turn a long data set into a wide one for viewing. It’s not the most exciting function ever but I find it quite useful when my screen is wide and short. It simply cuts the data set horizontally into equal ... [Read more...]

Visualising Shrinkage

August 31, 2013 | simonraper

A useful property of mixed effects and Bayesian hierarchical models is that lower level estimates are shrunk towards the more stable estimates further up the hierarchy. To use a time honoured example you might be modelling the effect of a new teaching method on performance at the classroom level. Classes ... [Read more...]

Mahout for R Users

June 9, 2013 | simonraper

I have a few posts coming up on Apache Mahout so I thought it might be useful to share some notes. I came at it as primarily an R coder with some very rusty Java and C++ somewhere in the back of my head so that will be my point ... [Read more...]

Visualising the Path of a Genetic Algorithm

April 23, 2012 | simonraper

We quite regularly use genetic algorithms to optimise over the ad-hoc functions we develop when trying to solve problems in applied mathematics. However it’s a bit disconcerting to have your algorithm roam through a high dimensional solution space while not being able to picture what it’s doing or ... [Read more...]

Non overlapping labels on a ggplot scatterplot

February 22, 2012 | simonraper

This is a very quick post just to share a quick tip on how to add non overlapping labels to a scatterplot in ggplot using a great package called directlabels. The trick is to make each point a single member group using an aesthetic like colour and then apply the ... [Read more...]

Marketing Mix Lab: Visualising The Correlation Matrix

January 23, 2012 | simonraper

Following on from the previous post here is an R function for visualising correlations between the explanatory variables in your data set. An interesting example is the North Carolina Crime data set that comes with the plm package. This has the following continuous variables: crmrte crimes committed per person prbarr ... [Read more...]

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)