Monthly Archives: January 2011

Converting strsplit() output to a data.frame

January 28, 2011
By

R has a nice set of utilities to work with strings. Function paste is surely one among these. It can be used to "glue" several strings with optional separator. The following example shows how paste can be used to create a new variable in a dataset: dat (dat$z Today I was in a situation where I only had column...

Read more »

Homicides in Mexico 2006-2009

January 27, 2011
By
Homicides in Mexico 2006-2009

Just today the Mexican government released to the public the mortality database for 2009, and as you can see from the chart Mexico has suffered from a steep rise in homicides from 2008 onward and very likely reached the highest violence rate in recent history last year. Since the Mexican government also recently made...

Read more »

Homicides in Mexico 2006-2009

January 27, 2011
By
Homicides in Mexico 2006-2009

Just today the Mexican government released to the public the mortality database for 2009, and as you can see from the chart Mexico has suffered from a steep rise in homicides from 2008 onward and very likely reached the highest violence rate in recent history last year. Since the Mexican government also recently made...

Read more »

ABC model choice not to be trusted [2]

January 27, 2011
By
ABC model choice not to be trusted [2]

As we were completing our arXiv summary about ABC model choice, we were helpfully pointed to a recent CRiSM tech. report by X. Didelot, R. Everitt, A. Johansen and D. Lawson on  Likelihood-free estimation of model evidence. This paper is quite related to our study of the performances of the ABC approximation to the Bayes

Read more »

Slides and replay for "Portfolio design, optimization and stability analysis"

January 27, 2011
By
Slides and replay for "Portfolio design, optimization and stability analysis"

Thanks to everyone who attended yesterday's webinar, "Portfolio design, optimization and stability analysis", presented by Diethelm Würtz of the Rmetrics Association and sponsored by Revolution Analytics, Sybase, Finance Online and NeuralTechSoft. (And thanks in particular for your patience for the last start -- in a perfect demonstration of Murphy's law a microphone failed moments before the scheduled start.) If...

Read more »

Building a Better Word Cloud

January 27, 2011
By
Building a Better Word Cloud

A few weeks ago I attended the NYC Data Visualization and Infographics meetup, which included a talk by Junk Charts blogger Kaiser Fung. Given the topic of his blog, I was a bit shocked that the central theme of his talk was comparing good and bad word clouds. He even stated that the

Read more »

How to label all the outliers in a boxplot

January 27, 2011
By
How to label all the outliers in a boxplot

In this post I offer an alternative function for boxplot, which will enable you to label outlier observations while handling complex uses of boxplot.

Read more »

ZurichR and GenevaR – two new R user groups

January 27, 2011
By

Details of the inaugural ZurichR and GenevaR meetings are as follows:

Read more »

Speed up your R code

January 26, 2011
By
Speed up your R code

This short post is to share an R tip Pierre recently gave me. When you need to store values sequentially (typically inside a loop), it’s more far efficient to create the whole vector (or matrix) and to fill it, rather than to concatenate the values to your current vector (or matrix). In terms of allocation

Read more »

ABC model choice not to be trusted

January 26, 2011
By
ABC model choice not to be trusted

This may sound like a paradoxical title given my recent production in this area of ABC approximations, especially after the disputes with Alan Templeton, but I have come to the conclusion that ABC approximations to the Bayes factor are not to be trusted. When working one afternoon in Park City with Jean-Michel and Natesh Pillai

Read more »