October 25, 2011
By

Mr.Ishikawa(my old friend) and I developed "PairTrading" package, and uploaded it on CRAN.This article shows you how you can use it.The pair trading is a market neutral trading strategy and gives traders a chance to profit regardless of market conditions. The idea of this strategy is quite simple. 1 : Select two stocks(or any assets) moving similarly 2 : Short...

## Approximate Bayesian computational methods on-line

October 25, 2011
By

Fig. 4 – Boxplots of the evolution of ABC approximations to the Bayes factor. The representation is made in terms of frequencies of visits to models MA(1) and MA(2) during an ABC simulation when ε corresponds to the 10,1,.1,.01% quantiles on the simulated autocovariance distances. The data is a time

## Machine Learning Ex 5.1 – Regularized Linear Regression

October 25, 2011
By

The first part of the Exercise 5.1 requires to implement a regularized version of linear regression. Adding regularization parameter can prevent the problem of over-fitting when fitting a high-order polynomial. Read More: 194 Words Totally

## Vanilla C code for the Stochastic Simulation Algorithm

October 24, 2011
By
$Vanilla C code for the Stochastic Simulation Algorithm$

The Gillespie stochastic simulation algorithm (SSA) is the gold standard for simulating state-based stochastic models. If you are a R buff, a SSA novice and want to get quickly up and running stochastic models (in particular ecological models) that are not … Continue reading →

## Simple Heatmap in R with Formula One Dataset

October 24, 2011
By

Now, that the 2011 F1 season is over I decided to quickly scrub the Formula 1 data of the F1.com website, such as the list of drivers, ordered by the approximate amount of salary driver is getting (top list driver is making the most, approx. 30MM) and position at the end of each race. There

## Two seasonal investors – R snippet

October 24, 2011
By

In “A tale of 2 Seasonal Investors“, the Big Picture discusses the simple idea of comparing two simple investment approaches: being exposed to the market 6 months every year (from November to April), as opposed to investing in the other 6 months of every year (from May to October). Going back 50 years in the

## NYT on Big Data and R

October 24, 2011
By

In the New York Times' "Bits" blog today, Quentin Hardy offers recollections on Big Data talks at the recent Web 2.0 Summit. He begins with a definition of Big Data: Big Data is really about ... the benefits we will gain by cleverly sifting through it to find and exploit new patterns and relationships. You see it now in...

## Show me your WAR face!

October 24, 2011
By

Below is a chart of the top 20 offensive players based on FanGraphs WAR for the 2011 season.  The various features and their corresponding metric are clear in the image. I’ve also included the leader and last place for each … Continue reading →

## XLConnect 0.1-7

October 24, 2011
By

Mirai Solutions GmbH (http://www.mirai-solutions.com) is pleased to announce the availability of XLConnect 0.1-7. This release includes a number of improvements and new features: Performance improvements when writing large xlsx files New workbook data extraction & replacement operators [, [<-, [[, … Continue reading →

## Parameter vs. Observation Dimension?

October 24, 2011
By

Bill Bolstad's response to Xi'an's review of his book Understanding Computational Bayesian Statistics included the following comment, which I found interesting: Frequentist p-values are constructed in the parameter dimension using a probability distribution defined only in the observation dimension. Bayesian credible intervals are constructed in the parameter dimension using a probability distribution in the parameter

## R Tutorial Series: Exploratory Factor Analysis

October 24, 2011
By

Exploratory factor analysis (EFA) is a common technique in the social sciences for explaining the variance between several measured variables as a smaller set of latent variables. EFA is often used to consolidate survey data by revealing the groupings ...

## A Simple Example for the Use of Shapefiles in R

October 24, 2011
By

A simple example for drawing an occurrence-map (polygons with species' points) with the R-packages maptools and sp using shapefiles.HERE is the example data.Read more »

## How to compute portfolio returns badly

October 24, 2011
By

For those who naturally compute portfolio returns correctly here are some lessons in how to do it wrong. The data Random portfolios were generated from constituents of the S&P 500 with constraints: long-only exactly 20 assets in the portfolio no more than 10% weight for any asset (just for fun) the sum of the 5 … Continue reading...

## Machine Learning Ex4 – Logistic Regression

October 24, 2011
By

Exercise 4 required implementing Logistic Regression using Newton's Method. The dataset in use is 80 students and their grades of 2 exams, 40 students were admitted to college and the other 40 students were not. We need to implement a binary classification model to estimates college admission based on the student's scores on...

## Isarithmic Maps of Public Opinion Data

October 24, 2011
By

As a follow-up to my isarithmic maps of county electoral data, I have attempted to experiment with extending the technique in two ways. First, where the electoral maps are based on data aggregated to the county level, I have sought to generalize the method to accept individual responses for which only zip code data is … Continue reading →

## Normality tests don’t do what you think they do

October 23, 2011
By

Last week a question came up on Stack Overflow about determining whether a variable is distributed normally. Some of the answers reminded me of a common and pervasive misconception about how to apply tests against normality. I felt the topic was general enough to reproduce my comments here (with minor edits). Misconception: If your statistical analysis requires normality, it is

October 23, 2011
By

Bill Bolstad wrote a reply to my review of his book Understanding computational Bayesian statistics last week and here it is, unedited except for the first paragraph where he thanks me for the opportunity to respond, “so readers will see that the book has some good features beyond having a “nice cover”.” (!) I simply processed

## The Zipf and Zipf-Mandelbrot distributions

In my last few posts, I have been discussing some of the consequences of the slow decay rate of the tail of the Pareto type I distribution, along with some other, closely related notions, all in the context of continuously distributed data.  Today’s post considers the Zipf distribution for discrete data, which has come to be extremely popular as...

## Using Sweave with XeLaTeX

October 23, 2011
By

Using R with LaTeX via Sweave is a great way to create reproducible output. However, using specific fonts, e.g. your corporate fonts, can be painful with pdflatex. Over the last few weeks I have fallen in love with the TeX formatXeLaTeX and its XeTeX e...

## A Little Webscraping-Exercise…

October 22, 2011
By

In R it's quite easy to pull out anything from a webpage and I'll show a little exercise in doing so.Here I retrieve all blog addresses from R-bloggers by the function readLines() and some subsequent data processing.Read more »

## Principal component analysis : Use extended to Financial economics : Part 2

October 22, 2011
By

My previous post talked about how we can employ PCA on the data for multiple stock returns to reduce the number of variables in explaining the variance of the underlying data. But the idea was greeted with skepticism by many. A caveat to the applicatio...

## Support Vector Machine with GPU, Part II

October 21, 2011
By

In our last tutorial on SVM training with GPU, we mentioned a necessary step to pre-scale the data with rpusvm-scale, and to reverse scaling the prediction outcome. This cumbersome procedure is now simplified with the latest RPUSVM. read more

## High-schoolers celebrate World Statistics Day

October 21, 2011
By

Rose Hoffmann, AP Statistics teacher at Catholic Memorial High School in Waukesha, WI sent the following note to the Revolution Analytics team: In August 2010, my husband who is a statistician attended the American Statistical convention. Your company gave out the flying monkey with a black cape ... He gave me the monkey since it was my first year...

## Teaching with R: the switch

October 21, 2011
By

There are several blog posts, websites (and even books) explaining the transition from using another statistical system (e.g. SAS, SPSS, Stata, etc) to relying on R. Most of that material treats the topic from the point of view of i- … Continue reading →

## ggplot2 for big data

October 21, 2011
By

(Hadley Wickham, author of ggplot2 and several other R packages, guest blogs today about forthcoming big-data improvements to his R graphics package -- ed.) Hi! I'm Hadley Wickham and I'm guest posting on the Revolutions blog to give you a taste of some of the visualisation work that my research team and I worked on this summer. This work...

## Backtesting Part 4: random strategies

October 21, 2011
By

Note: This post is NOT financial advice!  This is just a fun way to explore some of the capabilities R has for importing and manipulating data.   In part 2, we found that our 200-day high, hold 100 days strategy yielded average annual return...

## Predictability of stock returns : Using runs.test()

October 21, 2011
By

Financial market is interesting place, you find people taking positions (buying/selling) based on their expectations of what the security prices would be and are rewarded/penalized according to the accuracy of their expectations. The beauty of financia...