## A Prototype of Monotonic Binning Algorithm with R

May 4, 2013
By

I’ve been asked many time if I have a piece of R code implementing the monotonic binning algorithm, similar to the one that I developed with SAS (http://statcompute.wordpress.com/2012/06/10/a-sas-macro-implementing-monotonic-woe-transformation-in-scorecard-development) and with Python (http://statcompute.wordpress.com/2012/12/08/monotonic-binning-with-python). Today, I finally had time to draft a quick prototype with 20 lines of R code, which is however barely useable without the

## Backporting R 3.0.0 to Quantal, Precise, and Lucid

May 4, 2013
By

Today (May 4, 2013) I will begin the process of backporting R 3.0.0 to Quantal, Precise, and Lucid. This will include all the recommended packages and the packages for R found in the universe repository for Ubuntu. Things to keep in mind: If you do...

## LaTeX in R graphs

May 3, 2013
By

A nice post was recently published on the rsnippets blog, about the tikzDevice R package. This package is – indeed – awesome. Even if it has been removed from the CRAN website. Of course, it can be download from the archive folder, on http://cran.r-project.org/…, but also (for a more recent version)  on http://download.r-forge.r-project.org/…. But first, it is necessary to install...

## Animation, from R to LaTeX

May 3, 2013
By
$X_{i,j}\sim\mathcal{B}(1/2)$

Just a short post, to share some codes used to generate animated graphs, with R. Assume that we would like to illustrate the law of large number, and the convergence of the average value from binomial sample. We can generate samples  using > n=200 > k=1000 > set.seed(1) > X=matrix(sample(0:1,size=n*k,replace=TRUE),n,k) Each row  will be a trajectory of heads and...

## Old Post with New d3 Life–GARCH and MA Performance

May 3, 2013
By

Parallel coordinates become much more useful when they are interactive, so I recreated one of my favorite blog posts "Trend is Not Your Friend" Applied to 48 Industries and convert the chart to a living breathing d3 parallel coordinates chart courtesy ...

## Extending RevoScaleR for Mining Big Data – Naive Bayes

May 3, 2013
By

by Derek McCrae Norton, Senior Sales Engineer In this third installment (following part 1 and part 2) of Extending RevoScaleR for Mining Big Data we look at how to use the building blocks provided by RevoScaleR to create a Naive Bayes model. Motivation: Fit a Naive Bayes model to big data. Naive Bayes is a simple probabilistic classifier based...

## All About Spherically Distributed Regression Errors

May 2, 2013
By

This post is based on a handout that I use for one of my courses, and it relates to the usual linear regression model,                                   y = Xβ + ε In our list of standard assumptions about the error term in this linear multiple regression...

## Improved R Profiling Summaries

May 2, 2013
By

In my last post I mentioned that I had improved on R’s summaryRprof() function with a custom function called proftable(). I’ve updated proftable() to take advantage of R 3.0.0’s ability to record line numbers while profiling. I’ve put it on github – you can get it there or below. proftable reads in a file generated by...

## …learning LaTeX, from scratch!

May 2, 2013
By

” LaTeX is a high-quality typesetting system; it includes features designed for the production of technical and scientific documentation, and is the de facto standard for the communication and publication of scientific documents.” It is also… Free and Open. Specially … Sigue leyendo →

## How R Grows

May 2, 2013
By

by Joseph Rickert Saturday morning I was drinking my coffee wondering how much effort goes into R worldwide. (It’s my job.) I noticed that there were 4469 packages on CRAN, and it occurred to me that tabulating the packages by publication date would give some indication of how much effort is being expended to improve packags and keep them...

## Changing The Presidential Election with R in the Browser

May 2, 2013
By

After I finished with the tutorial post d3 <- R with rCharts and slidify and then saw R creates d3/javascript charts in Ipython Style Notebook, a light clicked.  I could finally answer the lingering question I have had ever since I saw the NYT ...

## Do Torontonians Want a New Casino? Survey Analysis Part 1

May 2, 2013
By

Toronto City Council is in the midst of a very lengthy process of considering whether or not to allow the OLG to build of a new casino in Toronto, and where.  The process started in November of 2012, and set … Continue reading →

## Why Blog?

May 2, 2013
By

The Blog Review ProcessA series of events in my life have lead me to reconsider the value of blogging.The Back StoryShort story: I got fired.Long story: Recently I was hired to write occasional blog posts for Quandl. They probably figured that due to m...

## Writing from R to Excel with xlsx

May 1, 2013
By

Paul Teetor, who is doing yeoman’s duty as one of the organizers of the Chicago R User Group (CRUG), asked recently if I would do a short presentation about a “favorite package”.  I picked xlsx, one of the many packages that provides a bridge between spreadsheets and R.  Here are the slides from my presentation

## NYT uses R to investigate NFL draft picks

May 1, 2013
By

Last week, the New York Times published online an interactive tool to explore NFL draft picks, revealing the fact that there's not much relationship between an early pick and the star performers in the season: Kevin Quealy, graphics editor at the NYT, detailed the process behind creating this graphic on his chartsnthings blog. He and others on the graphics...

## TV shows rated by episode as a Shiny App

May 1, 2013
By

A few days ago there was an interesting R based article by diffuseprior on the decline and fall in the quality of The Simpsons The author scraped results from GEOS, an online survey of TV programs, and applied the R package changepoint to offer an analysis of the show over time This seemed a candidate

## R for dummies

May 1, 2013
By

I already mentioned R for dummies a while ago on the ‘Og and never got around to read it from cover to back. Now that I am reduced to a dummy state with too much free time!, I can produce a full review of the book. R for dummies was written by two Belgian statistics

## …start using Sweave, from scratch!

May 1, 2013
By

INTRODUCTION Sweave is nothing more, nothing less than the best way R can connect with a text editor, in this case LaTeX. So you don’t know anyting about LaTeX? neither did I 8 months ago… The hyperlinks in this post … Sigue leyendo →

## R creates d3/javascript charts in Ipython Style Notebook

May 1, 2013
By

I am not sure I have ever done a post like this, but I was so blown away I had to do this post simply to embed this amazing Youtube video from the author of the R packages rCharts and slidify.  Watch this screencast as he creates d3/raphael charts...

## Book Review: The R Book, Second Edition (2013)

May 1, 2013
By

The first edition of The R Book by Michael J. Crawley was an ambitious work, but managed to be slightly rubbish due to the atrocious typographical layout of the original book. The good news is that the new 2nd edition, released in 2013, has a substanti...

## A Crash Course in R

May 1, 2013
By

This code has been kindly contributed by Robin Edwards

## Color analysis of Flickr images

May 1, 2013
By

Since I’ve seen this beautiful color wheel visualizing the colors of Flickr images, I’ve been fascinated with large scale automated image analysis. At the German Market Research association’s conference in late April, I presented some analyses that went in the same direction (click to enlarge): On the image above you can see the color

## A pathological glm() problem that doesn’t issue a warning

May 1, 2013
By

I know I have already written a lot about technicalities in logistic regression (see for example: How robust is logistic regression? and Newton-Raphson can compute an average). But I just ran into a simple case where R‘s glm() implementation of logistic regression seems to fail without issuing a warning message. Yes the data is a Related posts:

## All you need is text – Markdown (via pandoc) for academia

May 1, 2013
By

Many students struggle to find an adequte format for their thesis. Ironically the advent of “modern” WYSIWYG programms seems to make it harder to consistently format a text. While learning LaTeX may be a bit too much to ask for, markdown is a very minimal language that together with pandoc affords all typesetting needs for

## Volatility Regimes: Part 1

This is a ‘do over’ of a project I started while at my former employer in the fall of 2012. I presented part 1 of this framework at the FX Invest West Coast conference on September 11, 2012. I have made some changes and expanded the analysis since then. Part 2 is complete and will follow this post in...

## Le Monde puzzle [#818]

April 30, 2013
By

The current puzzle is as follows: Define the symmetric of an integer as the integer obtained by inverting the order of its digits, eg 4321 is the symmetric of 1234. What are the numbers for which the square is equal to the symmetric of the square of the symmetric? I first consulted stackexchange to find

## Missing tikzDevice

April 30, 2013
By

I love using tikzDevice. When preparing LaTeX documents I switched to prepare all graphs in GNU R and then port them to TeX using tikzDevice. Recently I have moved to GNU R 3.0.0 and was shocked to find that this package is no longer available on CRAN....

## What the BBC isn’t telling you

April 30, 2013
By

Yesterday Gareth pointed me to this article on the BBC website. The underlying story has to do with Meredith Kercher's murder and the subsequent trial involving mainly her flat-mate Amanda Knox, in Perugia (Italy). As often in these grue...

## Integrating Documentation and Calculation

April 30, 2013
By

Integrating Documentation and Calculation Integrating Documentation and Calculation This post is a first in that I've authored it using RStudio. I would guess most people who work in computational finance or quantitative risk are at least familiar with R. Unfortunately R as...