# Blog Archives

## Grrr…

November 15, 2011
By

I’ve been working through Gelman et al.’s otherwise excellent Bayesian Data Analysis and it’s going reasonably well. My statistics is a little bit rusty so it’s taken time to work through all of the exercises and really understand what’s going on. But I...

## Sampling for Monte Carlo simulations with R

October 31, 2011
By
$Sampling for Monte Carlo simulations with R$

I've knocked together a quick function for generating efficient Monte Carlo samples. It takes a bit of the legwork out of running Monte Carlo simulations.

## Getters and setters in R

August 12, 2011
By

Tweet When I first started using R, one of the things that attracted me was its claim to be an object-oriented programming (OOP) language. Coming from a Java background, I was used to designing software with OOP concepts like encapsulation and inheritance but, when I turned my hand to R, I quickly...

## Positive coefficient regression in R

August 5, 2011
By

Ever have a regression model where the coefficients don't make sense? I've been trying to predict electricity and gas consumption from daily activity schedules but a simple linear regression kept saying that demands should go down the more an activity is performed. Fortunately I found the nnls package and show here how you can use it to...

## How to do a quantitative literature review in R

May 17, 2011
By

In the early stages of a literature review, you may have hundreds of papers and not know how to even begin sorting through them. In this post, I show you how to perform a two-stage clustering analysis with R so that you can identify the main groups within your data, based on key attributes of each paper.

## How to: Multinomial regression models in R

April 5, 2011
By

Apples, oranges, pears or bananas? Bus, train, car, or walk? Many choices are made between more than two options, a situation that can be represented by multinomial choice modelling. Here's a quick tutorial on how to do it in R.

## How to: Binomial regression models in R

March 19, 2011
By
$How to: Binomial regression models in R$

Ever wondered how to predict success or failure as a function of other variables? Here's a quick tutorial on binomial regression in R.

## Changing the fonts in R plots

October 28, 2007
By

Tweet I use R to do almost all of my statistical analysis and plotting. It has a very steep learning curve but once you get into it, it’s very powerful and you can customise almost anything. The only problem is that these changes are not...