Credit rating by country

January 17, 2012
By
Credit rating by country

The financial crisis has put a lot of pressure on countries' long-term foreign currency credit ratings, with France recently being downgraded by S&P. Wikipedia provides a list of countries by credit ratings as report by US rating agencies S&P, Fitch, ...

Read more »

Infidelity and econometrics

January 17, 2012
By
Infidelity and econometrics

On http://www.bakadesuyo.com, there was recently an interesting discussion about infidelity, the key question being "at what ages are men and women most likely to have affairs?" The discussion is based on some graphs, e.g. The source is a paper b...

Read more »

Illustrating the Deferred Acceptance Algorithm with R

January 17, 2012
By
Illustrating the Deferred Acceptance Algorithm with R

The Deferred Acceptance Algorithm (DAA) goes back to Gale and Shapley (1962). They introduce a rather simple algorithm that finds a stable matching for example for college admissions or in a marriage market. In a marriage market where M men have prefer...

Read more »

Time Series Matching strategy backtest

January 17, 2012
By
Time Series Matching strategy backtest

This is a quick post to address comments raised in the Time Series Matching post. I will show a very simple example of backtesting a Time Series Matching strategy using a distance weighted prediction. I have to warn you, the strategy’s performance is worse then the Buy and Hold. I used the code from Time

Read more »

Quick Introduction to ggplot2

January 17, 2012
By
Quick Introduction to ggplot2

For a much better looking version of this post (where code is actually readable!), see this Github repository, which also contains some of the example datasets I use and a literate programming version of this tutorial. Introduction This is a bare-bones introduction to ggplot2, a visualization package in R. It assumes no knowledge of R

Read more »

Annotating limma Results with Gene Names for Affy Microarrays

January 17, 2012
By
Annotating limma Results with Gene Names for Affy Microarrays

Lately I've been using the limma package often for analyzing microarray data. When I read in Affy CEL files using ReadAffy(), the resulting ExpressionSet won't contain any featureData annotation. Consequentially, when I run topTable to get a list of di...

Read more »

Foreign Currencies and US 10y Treasury Yields

January 17, 2012
By
Foreign Currencies and US 10y Treasury Yields

Since I explored the relationship between the Japanese Yen and the US 10y Treasury Yield on Friday, I thought it might be worthwhile to extend the exploration to a much broader range of currencies. I personally am most interested on how Asian Central B...

Read more »

NYT uses R to map the 1%

January 17, 2012
By
NYT uses R to map the 1%

Last Saturday, the New York Times published a feature article on the wealthiest 1% of Americans. The on-line version of the article included interactive features like this interactive map showing where your household ranks in the country and in local regions. The print edition, however, included some different (and necessarily static) representations of US wealth data, such as this...

Read more »

Time Based Arbitrage Opportunities in Tick Data

January 17, 2012
By
Time Based Arbitrage Opportunities in Tick Data

I recently posted an introduction to the Kaggle Algorithmic Trading Challenge, which I competed in.I said that I would post about my experiences, and this is hopefully the first of a series. We were given tick data from the London Stock Exchange(specifically, the FTSE 100) over random time intervals during parts of 37 days. Each data row...

Read more »

R-Code Yahoo Finance Data Loading

January 17, 2012
By

Quantitative Finance, Technical Trading & Analysis. Fotis Papailias, Dimitrios Thomakos Fotis Quantitative Finance & Technical Trading R-Code Yahoo Finance Data LoadingHere is an R script that downloads Yahoo Finance Data without the need of additional packages/libraries. In the .zip file is the code with an example on how to use it. Download the code here: You can also...

Read more »

Parallel R Loops in Windows and Linux

January 17, 2012
By

Parallel computation may seem difficult to implement and a pain to use, but it is actually quite simple to use. The foreach package provides the basic loop structure, which can utilize various parallel backends to execute the loop in parallel. First, let's go over the basic structure of a foreach loop. To get the foreach package, run the following...

Read more »

How to map geographically-detailed survey responses?

January 17, 2012
By

David Sparks writes: I am experimenting with the mapping/visualization of survey response data, with a particular focus on using transparency to convey uncertainty. See some examples here. Do you think the examples are successful at communicating both local values of the variable of interest, as well as the lack of information in certain places? Also, The post How...

Read more »

Mid-January flotsam: teaching edition

January 17, 2012
By
Mid-January flotsam: teaching edition

I was thinking about new material that I will use for teaching this coming semester (starting the third week of February) and suddenly compiled the following list of links: William Briggs writes It is time to stop teaching Frequentism to … Continue reading →

Read more »

R Ec2

January 17, 2012
By

Running R in the cloud So you want to run R in the cloud so you can set your Gibbs sampling off, forget about it, and not be paranoid about power cuts and reboots. Andrew Gelman hosted a good debate on the pros and cons of R in the cloud on his blog. ...

Read more »

Backtesting a Trading Strategy

January 16, 2012
By
Backtesting a Trading Strategy

I've ordered Time Series Analysis and Its Applications: With R Examples (Springer Texts in Statistics) to help me up the time series in R learning curve. So far what I have seen it looks good. The author has a good page with the issues in R and time ...

Read more »

R jumps from 25 to 19 in annual TIOBE rankings of programming language popularity

January 16, 2012
By
R jumps from 25 to 19 in annual TIOBE rankings of programming language popularity

The TIOBE index ranks popularity of programming languages according to their prevalence on the web. Back in February last year, the R language had risen to #25 in the charts, overtaking both SAS and Matlab. Earlier this month, TIOBE published its annual rankings of programming language popularity for 2011 and R has risen once again: it now ranks #19...

Read more »

A slice of S&P 500 skewness history

January 16, 2012
By
A slice of S&P 500 skewness history

How symmetric are the returns of the S&P 500? How does the skewness change over time? Previously We looked at the predictability of kurtosis and skewness in S&P constituents.  We didn’t see any predictability of skewness among the constituents.  Here we look at skewness from a different angle. The data Daily log returns of the … Continue reading...

Read more »

CRdata.org to shut down?

January 16, 2012
By

If you’re one of the R-bloggers or useRs, most probably you had heard about Crdata.org. In the early day, they are two very R related cloud computing services, one is CloudNumbers, another is CrData.org. Recently, we (may) received an email by Hamid ...

Read more »

Project Euler in R: Problem 23

January 15, 2012
By

I was just looking through the programming language statistics on Project Euler. It shows that only 7% of the problems have been solved in R, whereas 8% have been solved on any kind of spreadsheet.  This is outrageous!Let's look at the solution of...

Read more »

Scraping table from any web page with R or CloudStat

January 15, 2012
By
Scraping table from any web page with R or CloudStat

Scraping table from any web page with R or CloudStat: You need to use the data from internet, but don’t type, you can just extract or scrape them if you know the web URL. Thanks to XML package from R. It provides amazing readHTMLtable() function. For...

Read more »

Crawling facebook with R

January 15, 2012
By
Crawling facebook with R

So, let's crawl some data out of facebook using R. Don't get too excited though, this is just a weekend whatif project. Anyway, so for example, I want to download some photos where I'm tagged. First, we need an access token from facebook. I don't know how to get this programmatically, so let's get one manually, log on to facebook...

Read more »

Statistical Methods for the Chain Ladder Technique Revisited

January 15, 2012
By
Statistical Methods for the Chain Ladder Technique Revisited

Statistical Methods for the Chain Ladder Technique Revisited: Source: Statistical Methods for the Chain Ladder Technique Demo Background Forecasting outstanding claims and setting up suitable reserves to meet these claims is an important part of the b...

Read more »

R-squared for multilevel models

January 15, 2012
By

Fred Schiff writes: I’m writing to you to ask about the “R-squared” approximation procedure you suggest in your 2004 book with Dr. Hill. I’m a media sociologist at the University of Houston. I’ve been using HLM3 for about two years. Briefly about my data. It’s a content analysis of The post R-squared...

Read more »

Merging two data.frame objects while preserving the rows’ order

January 15, 2012
By
Merging two data.frame objects while preserving the rows’ order

Merging two data.frame objects in R is very easily done by using the merge function. While being very powerful, the merge function does not (as of yet) offer to return a merged data.frame that preserved the original order of, one of the two merged, data.frame objects. In this post I describe this problem, and offer Read more...

Read more »

R and MODFLOW

January 15, 2012
By
R and MODFLOW

Here are some functions for reading and writing MODFLOW files from R. I hope to update this in the future!################################################################################### read.modflow.pval ############################################...

Read more »

Big media waking up to big data

January 14, 2012
By
Big media waking up to big data

A recent Globe and Mail column points out that by 2018 in the United States alone there will be a shortfall of 190,000 specialists with deep analytical talent. It is good to see that the mainstream media is waking up to the need for applied training in data analytics. ...

Read more »

Moving window filters and the pracma package

Moving window filters and the pracma package

In my last post, I discussed the Hampel filter, a useful moving window nonlinear data cleaning filter that is available in the R package pracma.  In this post, I briefly discuss this moving window filter in a little more detail, focusing on two important practical points: the choice of the filter’s local outlier detection threshold, and the question of...

Read more »

Welcome Back, Me

January 14, 2012
By

It's been a few weeks since I last posted.  Sorry about that.  Unfortunately, sometimes you come home from work just not wanting to look at a computer.I'm working on a series of posts requested by a few friends.  They would like to see m...

Read more »

Prediction model with HANA and R

January 14, 2012
By
Prediction model with HANA and R

These days, I have been reading and playing a lot with R, and I really come to love it...of course, I don't have a clue on those weird statistics formulas, but it doesn't mean I can't use R and try do some awesome stuff with it.So, yesterday I was thin...

Read more »