Mebane Faber Tactical Asset Allocation in R

April 13, 2012
By

In 2006 Mebane Faber published a great piece of research detailing an asset allocation system that was both very easy to understand and implement, as well as carrying very respectable risk adjusted returns.The details are available in his paper&nb...

Read more »

US House Prices, Default and Bankruptcy Rates in R

April 13, 2012
By
US House Prices, Default and Bankruptcy Rates in R

Some time ago I got inspired by a post on r-bloggers.com, showing the housing bubble in several US cities, nicely done with ggplot. I extended this to incorporate two measures of problems in the consumer credit markets: the percentage of people with a ...

Read more »

Getting knitr to work with StatET

April 13, 2012
By
Getting knitr to work with StatET

StatET (an Eclipse plug-in that can handle, among other things, R) offers support for writing Sweave (.Rnw) documents. This is done via the external tool dialog, where one creates a new “device” that takes in a document and runs it over appropriate functions and programs. In this case, Sweave and LaTeX. This dialog can, however,

Read more »

Comparing all quantiles of two distributions simultaneously

April 13, 2012
By
Comparing all quantiles of two distributions simultaneously

Summary: A new function in the WRS package compares many quantiles of two distributions simultaneously while controlling the overall alpha error. When comparing data from two groups, approximately 99.6% of all psychological research compares the central tendency (that is a … Continue reading →

Low Volatility with R

Low volatility and minimum variance strategies have been getting a lot of attention lately due to their outperformance in recent years. Let’s take a look at how we can incorporate this low volatility effect into a monthly rotational strategy with a basket of ETFs. Performance Summary from Low Volatility Test in quantstrat Starting Equity: 100,000 … Continue reading...

Read more »

R in the CPB and the role of Open Source in Promoting Transparency and Austerity

April 12, 2012
By

The Revolution blog links to an O'Reilly  interview with two CIO's from the Consumer Protection Bureau. The gist of the interview is "Open Source is Great, we are using it for everything; R and Big Data are the next hot thing, et cetera".  I ...

Read more »

R in the CPB and the role of Open Source in Promoting Transparency and Austerity

April 12, 2012
By

The Revolution blog links to an O'Reilly  interview with two CIO's from the Consumer Protection Bureau. The gist of the interview is "Open Source is Great, we are using it for everything; R and Big Data are the next hot thing, et cetera".  I ...

Read more »

RcppArmadillo 0.3.0.1 released and on CRAN

April 12, 2012
By

Conrad Sanderson released a bug-fix version 3.0.1 following up on the very recent 3.0.0 version of his excellent Armadillo C++ template library for linear algebra. I made a new RcppArmadillo release 0.3.0.1 which just appeared on CRAN. The short ...

Read more »

In case you missed it: March 2012 Roundup

April 12, 2012
By

In case you missed them, here are some articles from March of particular interest to R users. New features in the latest version of ggplot2 include choropleths, violin plots, and improved annotations. A video demonstration of big-data Naive Bayes and Classification Tree models with Revolution R Enterprise for IBM Netezza. A collection of two-minute video tutorials for R beginners....

Read more »

CORRGRAM: Correlation Matrix (Constituents)

April 12, 2012
By
CORRGRAM: Correlation Matrix (Constituents)

Thanks a lot to Kevin W., for his comment in my previous post.Corrgram, it a nice package and I found very nice information to understand it a little bit better on Internet apart from the R help page.Corrgrams: Exploratory displays for correlation matr...

Read more »

sixty two-minute r twotorials now available

April 12, 2012
By

sixty twotorials now posted. two minutes each.new video highlights:024 how to run counts, tables, crosstabs, and flat tables on a data frame in r 030 what is a function anyway and how does it input and output stuff in r 022 how to generate b...

Read more »

Ggplot2 notes part 2

April 12, 2012
By

Here is part 2 of my guide to using ggplot2. Scales Following on directly from the previous notes you can manually adjust the colours and shapes used in the chart if you don’t like the defaults, as shown in figure 1. … Continue reading &#8...

Read more »

Fun Editing R Graphs in Inkscape

April 12, 2012
By
Fun Editing R Graphs in Inkscape

Last week, I read a chapter out of Visualize This by Nathan Yau.  I was, of course, delighted to see that he was championing the use of R.  One really cool thing that I learned from his book, and was very … Continue reading →

Read more »

M-O-M vs Y-O-Y inflation rates in India

April 12, 2012
By
M-O-M vs Y-O-Y inflation rates in India

Some time back I came across this article, by one of our alumni who is currently at NIPFP, which presents some caveats and shortcomings of different measure of inflation in India in a concise manner. Since my master's thesis topic revolves around infla...

Read more »

Statistical Software Popularity on Google Scholar

April 12, 2012
By
Statistical Software Popularity on Google Scholar

Background (probably boring) Several months ago, my boss and I were discussing how he got the data for his software popularity article; the rest of the background discussion pertains to those plots, so I would recommend going over to take a look before continuing on (or just skip to the next section if you're impatient).  Specifically, we were talking...

Read more »

Weighted t-Test in R

April 12, 2012
By

Although there is a weighted.mean function in R, so far I couldn’t find a implementation of weighted.var and weighted.t.test – here they are (the weighted variance is from Gavin Simpson, found on the R malining list): ?View Code RSPLUS# weighted … Continue reading →

Read more »

R, Julia and the shiny new thing

April 12, 2012
By
R, Julia and the shiny new thing

My head exploded a while ago. Perhaps not my head but my brain was all mushy after working every day of March and first week of April; an explanation—as good as any—for the post hiatus. Back to the post title. … Continue reading →

Read more »

How to work with Google n-gram data sets in R using MySQL

April 12, 2012
By
How to work with Google n-gram data sets in R using MySQL

In this R tutorial you will learn how to work with Google n-gram data sets with the help of MySQL. The complete R code is included in this post.

Read more »

How to work with Google n-gram data sets in R using MySQL

April 12, 2012
By
How to work with Google n-gram data sets in R using MySQL

Introduction Google Ngram is a corpus of n-grams compiled from data from Google Books. Here I’m going to show how to analyze individual word counts from Google 1-grams in R using MySQL. I’ve also written an R script to automatically extract and plot multiple word counts. To read more about the datasets go to: http://books.google.com/ngrams/datasets. Of...

Read more »

Nick Stokes Distance code, now with Big Memory

April 12, 2012
By
Nick Stokes Distance code, now with Big Memory

In my last post I was struggling with getting a big memory version of the distance matrix to work fast. Nick and other readers had some suggestions and after puttering around with Nicks code I’ve adapted it to big memory and not impacted the run time very much. For comparison writing a 10K by 10K

Read more »

Video: Quantitative Neuroimaging with R

April 11, 2012
By
Video: Quantitative Neuroimaging with R

The following video was recorded at Melbourne R Users. A summary of the talk is as follows: Recent advances in medical imaging allow us to routinely acquire highly detailed images of the living human brain. These images can be used … Continue reading →

Read more »

Generate artificial DNA or protein sequences in R in a single line of code.

April 11, 2012
By
Generate artificial DNA or protein sequences in R in a single line of code.

To generate an artificial DNA sequence of  "n" bases long with a fixed composition bias in just one line of code, just open your R prompt and type:seqX <- sample(c("A","C","G","T"),10000,rep=TRUE,prob=c(0.4,0.1,0.1,0.4))As you see, the alphabet...

Read more »

Epic R is Epic <- Beginners command reference card

April 11, 2012
By
Epic R is Epic <-  Beginners command reference card

This reference card has been written by Tom Short.Click the image to see the R magic:Thank you for your support Tom.Benjamin

Read more »

Quick Hit: which() and match() are not the same

April 11, 2012
By

What’s the difference between using which() and match() in R? For me - about 10 hours! Today I was doing some string matching in R. In my experience performing any sort of regex or string manipulation in R is a mistake....

Read more »

Big Data, R and HANA: Analyze 200 Million Data Points and Later Visualize Using Google Maps

April 11, 2012
By
Big Data, R and HANA: Analyze 200 Million Data Points and Later Visualize Using Google Maps

Technologies: SAP HANA, R, HTML5, D3, Google Maps, JQuery and JSONFor this fun exercise, I analyzed more than 200 million data points using SAP HANA and R and then brought in the aggregated results in HTML5 using D3, JSON and Google Maps APIs.  Th...

Read more »

Latex Allergy Cured by knitr

April 11, 2012
By
Latex Allergy Cured by knitr

I have always known that at some point I would have to succumb to the power of Latex, but Latex has been uncharacteristically intimidating to me.  I finally found the remedy to my Latex allergy with the amazing and fantastic knitr package from Yih...

Read more »

Stop squinting at word clouds in the hope of getting insights

April 11, 2012
By
Stop squinting at word clouds in the hope of getting insights

Someone recently asked on twitter about about peoples' preferences for cloud generators in R. I replied that I thought the "null" word cloud generator was best. By this I mean that I think the word cloud is a bad visualization method. Why? Here is one article with a good perspective, but you can search for

Read more »

Flying: Boredom and Terror

April 11, 2012
By
Flying: Boredom and Terror

Data represents all planes (not just commercial planes) for the United States "There are only two emotions on a plane: boredom and terror." -- Orson Welles, interview to celebrate his 70th birthday, The Times of London, 6 May 1985. ...

Read more »

The age of sail, visualized

April 11, 2012
By

As anyone who's ever played Civilization knows, the advent of sailboats capable of crossing the oceans leads to an explosion of exploration, commerce and social development. And with the visualization below, you can see that explosion in action: Ben Schmidt used the R language and data recorded in by hand in ship logs to create the animation above. Like...

Read more »

Sponsors