# Monthly Archives: June 2013

## Chicken or the Egg? Granger-Causality for the masses

June 2, 2013
By

When I first learned about Granger-causality this past February, I was bemused and quite skeptical of the whole procedure.  I felt it belonged on the scrapheap of impractical academic endeavors, preferring to possibly use an ARIMA transfer function model for the same task.  However, several contemporaries threw the red challenge flag and upon further review, my initial impressions have...

## Win Your Fantasy Football Auction Draft: Calculate the Optimal Players to Draft with this Shiny App in R

June 2, 2013
By

In this post, I use a Shiny app in R to determine the best possible players to pick in a fantasy football auction draft.  The app takes projections from FantasyPros, a site that averages across numerous sources of projections.  Based on your ...

## Cosmopolitan Public Spaces

June 2, 2013
By

In my PhD and post-doc research projects at the university, I did a lot of research on the new cosmopolitanism together with Ulrich Beck. Our main goal was to test the hypothesis of an “empirical cosmopolitanization”. Maybe the term is confusing and too abstract, but what we were looking for were quite simple examples

## Facet wrapping multivariate data: reshape and ggplot

June 2, 2013
By

A common problem when trying to show data is that the attributes that you want to map for comparison are stored in multiple rather than single variables. For example, proportion of employment by type. This practical will achieve tis using … Continue reading →

## Using R: drawing several regression lines with ggplot2

June 2, 2013
By

Occasionally I find myself wanting to draw several regression lines on the same plot, and of course ggplot2 has convenient facilities for this. As usual, don’t expect anything profound from this post, just a quick tip! There are several reasons we might end up with a table of  regression coefficients connecting two variables in different

## Cars in Netherlands

June 2, 2013
By

I am looking for a new car. So when I saw there was an update on vehicles in Statistics Netherlands I just had to go and look at the data. So, I learned the brown is getting more popular, often the number of cars from a certain construction year is lar...

June 1, 2013
By

In my previous post (http://statcompute.wordpress.com/2013/05/25/test-drive-of-parallel-computing-with-r) on 05/25/2013, I’ve demonstrated the power of parallel computing with various R packages. However, in the real world, it is not straight-forward to utilize these powerful tools in our day-by-day computing tasks without carefully formulate the problem. In the example below, I am going to show how to use the

## Mapping a Revolution

June 1, 2013
By

Twitter has become an important communications tool for political protests. While mass media are often censored during large-scale political protests, Social Media channels remain relatively open and can be used to tell the world what is happening and to mobilize support all over the world. From an analytic perspective tweets with geo information are

June 1, 2013
By

Historical Stock Data is critical for testing your investment strategies. I illustrated all my back-test examples with getSymbols function from quantmod package. For example, following is a back-test comparison for a few portfolio allocation methods: The getSymbols function, from quantmod package, downloads historical stock prices from Yahoo Fiance. I often get questions about alternative ways

## Tweetanalytics – Interactively analyzing tweets from accounts of 5 universities

June 1, 2013
By

This is an attempt at learning and interactively displaying few results using twitter data using text mining. Interactivity is implemented using RStudio's shiny server. Their documentation of demo scripts came in very handy. As a non-user of twitter, I...