October 17, 2011
By

The most recent edition of the Revolution Newsletter is out. The news section is below, and you can read the full October edition (with highlights from this blog and community events) online. You can subscribe to the Revolution Newsletter to get it monthly via email. Applications of R Contest: Deadline October 31. Revolution Analytics is offering \$20,000 in prizes...

## R Tools for FEC Campaign Finance Disclosure Data

October 17, 2011
By

For my first contribution to the blog, I wanted to make some kind of enlightening visualization of campaign finance disclosure data from the Federal Election Commission’s website. It looks like they’re working on some new, easy-to-use data dumps here, but … Continue reading →

## Lattice when modeling, ggplot when publishing

October 17, 2011
By

When working in research projects I tend to fit several, sometimes quite a few, alternative models. This model fitting is informed by theoretical considerations (e.g. quantitative genetics, experimental design we used, our understanding of the process under study, etc.) but … Continue reading →

## Software for Research, Part 3: [R], RStudio and ggplot2 for Statistics

October 17, 2011
By

is an excellent open-source statistics language. It's cross-platform and free and I think it will eventually displace proprietary stat's packages due to its rapid development, speed and ease of use. So there's no time like the present to get used...

## Colors in R

October 17, 2011
By

One of my favorite R packages that I use all the time is the RColorBrewer package. The package has been around for a while now and is written/maintained by Erich Neuwirth. The guts of the package are based on Cynthia Brewer’s very cool work on the us...

## Example 9.10: more regression trees and recursive partitioning with "partykit"

October 17, 2011
By

We discuss recursive partitioning, a technique for classification and regression using a decision tree in section 6.7.3 of the book. Support for these methods is available within the rpart package. Torsten Hothorn and Achim Zeileis have extended the ...

## Backtesting a Simple Stock Trading Strategy: Part 3

October 17, 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 a previous post, I examined a simple stock trading strategy: Find the high point over the la...

## Tikz Nodes

October 17, 2011
By

Nodes are used in tikz to place content in a picture as part of a LaTeX document. Fast Tube by Casper When creating a tikz picture the origin is assumed to be at (0,0) and objects are placed with positioning relative to the origin on the picture. If we wanted to add a grid with

## Installing rgdal on a Mac

October 16, 2011
By

So, installing rgdal, which is an important R package for spatial data analysis can be a bit of a pain on the mac. Here are two ways to make it happen.   The Easy Way In R run: install.packages('rgdal',repos="http://www.stats.ox.ac.uk/pub/RWin") The Hard Way Download and install GDAL 1.8 Complete and  PROJ framework v4.7.0-2   from: http://www.kyngchaos.com/software/frameworks%29 Download the latest version of rgdal from CRAN.

## Running SQL Queries in R With the SQLDF Package

October 16, 2011
By

The sqldf package can be used to run sql queries on R data frames. The user simply needs to specify a sql statement enclosed by quotation marks within the sqldf() function. In the follow R code, you see various ways of using the sqldf package to run sql queries on R data frames. The sql

## Geo-doodlers – Paul Butler and FlowingData

October 16, 2011
By

I found this great R-Visualization example via an R-Blogger post that xingmowang made. (One more good reason for why it is important to read lots of field-related blogs!)Here's the image:If this was merely eye-candy, I would have enjoyed it, but not in...

## Linear mixed models in R

October 16, 2011
By

A substantial part of my job has little to do with statistics; nevertheless, a large proportion of the statistical side of things relates to applications of linear mixed models. The bulk of my use of mixed models relates to the … Continue reading →

## R tells you where weapons go

October 16, 2011
By

As an ameturer programmer (one without proper trainings in any mainstream programming language — C and Java) , the more I use R the more I understand the saying — “You are only bounded by your imagination”. The other day I … Continue reading →

## pscl 1.04 live on CRAN

October 15, 2011
By

Update to my pscl package, now on CRAN. Biggest change: fixing a bug in the way MCMC draws for item parameters were being stored and summarized by ideal.

## National Gallery of Ireland

October 15, 2011
By

During a short if profitable visit to Dublin for a SFI meeting on Tuesday/Friday, I had the opportunity to visit the National Gallery of Ireland in my sole hour of free time (as my classy hotel was very close). The building itself is quite nice, being well-inserted between brick houses from the outside, while providing

## More on higher moments: rolling skewness of S&P 500 daily returns

October 15, 2011
By

In this post, Portfolio Probe explores a way to decide whether market kurtosis and skewness are predictable. Market skewness, in naive financial modeling, is some kind of measure of (as-)symmetrical distribution of (daily) returns around the average market return. A higher skewness would tend to indicate a denser distribution of higher returns, compared to lower

## Once you’re comfortable with 2-arrays and 2-matrices, you…

October 15, 2011
By

Once you’re comfortable with 2-arrays and 2-matrices, you can move up a dimension or two, to 4-arrays or 4-tensors. You can move up to a 3-array / 3-tensor just by imagining a matrix which “extends back into the blackboard”. Like a 5 × 5 ma...

## Once you’re comfortable with 2-arrays and 2-matrices, you…

October 15, 2011
By

Once you’re comfortable with 2-arrays and 2-matrices, you can move up a dimension or two, to 4-arrays or 4-tensors. You can move up to a 3-array / 3-tensor just by imagining a matrix which “extends back into the blackboard”. Like a 5 × 5 ma...

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

October 15, 2011
By

While working for my Financial economics project I came across this elegant tool called Principal component analysis (PCA)which is an extremely powerful tool when it comes to reducing the dimentionality of a data set comprising of highly correlated var...

## Random art on the web

October 15, 2011
By

Since we explored some statitics of an abstract painting with Pierre (we even have an article in Variances last issue!), I became more sensitive to art linked to randomness. Here are some pointers to related websites I have digged out. Random.org, mentioned here by Pierre, is, at it reads, a true random number service that

## Free auditing of Stanford AI and Machine Learning Courses w/Peter Norvig

October 14, 2011
By

Just wanted to notify viewers of a few great courses that are being offered free for auditing and/or participation by well known industry experts, including co-author of the classic text on AI, 'Artificial Intelligence: A Modern Approach,' Peter Norvig...

## Maximum Loss and Mean-Absolute Deviation risk measures

October 14, 2011
By
$Maximum Loss and Mean-Absolute Deviation risk measures$

During construction of typical efficient frontier, risk is usually measured by the standard deviation of the portfolio’s return. Maximum Loss and Mean-Absolute Deviation are alternative measures of risk that I will use to construct efficient frontier. I will use methods presented in Comparative Analysis of Linear Portfolio Rebalancing Strategies: An Application to Hedge Funds by

## Trading Mean Reversion with Augen Spikes

October 14, 2011
By

One of the more interesting things I have come across is the idea of looking at price changes in terms of recent standard deviation, a concept put forward by Jeff Augen. The gist is to express a close to close return as a function of the standard devia...

## New food web dataset

October 14, 2011
By

So, there is a new food web dataset out that was put in Ecological Archives here, and I thought I would play with it. The food web is from Otago Harbour, an intertidal mudflat ecosystem in New Zealand. The web contains 180 nodes, with 1,924 links. Fu...

## Implementing K-means clustering for Hadoop in R and Java

October 14, 2011
By

At the Bay Area R User Group meeting this week, Antonio Piccolboni gave an overview of the design goals and implementation of the RHadoop Project packages that connect Hadoop and R: rhdfs, rhbase and rmr: (The image above was captured from Antionio's slides.) The most revealing part of the talk for me was the comparison of implementing the K-means...

## Tomorrow: ACM Data Mining Camp at eBay

October 14, 2011
By

If you're in the Bay Area, tomorrow would be a great day to head down to San José for the ACM Data Mining Camp. Hundreds of data scientists, data hackers and data miners will be there for a fun "unconference", with talks and practical sessions organized on the spot according to demand. Revolution Analytics is proud to be a...

## Mining Lending Club’s Goldmine of Loan Data Part I of II – Visualizations by State

October 14, 2011
By

I have a few friends that keep bragging about their 14% annual returns by investing their money with Lending Club, a peer-to-peer lending service that cuts out the complexities and difficulties of getting approved for a loan through a bank. To give you an idea of the sheer amount of volume Lending Club has been

## Another Mystery: sas7bdat != sd2

October 14, 2011
By

I received an email from a very inconvenienced statistician a few weeks ago. The problem was an old data file with the extension .sd2. Apparently, this is an obsolete data storage format used by past versions of SAS. A quick glance at the file contents revealed that this sd2 formatted file is incompatible with the