July 20, 2012
By

Last week it was announced that Facebook is rotating its ads after a certain time of exposure. Sid Suri, Preston McAfee, and Dan Goldstein's research may have been the source of this idea. In 2011 and 2012 the trio published a couple papers putting for and improving the idea. The post Time-based internet advertising appeared first on Decision Science...

## Volatility and Correlation

July 19, 2012
By

The implied option volatility reflects the price premium an option commands. A trader’s profit and loss ‘P&L’ from hedging option positions is driven to a large extend by the actual historical volatility of the underlying assets. Thus as option premiums … Continue reading →

## Coke vs Soda vs Pop : Linguistic trends analyzed with Twitter and R

July 19, 2012
By

Growing up in Australia, for me a carbonated drink like Pepsi or Fanta or lemonade was always just a "soft drink". (Also, 'lemonade' in Australia was something different to 'lemonade' in the US; it's something close to 7-Up.) So when I moved to Seattle, it was surprising to me that all such things were called "pop". And then I...

## Course at Monash (#2)

July 19, 2012
By

Here are the slides for the second day of my course at Monash University, Melbourne, in the Special Lectures in Econometrics, with a strong strong similarity with the slides of my course in Roma this Spring. (Ah, sunny Roma…) The first day lecture was very well attended and I hope this remains true for the

## Hierarchical Cluster Analysis (ChemoSpec) – 02

July 19, 2012
By

This is the second derivative spectra of the raw spectra we have sawn in the post: "Hierarchical Cluster Analysis (ChemoSpec) - 01". In that post we saw some clusters, but the distance between the clusters was not high, so it was clear that some m...

## Best of Axys, R, d3.js, and HTML5

July 19, 2012
By

Axys, R, d3.js, and HTML5 all offer incredibly powerful tools for investment management and reporting, but they are not set up to synergistically interact to fill each other’s gaps and leverage each other’s strengths.  In my ideal scenario, Ax...

## Outer Product of Character Vectors in R

July 19, 2012
By

What follows is like a kata to strengthen your R fundamentals. The lovely stats in the wild recently posted some hott data analysis of Olympians’ ages and sexes. Because I’m annoyingly picky about graphics, I asked for his code so I could ...

## Health Care Costs – Part 3, "Why You Are Paying More"

July 19, 2012
By

Malpractice - A Booming Industry? Perhaps authors Frank Sloan, Randall Bovbjerg and Penny Githens capture it best from their book Insuring Medical Malpractice: "If aging Doctor Kildare were to return to medical practice today, having been...

## self-organizing map in R

July 19, 2012
By

This is my first SOM figure :)Thanks to the som package and example code from Jun Yan. Here is my code for the figure:require(som)rpkm <- Tx_rpkmrpkm.f <- filtering(rpkm, lt=10, ut=30000, mmr=2, mmd=10)# rpkm.f=log(rpkm.f+0.1) # t...

## Random Forest Variable Importance

July 19, 2012
By

Random forests ™ are great. They are one of the best "black-box" supervised learning methods. If you have lots of data and lots of predictor variables, you can do worse than random forests. They can deal with messy, real data. If there are lots of extraneous predictors, it has no problem. It automatically does a good job...

## A weighting function for ‘nls’ / ‘nlsLM’

July 19, 2012
By
$A weighting function for ‘nls’ / ‘nlsLM’$

Standard nonlinear regression assumes homoscedastic data, that is, all response values are distributed normally.  In case of heteroscedastic data (i.e. when the variance is dependent on the magnitude of the data), weighting the fit is essential. In nls (or nlsLM of the minpack.lm package), weighting can be conducted by two different methods: 1) by supplying

## Video: knitr, R Markdown, and R Studio: Introduction to Reproducible Analysis

July 19, 2012
By

This post presents the video of a talk that I presented in July 2012 at Melbourne R Users on using knitr, R Markdown, and R Studio to perform reproducible analysis. I also provide links to a github repository where the R markdown examples can be examin...

## Universal portfolio, part 8

July 18, 2012
By

We extend the analysis of part 7 by calculating the final wealth for all tuples of 3 and 4 stocks, this is a simple extension but it also shows the most important problem of the Universal portfolio algorithm, its exponential complexity in the number of...

## Mapping Public Opinion: A Tutorial

July 18, 2012
By

At the upcoming 2012 summer meeting of the Society of Political Methodology, I will be presenting a poster on Isarithmic Maps of Public Opinion. Since last posting on the topic, I have made major improvements to the code and robustness of the modeling approach, and written a tutorial that illustrates the production of such maps. This … Continue reading →

## Time zones

July 18, 2012
By

Say we have some following raw data. It consists of a timestamp and a corresponding value. There is a peak at exactly midnight (00:00:00). Each timestamp is fully specified. It contains a date, a time of day, and a time zone offset indication. In this case +0000, meaning the data is 0 hours away the UTC timezone. "timestamp","value""25-04-2012...

## Course at Monash (#1)

July 18, 2012
By

Here are the slides for the first day of my course at Monash University, Melbourne, in the Special Lectures in Econometrics, with a strong similarity with the slides of my course in Wharton, two years ago. (Be sure to check slide 67! If the update on slideshare works from my flat in Melbourne…) Filed under:

## Gamification Quantification

July 18, 2012
By

Surveys become engaging when they become games, or at least, take on some of the characteristics of games.  This is the argument made by those advocating the gamification of marketing research [http://researchaccess.com/2011/12/market-researc...

## bubble plot in R

July 18, 2012
By

Motived by the post from FlowingData(http://flowingdata.com/2010/11/23/how-to-make-bubble-charts/), I made this plot with R code below:par(mfrow=c(3,1), mar=c(4,6,4,4))for(ty in c("protein_coding","lincRNA","piRNA")){          ...

## A closer look at data suggests Johns Hopkins is still the #1 US hospital

July 18, 2012
By

The US News best hospital 2012-20132 rankings are out. The big news is that Johns Hopkins has lost its throne. For 21 consecutive years Hopkins was ranked #1, but this year Mass General Hospital (MGH) took the top spot displacing Hopkins to #2. Howeve...

## Preparing public data for analysis with R

July 18, 2012
By

In most data science applications, preparing the data is at least half the job. Finding where the data lives, figuring out how to access it, finding the right records, filtering, cleaning and transforming the data ... all of this has to be done before the statistical analysis can even begin. Fortunately, the R language has many tools for data...

## How to track Twitter unfollowers in R

July 18, 2012
By

I have Twitter account and it is relatively easy to see new followers or subscribers. However, I was looking for ways to know who are the unfollowers. I have noticed, that some (un)subscriptions happen in bulks, which made me thinking that either I tweeted some bullshit and upset bunch of people or spam bots work

## Johns Hopkins Coursera Statistics Courses

July 18, 2012
By

Computing for Data Analysis Data Analysis Mathematical Biostatistics Bootcamp

## Monitor with R: Moisture in Sunflower Seeds Intact

July 18, 2012
By

I had the opportunity today to check the performance of a calibration (moisture in intact sunflower seed in reflectance).This is always a exciting moment:  Does the performance of the calibration for the new validation set is as expected duri...

## Project Euler — problem 15

July 18, 2012
By

The 15th problem in Project Euler. Starting in the top left corner of a 22 grid, there are 6 routes (without backtracking) to the bottom right corner. How many routes are there through a 2020 grid? Mmm… walk in the … Continue reading →

## 50 Shades of Grey Wordcloud

July 17, 2012
By

Sometimes you just want to see what all the fuss is about. File this under the 'because I can' category: I proudly (?) present - a wordcloud produced from the text of E. L. James' "50 Shades of Grey".For a book which is getting all this press about bei...

## Trends in run scoring, NL edition (more R)

July 17, 2012
By

Last time around I used R to plot the average runs per game for the American League, starting in 1901. Now I’ll do the same for the National League.  I'll save a comparison of the two leagues for my next post.A fundamental principal of programming is that code can be repurposed for different sets of datas. So...

## Create an R package in under 6 minutes

July 17, 2012
By

Storing your favorite R functions is best done by creating your own R package. This is a quick way to get started with two example functions.Enjoy!

## R for Ecologists: Creating a Site x Species Matrix

July 17, 2012
By

Today I’m going to adress a fairly common problem in ecology that has been coming up frequently as of late. The issue is how to create a site x species matrix for community composition analysis (i.e. ordination). Moreover, ecologists have to do … Continue reading →

## Plotting the Frequency of Twitter Hashtag Usage Over Time with R and ggplot2

July 17, 2012
By

The 20th annual ISMB meeting was held over the last week in Long Beach, CA. It was an incredible meeting with lots of interesting and relevant talks, and lots of folks were tweeting the conference, usually with at least a few people in each concurrent ...