R Gauge Plots

January 17, 2013
By
R Gauge Plots

Gaston Sanchez’s post on R-Bloggers inspired me to waste a bit of time. He wanted to replicate the Google Charts widget to make gauges. I modified his code (below) in some minor ways and made a function out of it so you can alter the look and feel of your gauge. Feel free to pilfer

Read more »

Calculating a Gini Coefficients for a Number of Locales at Once in R

January 17, 2013
By
Calculating a Gini Coefficients for a Number of Locales at Once in R

The Gini coefficient is a measure of the inequality of a distribution, most commonly used to compare inequality in income or wealth among countries.Let's first generate some random data to analyze. You can download my random data or use the code below ...

Read more »

Maize trade Part I: Generate the network diagram

January 17, 2013
By
Maize trade Part I: Generate the network diagram

It has been several month since my last post, partially due to the fact that my laptop was lost and several deadlines was approaching. Fortunately I will be returning to Taiwan and get a new laptop within a week, and will be updating regularly...

Read more »

If SPSS can factor analyze MaxDiff scores, why can’t R?

January 17, 2013
By
If SPSS can factor analyze MaxDiff scores, why can’t R?

Answer:  The variance-covariance matrix containing all the MaxDiff scores is not invertible.  R tells you that, either with an error message or a warning.  SPSS, at least earlier versions still in use, runs the factor analysis witho...

Read more »

Steve Culman on the `plyr` Package

January 17, 2013
By

At Davis R Users’ Group yesteray, Steve Culman gave us an introduction to the plyr package and how to use it to manipulate data. Here’s his presentation, and the accompanying demonstration script: Steve’s talk is based on this paper by Hadley Wickham in the Journal of Statistical Software. A lot of useful related...

Read more »

Plotting Odds Ratios (aka a forrestplot) with ggplot2 –

January 17, 2013
By
Plotting Odds Ratios (aka a forrestplot) with ggplot2 –

Hi, if you like me work in medical research, you have to plot the results of multiple logistic regressions every once in a while. As I have not yet found a great solution to make these plots I have put together the following short skript. Do not expect too much, it’s more of a reminder

Read more »

Two free online courses starting soon: Data Analysis (with R) and Social Network Analysis

January 17, 2013
By
Two free online courses starting soon: Data Analysis (with R) and Social Network Analysis

There are two online courses starting soon on Coursera, which are free to register. 1. Data Analysis (with R) It is a 8-week online course starting on Jan 22nd 2013 <https://www.coursera.org/course/dataanalysis>. This course is an applied statistics course focusing on … Continue reading →

Read more »

Creating xts objects from source

January 17, 2013
By
Creating xts objects from source

A recent post showed how to access the attributes of an xts object. We used an xts object as these are powerful and popular—but any R object using attributed could be used to illustrate the point. In this short post, we show how one can also do the inverse in order to create an xts object at the C++...

Read more »

Creating xts objects from source

January 17, 2013
By
Creating xts objects from source

A recent post showed how to access the attributes of an xts object. We used an xts object as these are powerful and popular—but any R object using attributed could be used to illustrate the point. In this short post, we show how one can also do the inverse in order to create an xts object at the C++...

Read more »

Project Euler — problem 25

January 16, 2013
By
Project Euler — problem 25

Finally, the fog lasting for days went away this morning and the sun comes out. It’s a lovely winter day. After taking a walk after lunch, I feel like doing some math. So, here comes the 25th Euler problem. The … Continue reading →

Read more »

Optimal number of clusters

January 16, 2013
By
Optimal number of clusters

In the last post, Examples of Current Major Market Clusters, we looked at clustering Major Markets into 4 groups based on their correlations in 2012. Today, I want to continue with clustering theme and discuss methods of selecting number of clusters. I will look at the following methods of selecting optimal number of clusters: Minimum

Read more »

Slightly Different Measure of Valuation

January 16, 2013
By
Slightly Different Measure of Valuation

I grow tired of the tried and true standard measures of valuation, and from time to time I try to think of alternate methods.  One thought was to analyze Ken French’s Market(ME) to Book(BE) Breakpoints by percentile.  We can see by year at ...

Read more »

Podcast: Revolution Analytics, R and the changing technology landscape

January 16, 2013
By

In a recent interview with DataInformed's Ian Murphy, I discussed the history of the open-source R project and how Revolution Analytics is building on R to compete with legacy statistical software such as SAS and SPSS. Other topics we touched on during the 20-minute discussion included: R's growth in academia, the impact of cloud computing on analytics, and how...

Read more »

Wikipedia page views

January 16, 2013
By
Wikipedia page views

Here I present an application that quantifies Wikipedia page views. It can visualise any topic in any language. It is (shamelessly) based on an application by the blogger Andrew Clark (pssguy), whose code is available here.I have added:multi ...

Read more »

Using R to visually compare the volume of different information sources

January 16, 2013
By
Using R to visually compare the volume of different information sources

A couple of weeks ago Bob wrote about a post about a research note that was recently accepted to the iConference. In it we outline the beginnings of a research project where we look at the interaction of different media platforms (Twitter and Blogs) with more traditional sources. In this post I go through the

Read more »

Review of R Graphics Cookbook by Winston Chang

January 16, 2013
By

I just got a copy of Winston Chang's book R Graphics Cookbook, published by O'Reilly Media. This book follows now a series of O'Reilly books on R, including an R Cookbook. Winston Chang is a graduate student at Northwestern University but … Continue reading →

Read more »

R package meme

January 16, 2013
By
R package meme

I just got this from a former student who is working on a project with me: Awesome.    

Read more »

Simulated Maximum Likelihood with R

January 16, 2013
By

First update on my research, details here.

Read more »

Timing normal RNGs

January 16, 2013
By
Timing normal RNGs

In previous articles, we have seen that Rcpp can be particularly useful for simulations as it executes code at C++ speed. A very useful feature the API provided by R is the access to the R RNGs so that simulations at the C++ level can get precisely the same stream of random numbers as an R application would. But sometimes...

Read more »

Timing normal RNGs

January 16, 2013
By
Timing normal RNGs

In previous articles, we have seen that Rcpp can be particularly useful for simulations as it executes code at C++ speed. A very useful feature the API provided by R is the access to the R RNGs so that simulations at the C++ level can get precisely the same stream of random numbers as an R application would. But sometimes...

Read more »

The Basics of Betting as a Way of Keeping Score…

January 15, 2013
By
The Basics of Betting as a Way of Keeping Score…

Another preparatory step before I start learning about stats in the context of Formula One… There are a couple of things I’m hoping to achieve when I actually start the journey: 1) finding ways of using stats to help to pull out patterns and events that are interesting from a storytelling or news perspective; 2)

Read more »

Examples combining C++ and R: The Rcpp Gallery

January 15, 2013
By

We've written before about how you can use the Rcpp package to speed up R, by converting performance-critical snippets of R code to C++. (Rcpp makes it easy -- you don't even have to be a C++ expert.) If you haven't tried it out yet, you might want to browse the Rcpp Gallery: an collection of simple but illustrative...

Read more »

"The Dude" takes the Tarantino threshold

January 15, 2013
By
"The Dude" takes the Tarantino threshold

Just as a quick reply to a friend of mine who suggested testing the swearing capabilities of The Dude:Click to enlarge.As you can see, "The Big Lebowski" (2.79 % swear words) takes the Tarantino threshold (0.98 %) easily, but it's no match against "Res...

Read more »

The tsbugs package for R

January 15, 2013
By
The tsbugs package for R

My tsbugs package has gone up on CRAN. The functions in the tsbugs package are aimed to automate the writing of time series models to run in WinBUGS (Lunn et al., 2000) or OpenBUGS (Lunn et al., 2009). I created … Continue reading →

Read more »

A second example of using Boost

January 15, 2013
By
A second example of using Boost

We introduced Boost in a first post doing some integer math. In this post we want to look at the very versatile Boost.Lexical_Cast library to convert text to numbers – see the Motivation for more. As before, I should note that I write this post on a machine with Boost headers in a standard system...

Read more »

Version 1.0 of sqlutils available on CRAN

January 15, 2013
By

Version 1.0 of sqlutils has been released to CRAN. The sqlutils package is designed to manage a library of SQL files. This package grew out of the needs of an Office of Institutional Research where the vast majority of analysis is conducted on data from our Student Information System (SIS) which is stored in an Oracle database. A lot...

Read more »

Reserving based on log-incremental payments in R, part II

January 15, 2013
By
Reserving based on log-incremental payments in R, part II

Following on from last week's post I will continue to go through the paper Regression models based on log-incremental payments by Stavros Christofides . In the previous post I introduced the model from the first 15 pages up to section F. Today I will progress with sections G to K which illustrate the model with a...

Read more »

Warning: Sawtooth’s MaxDiff Is Nothing More Than a Technique for Rank Ordering Features!

January 14, 2013
By

Sawtooth Software has created a good deal of confusion with its latest sales video published on YouTube.  I was contacted last week by one of my clients who had seen the video and wanted to know why I was not using such a powerful technique for me...

Read more »

More new R user groups

January 14, 2013
By

It's been a little while since we've rounded up the new local R user groups around the world, so here are the latest ones on the scene: Edmonton, Canada: The Edmonton R User Group is the first in the Canadian province of Alberta and the most northerly group in North America. It started up back in October last year...

Read more »

Sponsors